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: [V4] x86/xsaves: calculate the xstate_comp_offsets base on xstate_bv
Date: Wed, 23 Mar 2016 11:28:36 +0800	[thread overview]
Message-ID: <40809.4782186255$1458703938@news.gmane.org> (raw)
In-Reply-To: <20160323012803.GA4131@shuai.ruan@linux.intel.com>

On Wed, Mar 23, 2016 at 09:28:03AM +0800, Shuai Ruan wrote:
> On Tue, Mar 22, 2016 at 04:53:02AM -0600, Jan Beulich wrote:
> > >>> On 16.03.16 at 13:12, <shuai.ruan@linux.intel.com> wrote:
> > 
> > Don't you need to use xcomp_bv here? That's what "Extended
> > Region of an XSAVE Area" in SDM Vol 1 suggests to me.
> > 
> "OPERATION OF XRSTORS" and "OPERATION OF XSAVES" in SDM Vol1.
> 
> For xsaves:
> "Execution of XSAVES performs the init optimization to reduce the amount
> of data written to memory."
> 
> For xrstors:
> "XRSTORS updates state component i based on the value of bit i in the
> XSTATE_BV field of the XSAVE header".
> 
Ignore this. You are right.
I misunderstand some XSAVES/XRSTORS behaviors in SDM . In the previous versions,
I use xcom_bv to caculate comp_offset (but changing to xstate_bv in this
version:( ).
Thanks.
> > >      /* Set XSTATE_BV and XCOMP_BV.  */
> > >      xsave->xsave_hdr.xstate_bv = xstate_bv;
> > >      xsave->xsave_hdr.xcomp_bv = v->arch.xcr0_accum | XSTATE_COMPACTION_ENABLED;
> > > +    setup_xstate_comp(xstate_comp_offsets, xstate_bv);
> > 
> > Same here then I think.
> > 
> > Jan
> > 
> > _______________________________________________
> > Xen-devel mailing list
> > 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

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

      parent reply	other threads:[~2016-03-23  3:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-16 12:12 [V4] x86/xsaves: calculate the xstate_comp_offsets base on xstate_bv Shuai Ruan
2016-03-22 10:53 ` Jan Beulich
2016-03-23  1:28   ` Shuai Ruan
     [not found]   ` <20160323012803.GA4131@shuai.ruan@linux.intel.com>
2016-03-23  3:28     ` 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='40809.4782186255$1458703938@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 \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).