On 18.08.2021 13:30, Marek Marczykowski-Górecki wrote:
> --- a/xen/arch/x86/xstate.c
> +++ b/xen/arch/x86/xstate.c
> @@ -642,6 +642,13 @@ void xstate_init(struct cpuinfo_x86 *c)
>          return;
>      }
>  
> +    /*
> +     * Clear the cached value to make set_xcr0() and set_msr_xss() really
> +     * write it.
> +     */
> +    this_cpu(xcr0) = 0;

While XCR0 cannot be successfully written with 0, ...

> +    this_cpu(xss) = 0;

... XSS can. XSS can't be written with various other values; I'd
suggest using ~0 here. Then

Reviewed-by: Jan Beulich <[email protected]>

and I'd be happy to make the adjustment while committing, so long
as you agree.

Jan


Reply via email to