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.coop...@citrix.com>

Reviewed-by: Wei Liu <wei.l...@citrix.com>

>  
>      /*
> @@ -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@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to