From: Attilio Rao <attilio.rao@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
"Keir (Xen.org)" <keir@xen.org>,
KonradRzeszutek Wilk <konrad.wilk@oracle.com>,
"Tim (Xen.org)" <tim@xen.org>,
Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>,
"allen.m.kay@intel.com" <allen.m.kay@intel.com>,
Jean Guyader <jean.guyader@eu.citrix.com>,
"Jean Guyader (3P)" <jean.guyader@citrix.com>
Subject: Re: Should we revert "mm: New XENMEM space, XENMAPSPACE_gmfn_range"?
Date: Thu, 2 Aug 2012 11:35:21 +0100 [thread overview]
Message-ID: <501A57E9.6070407@citrix.com> (raw)
In-Reply-To: <501A71030200007800092257@nat28.tlf.novell.com>
On 02/08/12 11:22, Jan Beulich wrote:
>>>> On 02.08.12 at 11:45, Attilio Rao<attilio.rao@citrix.com> wrote:
>>>>
>> On 02/08/12 10:23, Jan Beulich wrote:
>>
>>>>>> On 01.08.12 at 19:55, Stefano Stabellini<stefano.stabellini@eu.citrix.com>
>>>>>>
>> 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.
>>>>
>>>>
>>> There is - the psABI supplements to the SVR4 ABI.
>>>
>>>
>>>
>> This is a completely different issue.
>> The problem here gcc/whatever compiler padding added to the struct in
>> order to have alignment of the members to the word boundry. The
>> difference is that this is not enforced in the ARM case (apparently,
>> from Stefano's report) while it happens in the x86 case.
>>
>> This is why it is a good rule to organize member of a struct from the
>> bigger to the smaller when compiling with gcc and this is not the case
>> of the struct in question.
>>
>> In the end it is a compiler decisional thing, not something decided by
>> the ABI.
>>
> No, definitely not. Otherwise inter-operation between code
> compiled with different compilers would be impossible. To
> allow this is what the various ABI specifications exist for (and
> their absence had, e.g. on DOS, lead to a complete mess).
>
>
Look, I'm speaking about the problem Stefano is trying to crunch which
has nothing to do with your discussion on ABI.
> As to the ARM issue - mind pointing out where mis-aligned
> structure fields are specified as being the standard?
>
>
I think that alignment is important, infact I'm more surprised to the
ARM side than the x86. Of course, because this is a compiler-dependent
behaviour (the fact that not only gcc does that doesn't mean it is
"standardized", just like it is not standardized anywhere that stack on
x86 must be word aligned, even if it is so common that it is taken for
granted now).
I was wondering, maybe ARM is compiled with -fpack-struct (even if I
would be surprised)?
Attilio
next prev parent reply other threads:[~2012-08-02 10:35 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
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 [this message]
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=501A57E9.6070407@citrix.com \
--to=attilio.rao@citrix.com \
--cc=JBeulich@suse.com \
--cc=Stefano.Stabellini@eu.citrix.com \
--cc=allen.m.kay@intel.com \
--cc=jean.guyader@citrix.com \
--cc=jean.guyader@eu.citrix.com \
--cc=keir@xen.org \
--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).