Re: [PATCH 4/5] x86/cpuid: Simplify recalculate_xstate()

2021-05-05 Thread Jan Beulich
On 05.05.2021 16:53, Andrew Cooper wrote: > On 05/05/2021 09:19, Jan Beulich wrote: >> On 04.05.2021 15:58, Andrew Cooper wrote: >>> On 04/05/2021 13:43, Jan Beulich wrote: I'm also not happy at all to see you use a literal 3 here. We have a struct for this, after all. >

Re: [PATCH 4/5] x86/cpuid: Simplify recalculate_xstate()

2021-05-05 Thread Andrew Cooper
On 05/05/2021 09:19, Jan Beulich wrote: > On 04.05.2021 15:58, Andrew Cooper wrote: >> On 04/05/2021 13:43, Jan Beulich wrote: >>> I'm also not happy at all to see you use a literal 3 here. We have >>> a struct for this, after all. >>> p->xstate.xss_low = xstates & XSTATE_XSAVES_ON

Re: [PATCH 4/5] x86/cpuid: Simplify recalculate_xstate()

2021-05-05 Thread Jan Beulich
On 04.05.2021 15:58, Andrew Cooper wrote: > On 04/05/2021 13:43, Jan Beulich wrote: >> On 03.05.2021 17:39, Andrew Cooper wrote: >>> Make use of the new xstate_uncompressed_size() helper rather than >>> maintaining >>> the running calculation while accumulating feature components. >>> >>> The rest

Re: [PATCH 4/5] x86/cpuid: Simplify recalculate_xstate()

2021-05-04 Thread Andrew Cooper
On 04/05/2021 13:43, Jan Beulich wrote: > On 03.05.2021 17:39, Andrew Cooper wrote: >> Make use of the new xstate_uncompressed_size() helper rather than maintaining >> the running calculation while accumulating feature components. >> >> The rest of the CPUID data can come direct from the raw cpuid

Re: [PATCH 4/5] x86/cpuid: Simplify recalculate_xstate()

2021-05-04 Thread Jan Beulich
On 03.05.2021 17:39, Andrew Cooper wrote: > Make use of the new xstate_uncompressed_size() helper rather than maintaining > the running calculation while accumulating feature components. > > The rest of the CPUID data can come direct from the raw cpuid policy. All > per-component data forms an AB

[PATCH 4/5] x86/cpuid: Simplify recalculate_xstate()

2021-05-03 Thread Andrew Cooper
Make use of the new xstate_uncompressed_size() helper rather than maintaining the running calculation while accumulating feature components. The rest of the CPUID data can come direct from the raw cpuid policy. All per-component data forms an ABI through the behaviour of the X{SAVE,RSTOR}* instru