From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>,
xen-devel@lists.xen.org, Don Koch <dkoch@verizon.com>
Cc: Keir Fraser <keir@xen.org>
Subject: Re: [PATCH v2] Sanity check xsave area when migrating or restoring from older Xen verions
Date: Mon, 20 Oct 2014 14:27:56 +0100 [thread overview]
Message-ID: <54450DDC.6030809@citrix.com> (raw)
In-Reply-To: <5444FE5D0200007800040305@mail.emea.novell.com>
On 20/10/14 11:21, Jan Beulich wrote:
>>>> On 18.10.14 at 01:36, <andrew.cooper3@citrix.com> wrote:
>> On 17/10/2014 18:11, Don Koch wrote:
>>> +
>>> + /* Check to see if the xsave_area is the maximum size.
>>> + If so, it is likely the save is from an older xen. */
>>> + cpuid_count(XSTATE_CPUID, 0, &eax, &ebx, &ecx, &edx);
>> This check is bogus for heterogeneous hardware. We have no way of
>> calculating what the maximum xsave area size was on the sending side
>> should have been...
> Actually we have a way, using the xfeature_mask field that you
> made being ignored a while back. And I think applying sanity
> checks where they can be applied is a good thing. But of course
> we can't blindly compare against the full size found on the receiving
> host. We could get the size from xstate_ctxt_size() unless the
> sending host had features we don't have, in which case we'd need
> to resort to manually calculating the value.
I am not in favour of reinstating that check.
Whether the state was valid for the sending side, is not something the
receiving side should care about.
All the receiving side should care about is whether the state received
is valid. In this case, reinstating the check still doesn't allow us to
correctly calculate the size, and manually doing so is fragile and very
prone to error.
If the record is overly long, but the trailing space is all zeroes, the
state is valid whether or not it is the correct length for the sending side.
~Andrew
next prev parent reply other threads:[~2014-10-20 13:27 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-17 17:11 [PATCH v2] Sanity check xsave area when migrating or restoring from older Xen verions Don Koch
2014-10-17 23:36 ` Andrew Cooper
2014-10-20 10:21 ` Jan Beulich
2014-10-20 12:54 ` Don Koch
2014-10-20 14:25 ` Jan Beulich
2014-10-20 13:27 ` Andrew Cooper [this message]
2014-10-20 14:21 ` Jan Beulich
2014-10-20 15:04 ` Don Koch
2014-10-20 15:09 ` Andrew Cooper
2014-10-20 12:54 ` Don Koch
2014-10-20 15:28 ` Jan Beulich
2014-10-20 15:40 ` Don Koch
2014-10-21 7:40 ` Jan Beulich
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=54450DDC.6030809@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=dkoch@verizon.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 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.