| Date | Tue, 05 May 2015 11:25:35 -0700 | From | Dave Hansen <> | Subject | Re: [PATCH 084/208] x86/fpu: Rename xsave.header::xstate_bv to 'xfeatures' |
| |
On 05/05/2015 11:16 AM, Ingo Molnar wrote: > We could put the SDM name into a comment, next to the field > definition? Something like, if 'xfeatures' is too long: > > struct xstate_header { > u64 xfeat; /* xstate components, SDM: XSTATE_BV */ > u64 xfeat_comp; /* compacted xstate components, SDM: XCOMP_BV */ > u64 reserved[6]; > } __attribute__((packed));
When you're in the depths of the SDM and the kernel code, the fewer context switches you have to make, the better. I say this from the perspective of someone who's had a copy of the SDM open to xsave* for about a month straight.
In any case, having "xfeat" and "xfeat_comp" is a bad idea. They're not really related concepts other than their bits refer to the same states. They should not have such similar names.
XSTATE_BV is the set of states written to the xsave area.
XCOMP_BV is essentially always XCR0 (aka pcntxt_mask, aka xfeatures_mask) or'd with bit 63.
|