xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Tim Deegan <tim@xen.org>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	"Keir (Xen.org)" <keir@xen.org>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	"allen.m.kay@intel.com" <allen.m.kay@intel.com>,
	Jean Guyader <jean.guyader@eu.citrix.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, 1 Aug 2012 19:08:21 +0100	[thread overview]
Message-ID: <20120801180821.GA96456@ocelot.phlegethon.org> (raw)
In-Reply-To: <alpine.DEB.2.02.1208011846510.4645@kaball.uk.xensource.com>

At 18:55 +0100 on 01 Aug (1343847341), Stefano Stabellini wrote:
> 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.
> 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.

AIUI, reverting this patch won't solve that problem - either a compiler adds
16 bytes of padding (as GCC and clang do), in which case we can use that
area of the new argument, or it doesn't, in which case it's already not
compatible with a GCC-built xen.

> Also, considering that the memory.h interface is supposed to be ANSI C,
> isn't it wrong to assume compiler specific artifacts anyway?

Yes - people writing Windows drivers have this sort of alignment/padding
issue already in a number of places.  But since, as you say, there's no
standard describing this, the best we can do is keep any _new_ interfaces
size-aligned and explicitly sized.

Tim.

  parent reply	other threads:[~2012-08-01 18:08 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
2012-08-02  9:25             ` Jan Beulich
2012-08-01 18:08           ` Tim Deegan [this message]
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=20120801180821.GA96456@ocelot.phlegethon.org \
    --to=tim@xen.org \
    --cc=JBeulich@suse.com \
    --cc=Jean.Guyader@citrix.com \
    --cc=allen.m.kay@intel.com \
    --cc=attilio.rao@citrix.com \
    --cc=jean.guyader@eu.citrix.com \
    --cc=keir@xen.org \
    --cc=konrad.wilk@oracle.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --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).