From: David Vrabel <david.vrabel@citrix.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
Keir Fraser <keir@xen.org>, Jan Beulich <JBeulich@suse.com>,
Xen-devel <xen-devel@lists.xen.org>
Subject: Re: [Patch] common/memory: Fix ABI breakage for XENMEM_add_to_physmap
Date: Wed, 15 Jan 2014 10:49:18 +0000 [thread overview]
Message-ID: <52D667AE.3040506@citrix.com> (raw)
In-Reply-To: <1389782102.12434.163.camel@kazak.uk.xensource.com>
On 15/01/14 10:35, Ian Campbell wrote:
> On Wed, 2014-01-15 at 09:57 +0000, Andrew Cooper wrote:
>> On 15/01/14 09:53, Ian Campbell wrote:
>>> On Tue, 2014-01-14 at 20:21 +0000, Andrew Cooper wrote:
>>>> caused by c/s 4be86bb194e25e46b6cbee900601bfee76e8090a
>>>>
>>>> In public/memory.h, struct xen_add_to_physmap has 'space' as an unsigned int,
>>>> but struct xen_add_to_physmap_batch has 'space' as a uint16_t.
>>>>
>>>> By defining xenmem_add_to_physmap_one() with space defined as uint16_t, the
>>>> now-common xenmem_add_to_physmap() implicitly truncates xatp->space from
>>>> unsigned int to uint16_t, which changes the space switch()'d upon.
>>>>
>>>> This wouldn't be noticed with any upstream code (of which I am aware), but was
>>>> discovered because of the XenServer support for legacy Windows PV drivers,
>>>> which make XENMEM_add_to_physmap hypercalls using spaces with the top bit set.
>>>> The current Windows PV drivers don't do this any more, but we 'fix' Xen to
>>>> support running VMs with out-of-date tools.
>>>>
>>>> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
>>>> CC: Keir Fraser <keir@xen.org>
>>>> CC: Jan Beulich <JBeulich@suse.com>
>>>> CC: Ian Campbell <Ian.Campbell@citrix.com>
>>>>
>>>> ---
>>>>
>>>> As this breakage was caused between 4.4-rc1 and -rc2,
>>> That's certainly a good indicator, but you've not covered the actual
>>> risks and rewards of making this change now:
>>> http://wiki.xen.org/wiki/Xen_Roadmap/4.4#Exception_guidelines_for_after_the_code_freeze
>>>
>>> Please can you do so.
>>>
>>>
>>
>> Contributes towards #1 "Bug-free release"
>>
>> Risks:
>> * We now know we have an ABI regression
>> * It is a fairly obvious fix which is unlikely to have hidden issues
>> itself.
>>
>> Rewards:
>> * We keep the hypervisor ABI compatible with Xen 4.3
>
> IMHO it already is -- the 4.4 ABI is not broken because the truncated
> bits are not used in the Xen ABI, 4.4 accepts everything which 4.3 does.
> We still very much have the option of deferring this change to 4.5
> and/or when the bits become used, with no risk to the Xen 4.4 release.
It is a guest visible change as it changes the behaviour if the guest
supplies space >= 0x1000. e.g., space == 0x1000 would be truncated and
it would operate on space == 0x0000 and (potentially) return sucesss
instead of an -EINVAL error.
David
next prev parent reply other threads:[~2014-01-15 10:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-14 20:21 [Patch] common/memory: Fix ABI breakage for XENMEM_add_to_physmap Andrew Cooper
2014-01-15 9:11 ` Jan Beulich
2014-01-15 9:53 ` Ian Campbell
2014-01-15 9:57 ` Andrew Cooper
2014-01-15 10:35 ` Ian Campbell
2014-01-15 10:44 ` Jan Beulich
2014-01-15 10:51 ` Ian Campbell
2014-01-15 10:49 ` David Vrabel [this message]
2014-01-17 18:00 ` 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=52D667AE.3040506@citrix.com \
--to=david.vrabel@citrix.com \
--cc=Ian.Campbell@citrix.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 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.