From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ross Philipson Subject: Re: [PATCH 5/5] xen: Add V4V implementation - padding question Date: Tue, 11 Jun 2013 13:54:42 -0400 Message-ID: <51B76462.3030100@citrix.com> References: <1344023454-31425-1-git-send-email-jean.guyader@citrix.com> <1344023454-31425-6-git-send-email-jean.guyader@citrix.com> <501FA05C0200007800092CD7@nat28.tlf.novell.com> <51B75A12.4050202@citrix.com> <20130611172507.GC27333@ocelot.phlegethon.org> <51B76115.7000209@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <51B76115.7000209@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: Tim Deegan List-Id: xen-devel@lists.xenproject.org On 06/11/2013 01:40 PM, Ross Philipson wrote: > On 06/11/2013 01:25 PM, Tim Deegan wrote: >> At 13:10 -0400 on 11 Jun (1370956242), Ross Philipson wrote: >>>> >>>>>> ... >>>>>> +struct v4v_info >>>>>> +{ >>>>>> + uint64_t ring_magic; >>>>>> + uint64_t data_magic; >>>>>> + evtchn_port_t evtchn; >>>>> >>>>> Missing padding at the end? >>>>> >>>> >>>> ack. >>>> >>> >>> At one point during the review of an earlier version of the V4V patch >>> set, Jan requested that this pad be added to the v4v_info struct. I >>> understand the padding in all the other structs but I don't understand >>> this one. This struct is not included in any other structs and is not >>> followed by any data. >> >> 64-bit Xen would see this as a 24-byte struct, even without explicit >> padding. That would surprise a 32-bit guest that allocated what it saw >> as a 20-byte struct for Xen to copy into. > > Ah yes, of course. Thanks for the quick response. > > Ross 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; > >> >> Tim. > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel