Re: [PATCH 5/5] x86/cpuid: Fix handling of xsave dynamic leaves

2021-05-05 Thread Jan Beulich
On 05.05.2021 18:59, Andrew Cooper wrote: > On 05/05/2021 09:33, Jan Beulich wrote: >> On 04.05.2021 16:17, Andrew Cooper wrote: >>> On 04/05/2021 13:56, Jan Beulich wrote: On 03.05.2021 17:39, Andrew Cooper wrote: > +unsigned int xstate_compressed_size(uint64_t xstates) > +{ > +

Re: [PATCH 5/5] x86/cpuid: Fix handling of xsave dynamic leaves

2021-05-05 Thread Andrew Cooper
On 05/05/2021 09:33, Jan Beulich wrote: > On 04.05.2021 16:17, Andrew Cooper wrote: >> On 04/05/2021 13:56, Jan Beulich wrote: >>> On 03.05.2021 17:39, Andrew Cooper wrote: +unsigned int xstate_compressed_size(uint64_t xstates) +{ +unsigned int i, size = XSTATE_AREA_MIN_SIZE; >>>

Re: [PATCH 5/5] x86/cpuid: Fix handling of xsave dynamic leaves

2021-05-05 Thread Jan Beulich
On 04.05.2021 16:17, Andrew Cooper wrote: > On 04/05/2021 13:56, Jan Beulich wrote: >> On 03.05.2021 17:39, Andrew Cooper wrote: >>> +unsigned int xstate_compressed_size(uint64_t xstates) >>> +{ >>> +unsigned int i, size = XSTATE_AREA_MIN_SIZE; >>> + >>> +xstates &= ~XSTATE_FP_SSE; >>> +

Re: [PATCH 5/5] x86/cpuid: Fix handling of xsave dynamic leaves

2021-05-04 Thread Andrew Cooper
On 04/05/2021 13:56, Jan Beulich wrote: > On 03.05.2021 17:39, Andrew Cooper wrote: >> If max leaf is greater than 0xd but xsave not available to the guest, then >> the >> current XSAVE size should not be filled in. This is a latent bug for now as >> the guest max leaf is 0xd, but will become pro

Re: [PATCH 5/5] x86/cpuid: Fix handling of xsave dynamic leaves

2021-05-04 Thread Jan Beulich
On 03.05.2021 17:39, Andrew Cooper wrote: > If max leaf is greater than 0xd but xsave not available to the guest, then the > current XSAVE size should not be filled in. This is a latent bug for now as > the guest max leaf is 0xd, but will become problematic in the future. > > The comment concerni

[PATCH 5/5] x86/cpuid: Fix handling of xsave dynamic leaves

2021-05-03 Thread Andrew Cooper
If max leaf is greater than 0xd but xsave not available to the guest, then the current XSAVE size should not be filled in. This is a latent bug for now as the guest max leaf is 0xd, but will become problematic in the future. The comment concerning XSS state is wrong. VT-x doesn't manage host/gue