[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] RE: [Xen-devel] Need help figuring out why my windows pv driverswontwork with a 32 bit dom0...
> > . Windows is padding structures differently under 32 and 64 bits. > > Strange that everything else works fine though... > > I think I may be onto something with this... > > 32 bit Linux (using gcc and a quick .c file): > sizeof(uint8_t) = 1 > sizeof(uint16_t) = 2 > sizeof(uint32_t) = 4 > sizeof(uint64_t) = 8 > sizeof(struct blkif_request) = 108 > sizeof(struct blkif_request_segment) = 8 > sizeof(struct blkif_response) = 12 > > 64 bit Linux (using gcc and a quick .c file): > sizeof(uint8_t) = 1 > sizeof(uint16_t) = 2 > sizeof(uint32_t) = 4 > sizeof(uint64_t) = 8 > sizeof(struct blkif_request) = 112 > sizeof(struct blkif_request_segment) = 8 > sizeof(struct blkif_response) = 16 > > 32 bit Windows (using Microsoft DDK Compiler and debug statements in the > driver) > sizeof(uint8_t) = 1 > sizeof(uint16_t) = 2 > sizeof(uint32_t) = 4 > sizeof(uint64_t) = 8 > sizeof(struct blkif_request) = 112 > sizeof(struct blkif_request_segment) = 8 > sizeof(struct blkif_response) = 16 > > Haven't tried this test on 64 bit windows yet, but if 32 bit windows and > 32 bit Linux align their structures differently, I can imagine that > problems are going to arise... > "#pragma pack(4)" before the blkif definitions and "#pragma pack()" afterwards fixed it up. All appears to be working now. I've pushed the changes to hg (http://xenbits.xensource.com/ext/win-pvdrivers.hg). I haven't yet tested under amd64 in case I've broken that... James _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |