[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH V7 1/3] x86/xsaves: fix overwriting between non-lazy/lazy xsaves



On Mon, Apr 25, 2016 at 12:51:44AM -0600, Jan Beulich wrote:
> >>> On 31.03.16 at 10:57, <shuai.ruan@xxxxxxxxxxxxxxx> wrote:
> > +#define XRSTOR(pfx) \
> > +        if ( v->arch.xcr0_accum & XSTATE_XSAVES_ONLY ) \
> > +        { \
> > +            if ( unlikely(!(ptr->xsave_hdr.xcomp_bv & \
> > +                            XSTATE_COMPACTION_ENABLED)) ) \
> > +                ptr->xsave_hdr.xcomp_bv |= ptr->xsave_hdr.xstate_bv | \
> > +                                           XSTATE_COMPACTION_ENABLED; \
> 
> From v5 to v6 this changed from just = to |=, without any
> explanation, and without me really noticing - why? Weren't
> the other changes done specifically to guarantee xcomp_bv
> to be zero up to this point? In which case I'd prefer to make
> this obvious/explicit, by using = and perhaps an ASSERT()
> here. (I have a patch ready, but I'd like to understand if
> there was a reason for this change that I don't see.)
> 
> Jan
Using "=" is better. xcomp_bv can be guarantee to be zero to this
point.

Thanks

> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxx
> http://lists.xen.org/xen-devel

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.