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

Re: [Xen-devel] [PATCH 02/10] x86/spec_ctrl: Express Xen's choice of MSR_SPEC_CTRL value as a variable



On Fri, May 11, 2018 at 11:38:06AM +0100, Andrew Cooper wrote:
> At the moment, we have two different encodings of Xen's MSR_SPEC_CTRL value,
> which is a side effect of how the Spectre series developed.  One encoding is
> via an alias with the bottom bit of bti_ist_info, and can encode IBRS or not,
> but not other configuraitons such as STIBP.
> 
> Break Xen's value out into a separate variable (in the top of stack block for
> XPTI reasons) and use this instead of bti_ist_info in the IST path.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

Reviewed-by: Wei Liu <wei.liu2@xxxxxxxxxx>

>  
>      /*
> @@ -417,8 +421,6 @@ void __init init_speculation_mitigations(void)
>  
>  static void __init __maybe_unused build_assertions(void)
>  {
> -    /* The optimised assembly relies on this alias. */
> -    BUILD_BUG_ON(BTI_IST_IBRS != SPEC_CTRL_IBRS);

I was about to suggest removing this function entirely but it is in fact
filled in later, so this is fine.

Wei.

_______________________________________________
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®.