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>, Jun Nakajima <jun.nakajima@intel.com>,
Donald D Dugger <donald.d.dugger@intel.com>
Subject: Re: XSAVE save/restore shortcomings
Date: Thu, 05 Sep 2013 15:58:46 +0200 [thread overview]
Message-ID: <52288E16.2030205@redhat.com> (raw)
In-Reply-To: <52288EC302000078000F0CDD@nat28.tlf.novell.com>
Il 05/09/2013 14:01, Jan Beulich ha scritto:
>>>> On 05.09.13 at 12:53, Paolo Bonzini <pbonzini@redhat.com> wrote:
>> 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.
>
> Then why would there be a way to retrieve these offsets via CPUID?
Perhaps Intel envisioned that the OS could blindly do XSAVEOPT on all
detected elements, including yet-unknown features.
>> 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...
>
> For which it is too late: Both 4.2 and 4.3 already have LWP support.
Which guests are actually using it?
But in the end it doesn't really matter that AMD and Intel have
incompatible XSAVE formats, as long as each vendor remains compatible
with itself. Again AMD is not doing new x86 development; hence, all
that you'd lose is AMD->Intel migration the day Intel implements LWP,
but only on guests that use LWP (Intel->AMD probably would be broken
anyway due to lack of AVX-512 on AMD).
Paolo
next prev parent reply other threads:[~2013-09-05 13:58 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
2013-09-05 12:01 ` Jan Beulich
2013-09-05 13:58 ` Paolo Bonzini [this message]
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=52288E16.2030205@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.