On 04/05/2021 13:20, Jan Beulich wrote: > On 03.05.2021 17:39, Andrew Cooper wrote: >> @@ -568,16 +568,38 @@ static unsigned int hw_uncompressed_size(uint64_t xcr0) >> return size; >> } >> >> -/* Fastpath for common xstate size requests, avoiding reloads of xcr0. */ >> -unsigned int xstate_ctxt_size(u64 xcr0) >> +unsigned int xstate_uncompressed_size(uint64_t xcr0) > Since you rewrite the function anyway, and since taking into account > the XSS-controlled features here is going to be necessary as well > (even if just down the road, but that's what your ultimate goal is > from all I can tell), how about renaming the parameter to "xstates" > or "states" at the same time?
I'm working on some cleanup of terminology, which I haven't posted yet. For this one, I'm not sure. For uncompressed size, we genuinely mean user states only. When there's a suitable constant to use, this will gain an assertion. ~Andrew