From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH 09/10] xen: remove XEN_GUEST_HANDLE(ulong) Date: Thu, 18 Oct 2012 09:35:42 +0100 Message-ID: <1350549342.28188.46.camel@dagon.hellion.org.uk> References: <1350314418.18058.72.camel@zakaz.uk.xensource.com> <1350314444-17148-9-git-send-email-ian.campbell@citrix.com> <507FC2BF02000078000A2351@nat28.tlf.novell.com> <1350545548.28188.13.camel@dagon.hellion.org.uk> <507FD0D902000078000A23CA@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <507FD0D902000078000A23CA@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 (Xen.org)" , "xen-devel@lists.xen.org" , "Keir (Xen.org)" , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Thu, 2012-10-18 at 08:50 +0100, Jan Beulich wrote: > >>> On 18.10.12 at 09:32, Ian Campbell wrote: > > On Thu, 2012-10-18 at 07:50 +0100, Jan Beulich wrote: > >> >>> On 15.10.12 at 17:20, Ian Campbell wrote: > >> These two must be wrapped in __XEN_INTERFACE_VERSION__ > >> conditionals (and __XEN_LATEST_INTERFACE_VERSION__ needs > >> to be bumped accordingly), since the various guest handles are > >> distinct types (i.e. consumers will fail to build if not updated). > > > > Are there external consumers of gnttab_setup_table? > > We can't know - it's a public, not tools-only interface. Right. > > Nevertheless, here is the fix. > > > > 8<----------------------------------------------------- > > > > # HG changeset patch > > # User Ian Campbell > > # Date 1350544609 -3600 > > # Node ID 68f0f7ed3e7b3b7b4b9dbc692a448421ebc31035 > > # Parent 5c402b905e00fb0871c3f439c8391dd3cfb3bc10 > > xen: retain ulong guest handle for older consumers. > > > > 26072:5529b91bd2e4 removed this but we need to keep it around for > > older consumers. Bump __XEN_LATEST_INTERFACE_VERSION__ accordingly. > > > > Signed-off-by: Ian Campbell > > Acked-by: Jan Beulich Applied, thanks. > > > diff -r 5c402b905e00 -r 68f0f7ed3e7b xen/include/public/grant_table.h > > --- a/xen/include/public/grant_table.h Wed Oct 17 16:43:55 2012 +0100 > > +++ b/xen/include/public/grant_table.h Thu Oct 18 08:16:49 2012 +0100 > > @@ -385,7 +385,11 @@ struct gnttab_setup_table { > > uint32_t nr_frames; > > /* OUT parameters. */ > > int16_t status; /* => enum grant_status */ > > +#if __XEN_INTERFACE_VERSION__ < 0x00040300 > > + XEN_GUEST_HANDLE(ulong) frame_list; > > +#else > > XEN_GUEST_HANDLE(xen_pfn_t) frame_list; > > +#endif > > }; > > typedef struct gnttab_setup_table gnttab_setup_table_t; > > DEFINE_XEN_GUEST_HANDLE(gnttab_setup_table_t); > > diff -r 5c402b905e00 -r 68f0f7ed3e7b xen/include/public/xen-compat.h > > --- a/xen/include/public/xen-compat.h Wed Oct 17 16:43:55 2012 +0100 > > +++ b/xen/include/public/xen-compat.h Thu Oct 18 08:16:49 2012 +0100 > > @@ -27,7 +27,7 @@ > > #ifndef __XEN_PUBLIC_XEN_COMPAT_H__ > > #define __XEN_PUBLIC_XEN_COMPAT_H__ > > > > -#define __XEN_LATEST_INTERFACE_VERSION__ 0x00040200 > > +#define __XEN_LATEST_INTERFACE_VERSION__ 0x00040300 > > > > #if defined(__XEN__) || defined(__XEN_TOOLS__) > > /* Xen is built with matching headers and implements the latest interface. > > */ > > diff -r 5c402b905e00 -r 68f0f7ed3e7b xen/include/public/xen.h > > --- a/xen/include/public/xen.h Wed Oct 17 16:43:55 2012 +0100 > > +++ b/xen/include/public/xen.h Thu Oct 18 08:16:49 2012 +0100 > > @@ -43,6 +43,10 @@ DEFINE_XEN_GUEST_HANDLE(char); > > __DEFINE_XEN_GUEST_HANDLE(uchar, unsigned char); > > DEFINE_XEN_GUEST_HANDLE(int); > > __DEFINE_XEN_GUEST_HANDLE(uint, unsigned int); > > +#if __XEN_INTERFACE_VERSION__ < 0x00040300 > > +DEFINE_XEN_GUEST_HANDLE(long); > > +__DEFINE_XEN_GUEST_HANDLE(ulong, unsigned long); > > +#endif > > DEFINE_XEN_GUEST_HANDLE(void); > > > > DEFINE_XEN_GUEST_HANDLE(uint64_t); > > >