[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v6.5 22/26] x86/boot: Calculate the most appropriate BTI mitigation to use



>>> On 04.01.18 at 01:15, <andrew.cooper3@xxxxxxxxxx> 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@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.