From: Keir Fraser <keir@xen.org>
To: Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>,
Jean Guyader <jean.guyader@eu.citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
"Tim (Xen.org)" <tim@xen.org>,
"allen.m.kay@intel.com" <allen.m.kay@intel.com>,
Jean Guyader <Jean.Guyader@citrix.com>,
"JBeulich@suse.com" <JBeulich@suse.com>,
Attilio Rao <attilio.rao@citrix.com>
Subject: Re: Should we revert "mm: New XENMEM space, XENMAPSPACE_gmfn_range"?
Date: Wed, 01 Aug 2012 19:06:44 +0100 [thread overview]
Message-ID: <CC3F2EC4.477D8%keir@xen.org> (raw)
In-Reply-To: <alpine.DEB.2.02.1208011846510.4645@kaball.uk.xensource.com>
On 01/08/2012 18:55, "Stefano Stabellini" <Stefano.Stabellini@eu.citrix.com>
wrote:
> On Wed, 16 Nov 2011, Jean Guyader wrote:
>>
>> XENMAPSPACE_gmfn_range is like XENMAPSPACE_gmfn but it runs on
>> a range of pages. The size of the range is defined in a new field.
>>
>> This new field .size is located in the 16 bits padding between .domid
>> and .space in struct xen_add_to_physmap to stay compatible with older
>> versions.
>>
>> Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
>
> Hi all,
> I was reading more about this commit because this patch breaks the ABI
> on ARM, when I realized that on x86 there is no standard that specifies
> the alignment of fields in a struct.
> As a consequence I don't think we can really be sure that between .domid
> and .space we always have 16 bits of padding.
Well, on x86 there *is* 16 bits of padding between the .domid and .space
fields. That's our ABI. Regardless of whether we rely on not-really-existent
padding rules in the compiler. If someone compiles in an environment that
aligns stuff differently, we have to rewrite our headers. :)
We don't have a supported ABI on ARM until 4.2.0 is released at the
earliest.
Should we be changing our rules on public headers, allowing
compiler-specific extensions to precisely lay out our structures? Quite
possibly. We used to do that, but it got shot down by the ppc and ia64
arches who wanted an easier life and just rely on compiler default layout
for a particular platform. Of course those maintainers aren't actually
voting any more. ;)
-- Keir
> I am afraid that if a user compiles Linux or another guest kernel with a
> compiler other than gcc, this hypercall might break. In fact it already
> happened just switching from x86 to ARM.
> Also, considering that the memory.h interface is supposed to be ANSI C,
> isn't it wrong to assume compiler specific artifacts anyway?
> Considering that we haven't made any releases yet with the change in
> memory.h, shouldn't we revert the commit before it is too late?
>
> - Stefano
next prev parent reply other threads:[~2012-08-01 18:06 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-16 19:25 [PATCH 0/6] IOMMU, vtd and iotlb flush rework (v8) Jean Guyader
2011-11-16 19:25 ` [PATCH 1/6] vtd: Refactor iotlb flush code Jean Guyader
2011-11-16 19:25 ` [PATCH 2/6] iommu: Introduce iommu_flush and iommu_flush_all Jean Guyader
2011-11-16 19:25 ` [PATCH 3/6] add_to_physmap: Move the code for XENMEM_add_to_physmap Jean Guyader
2011-11-16 19:25 ` [PATCH 4/6] mm: New XENMEM space, XENMAPSPACE_gmfn_range Jean Guyader
2011-11-16 19:25 ` [PATCH 5/6] hvmloader: Change memory relocation loop when overlap with PCI hole Jean Guyader
2011-11-16 19:25 ` [PATCH 6/6] Introduce per cpu flag (iommu_dont_flush_iotlb) to avoid unnecessary iotlb flush Jean Guyader
2012-08-01 17:55 ` Should we revert "mm: New XENMEM space, XENMAPSPACE_gmfn_range"? Stefano Stabellini
2012-08-01 18:06 ` Keir Fraser [this message]
2012-08-02 9:25 ` Jan Beulich
2012-08-01 18:08 ` Tim Deegan
2012-08-02 9:23 ` Jan Beulich
2012-08-02 9:45 ` Attilio Rao
2012-08-02 10:22 ` Jan Beulich
2012-08-02 10:35 ` Attilio Rao
2012-08-02 12:57 ` Attilio Rao
2012-08-02 13:13 ` Stefano Stabellini
2012-08-02 13:36 ` Jan Beulich
2012-08-02 13:38 ` Stefano Stabellini
2011-11-19 21:58 ` [PATCH 3/6] add_to_physmap: Move the code for XENMEM_add_to_physmap Olaf Hering
2011-11-19 22:14 ` Keir Fraser
2011-11-19 22:37 ` Jean Guyader
2011-11-20 13:25 ` Olaf Hering
2011-11-20 19:59 ` Keir Fraser
2011-11-21 8:39 ` Olaf Hering
2011-11-17 9:20 ` [PATCH 0/6] IOMMU, vtd and iotlb flush rework (v8) Keir Fraser
2011-11-17 9:42 ` 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=CC3F2EC4.477D8%keir@xen.org \
--to=keir@xen.org \
--cc=JBeulich@suse.com \
--cc=Jean.Guyader@citrix.com \
--cc=Stefano.Stabellini@eu.citrix.com \
--cc=allen.m.kay@intel.com \
--cc=attilio.rao@citrix.com \
--cc=jean.guyader@eu.citrix.com \
--cc=konrad.wilk@oracle.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xensource.com \
/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).