|
|
|
|
|
|
|
|
|
|
xen-devel
RE: [Xen-devel] Need help figuring out why my windows pv driverswontwork
On Fri, 2008-02-01 at 16:48 +1100, James Harper wrote:
> "#pragma pack(4)" before the blkif definitions and "#pragma pack()"
> afterwards fixed it up.
yes, packing should fix it, but is it the right approach?
the fields are not naturally (i.e. multiple of the word size) aligned,
and that is the problem. different compilers will chose alignments
different from the declared ones for good reason. The 64bit values are
hanging across a dword boundary, and expect the memory interface to hate
that.
could you add explicit, sane pad values to the structures and see
whether that negatively affects the message sizes which fit on the
sring? I don't think that this would be the case. Pad, _then_ pack them.
Should be packed for gcc as well, as there are no guarantees that chosen
alignments are maintained across past and future revisions:
__attribute__((packed))
btw: there's an offsetof() macro (C99?) which should give you more
insight which variables are actually affected in your test code:
#define offsetof(type,memb) ((unsigned long) &((type*)0)->memb)
regards,
daniel
--
Daniel Stodden
LRR - Lehrstuhl für Rechnertechnik und Rechnerorganisation
Institut für Informatik der TU München D-85748 Garching
http://www.lrr.in.tum.de/~stodden mailto:stodden@xxxxxxxxxx
PGP Fingerprint: F5A4 1575 4C56 E26A 0B33 3D80 457E 82AE B0D8 735B
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- RE: [Xen-devel] Need help figuring out why my windows pv driverswontwork with a 32 bit dom0...,
Daniel Stodden <=
|
|
|
|
|