Re: ping Re: [PATCH v4 0/2] x86: Fix ARCH_REQ_XCOMP_PERM and update the test

Paolo Bonzini
2022-03-23T14:24:27Z

On 3/23/22 13:55, Thomas Gleixner wrote:
> --- a/arch/x86/kernel/fpu/xstate.c
> +++ b/arch/x86/kernel/fpu/xstate.c
> @@ -1625,6 +1625,8 @@ static int __xstate_request_perm(u64 per
>
> /* Calculate the resulting kernel state size */
> mask = permitted | requested;
> + /* Take supervisor states into account */
> + mask |= xfeatures_mask_supervisor();
> ksize = xstate_calculate_size(mask, compacted);
>

This should be only added in for the !guest case.

Paolo