xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Shuai Ruan <shuai.ruan@linux.intel.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: andrew.cooper3@citrix.com, keir@xen.org, xen-devel@lists.xen.org
Subject: Re: [PATCH V6 2/2] x86/xsaves: fix overwriting between non-lazy/lazy xsaves
Date: Wed, 30 Mar 2016 13:46:13 +0800	[thread overview]
Message-ID: <12507.0086833604$1459317028@news.gmane.org> (raw)
In-Reply-To: <56FAB4B602000078000E0F41@prv-mh.provo.novell.com>

On Tue, Mar 29, 2016 at 09:00:38AM -0600, Jan Beulich wrote:
> > 
> > xsaves will be used until supervised state is instroduced in hypervisor.
> 
> "xsaves will not be used ... introduced ..." I suppose?
Thanks
> 
> > @@ -223,13 +223,15 @@ void compress_xsave_states(struct vcpu *v, const void *src, unsigned int size)
> >      u64 xstate_bv = ((const struct xsave_struct *)src)->xsave_hdr.xstate_bv;
> >      u64 valid;
> >  
> > -    if ( !cpu_has_xsaves && !cpu_has_xsavec )
> > +    ASSERT(!xsave_area_compressed(src));
> > +
> > +    if ( !(v->arch.xcr0_accum & XSTATE_XSAVES_ONLY) &&
> > +         !xsave_area_compressed(src) )
> 
> Considering the ASSERT(), what's this second half of the conditional
> good for?
> 
The check of !xsave_area_compressed(src) indicate we did check the input
data. ( The check here is useless, but just want to make this more clear.)
As it is useless, I may drop it. 
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

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

      reply	other threads:[~2016-03-30  5:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-24  8:29 [PATCH V6 0/2] xsaves bug fix Shuai Ruan
2016-03-24  8:29 ` [PATCH V6 1/2] x86/xsaves: calculate the comp_offsets base on xcomp_bv Shuai Ruan
2016-03-29 14:35   ` Jan Beulich
2016-03-30  5:48     ` Shuai Ruan
2016-03-24  8:29 ` [PATCH V6 2/2] x86/xsaves: fix overwriting between non-lazy/lazy xsaves Shuai Ruan
2016-03-29 15:00   ` Jan Beulich
2016-03-30  5:46     ` Shuai Ruan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='12507.0086833604$1459317028@news.gmane.org' \
    --to=shuai.ruan@linux.intel.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=keir@xen.org \
    --cc=xen-devel@lists.xen.org \
    --subject='Re: [PATCH V6 2/2] x86/xsaves: fix overwriting between non-lazy/lazy xsaves' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).