[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Should we revert "mm: New XENMEM space, XENMAPSPACE_gmfn_range"?



On 02/08/12 11:22, Jan Beulich wrote:
On 02.08.12 at 11:45, Attilio Rao<attilio.rao@xxxxxxxxxx>  wrote:
On 02/08/12 10:23, Jan Beulich wrote:
On 01.08.12 at 19:55, Stefano Stabellini<stefano.stabellini@xxxxxxxxxxxxx>
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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.