All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>,
	Keir Fraser <keir@xen.org>,
	Donald D Dugger <donald.d.dugger@intel.com>,
	Jun Nakajima <jun.nakajima@intel.com>
Subject: Re: XSAVE save/restore shortcomings
Date: Thu, 05 Sep 2013 12:53:16 +0200	[thread overview]
Message-ID: <5228629C.2090103@redhat.com> (raw)
In-Reply-To: <52208BD602000078000EFACC@nat28.tlf.novell.com>

Il 30/08/2013 12:11, Jan Beulich ha scritto:
> I'd like to make clear that the change presented is going to handle
> only the most trivial cases (where any new xsave state addition
> adds to the end of the save area). This is an effect of a more
> fundamental flaw in the original design (which the patch doesn't try
> to revise, as it's not clear to me yet what the best approach here is):
> While the XSAVE hardware specification allows for each piece to be
> individually savable/restorable, both PV and HVM save/restore
> assume a single monolithic blob. Which is already going to be a
> problem: AVX-512 as well as MPX conflict with LWP. And obviously
> it can't be excluded that we'll see CPUs supporting AVX-512 but not
> MPX as well as guests using the former but not the latter, and
> neither can be dealt with under the current design.

This should not be a problem, the manual says "The layout of the
XSAVE/XRSTOR save area is fixed and may contain non-contiguous
individual save areas.  The XSAVE/XRSTOR save area is not compacted if
some features are not saved or are not supported by the processor and/or
by system software".  Note "by the processor": the way I read this, size
may vary (which is why CPUID.0Dh exists, basically), but offsets are
guaranteed to be constant.

Thus the only problem is LWP.  Given AMD's current non-involvement in
x86, it may be simpler to avoid the problem completely by not
implementing virtual LWP...

Paolo

> I therefore think that we'll need to start over from scratch with
> how save/restore is to be implemented, breaking up the current
> monolithic block into individual pieces. But before working on a
> proposal, I'd first like to hear whether others can see better (and
> namely less intrusive) ways of dealing with the problem.
> 
> Jan
> 

  parent reply	other threads:[~2013-09-05 10:53 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-30  9:55 [PATCH] x86/xsave: fix migration from xsave-capable to xsave-incapable host Jan Beulich
2013-08-30 10:11 ` XSAVE save/restore shortcomings (was: [PATCH] x86/xsave: fix migration from xsave-capable to xsave-incapable host) Jan Beulich
2013-08-30 13:47   ` XSAVE save/restore shortcomings Andrew Cooper
2013-09-05 10:53   ` Paolo Bonzini [this message]
2013-09-05 12:01     ` Jan Beulich
2013-09-05 13:58       ` Paolo Bonzini
2013-09-05 14:34         ` Jan Beulich
2013-09-06  3:03           ` Zhang, Yang Z
2013-09-06  6:59             ` Jan Beulich
2013-09-06  7:20               ` Zhang, Yang Z
2013-09-06  7:31                 ` Jan Beulich
2013-09-06  7:45                   ` Zhang, Yang Z
2013-09-06 11:57                     ` Paolo Bonzini
2013-09-06 12:35                       ` Jan Beulich
2013-09-06 12:38                         ` Paolo Bonzini
2013-09-06 12:39                         ` Andrew Cooper
2013-09-06 14:44                       ` H. Peter Anvin
2013-09-06 15:03                         ` Paolo Bonzini
2013-09-06 15:04                           ` H. Peter Anvin
2013-09-03  5:47 ` [PATCH] x86/xsave: fix migration from xsave-capable to xsave-incapable host Zhang, Yang Z
2013-09-09 11:16 ` Keir Fraser

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=5228629C.2090103@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=JBeulich@suse.com \
    --cc=donald.d.dugger@intel.com \
    --cc=jun.nakajima@intel.com \
    --cc=keir@xen.org \
    --cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.