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

Re: [Xen-devel] [PATCH 5/5] xen: Add V4V implementation - padding question



>>> On 11.06.13 at 20:04, Tim Deegan <tim@xxxxxxx> wrote:
> At 13:54 -0400 on 11 Jun (1370958882), Ross Philipson wrote:
>> I guess that means that this struct is unhappy then...
>> 
>> typedef struct v4vtables_rule
>> {
>>     v4v_addr_t src;  -- 8b
>>     v4v_addr_t dst;  -- 8b
>>     uint32_t accept; -- 4b
>> } v4vtables_rule_t;
> 
> Surprisingly, no: since it contains no 8-byte fields, both x86
> architectures will see it as a 20-byte (4-byte-aligned) struct. 
> Not sure about ARM, though.

That's why all such structures should go through the public
header compat mode checking, so that eventual inconsistencies
would be noticed right away rather than at the end of some
extended debugging session.

Jan


_______________________________________________
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®.