>>> On 04.01.18 at 01:15, <andrew.coop...@citrix.com> wrote:
> @@ -31,11 +32,12 @@ enum ind_thunk {
>      THUNK_LFENCE,
>      THUNK_JMP,
>  } opt_thunk __initdata = THUNK_DEFAULT;
> +int opt_ibrs __initdata = -1;

static

> @@ -147,6 +230,18 @@ void __init init_speculation_mitigations(void)
>      else if ( thunk == THUNK_JMP )
>          setup_force_cpu_cap(X86_FEATURE_IND_THUNK_JMP);
>  
> +    /*
> +     * Even if we've chosen not to use IBRS for Xen itself, we still need the
> +     * IBRS entry/exit logic to virtualise IBRS support for guests.
> +     */
> +    if ( boot_cpu_has(X86_FEATURE_IBRSB) )
> +    {
> +        if ( ibrs )
> +            setup_force_cpu_cap(X86_FEATURE_XEN_IBRS_SET);
> +        else
> +            setup_force_cpu_cap(X86_FEATURE_XEN_IBRS_CLEAR);
> +    }

You've already indicated you would try to change the comment,
for it to not be misleading the way it's currently placed.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to