* Avi Kivity ([EMAIL PROTECTED]) wrote:
> Chris Wright wrote:
>>>>  struct ksm_memory_region {
>>>>    __u32 npages; /* number of pages to share */
>>>>    __u64 addr; /* the begining of the virtual address */
>>>>  };
>>>>       
>>> why isnt it compat safe?
>>
>> 32-bit has more relaxed alignment requirement for __u64 (4 bytes)
>> than 64-bit (8 bytes).  choices are reverse the order or add padding
>> (can test by compiling structure in 32 and 64 bit).
>
> Reversing the order isn't good enough, since the structure size would be 
> different, and that is embedded in the ioctl number.

good point.

> Padding is necessary.
>
> [wishlist: struct { ... } __attribute__((abi_x86_64));]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Reply via email to