Re: [PATCH 07/10] x86/xsaves: Fix init_fpstate.header.xcomp_bv

From: Yu-cheng Yu
Date: Mon Feb 22 2016 - 15:45:28 EST


On Mon, Feb 22, 2016 at 11:55:50AM -0800, Dave Hansen wrote:
> On 02/22/2016 10:59 AM, Yu-cheng Yu wrote:
> > This actually does not apply to XSAVES as XSAVES uses optimization. After
> > init, all components are in INIT and not MODIFIED state and will not be
> > saved. There is no need of setting xcomp_bv except for bit 63 to indicate
> > a compacted format.
>
> I look at it this way: xcomp_bv tells you the format of the buffer
> xstate_bv tells you which components of the buffer are valid (not in
> init state).
>
> As it stands, every kernel xcomp_bv value should be identical, since the
> kernel buffer is always in the same state and XSAVES is always called
> with the same Requested Feature BitMap (RFBM).
>
> While I don't think this patch _hurts_ anything, I think it might be a
> bit confusing. Wouldn't it just be easier if *EVERY* xcomp_bv value was
> the same?

Agree. This patch can be skipped if it turns out not needed.

--Yu-cheng