From: Stefano Stabellini Subject: Re: [PATCH 1/5] xen: improve changes to xen_add_to_physmap Date: Mon, 6 Aug 2012 16:43:53 +0100 Message-ID: References: <1344262325-26598-1-git-send-email-stefano.stabellini@eu.citrix.com> <501FFFB50200007800092FC7@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <501FFFB50200007800092FC7@nat28.tlf.novell.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: Jan Beulich Cc: "Tim Deegan (3P)" , xen-devel , Ian Campbell , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Mon, 6 Aug 2012, Jan Beulich wrote: > >>> On 06.08.12 at 16:12, Stefano Stabellini > wrote: > > This is an incremental patch on top of > > c0bc926083b5987a3e9944eec2c12ad0580100e2: in order to retain binary > > compatibility, it is better to introduce foreign_domid as part of a > > union containing both size and foreign_domid. > > > > Signed-off-by: Stefano Stabellini > > --- > > xen/include/public/memory.h | 11 +++++++---- > > 1 files changed, 7 insertions(+), 4 deletions(-) > > > > diff --git a/xen/include/public/memory.h b/xen/include/public/memory.h > > index b2adfbe..b0af2fd 100644 > > --- a/xen/include/public/memory.h > > +++ b/xen/include/public/memory.h > > @@ -208,8 +208,12 @@ struct xen_add_to_physmap { > > /* Which domain to change the mapping for. */ > > domid_t domid; > > > > - /* Number of pages to go through for gmfn_range */ > > - uint16_t size; > > + union { > > + /* Number of pages to go through for gmfn_range */ > > + uint16_t size; > > + /* IFF gmfn_foreign */ > > + domid_t foreign_domid; > > + }; > > But you're clear that this isn't standard C, and hence can't go > in this way? > Why? It is c11 if I am not mistaken.