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

Re: [Xen-devel] [PATCH 09/10] xen: remove XEN_GUEST_HANDLE(ulong)



On Thu, 2012-10-18 at 07:50 +0100, Jan Beulich wrote:
> >>> On 15.10.12 at 17:20, Ian Campbell <ian.campbell@xxxxxxxxxx> wrote:
> > --- a/xen/include/public/grant_table.h
> > +++ b/xen/include/public/grant_table.h
> > @@ -385,7 +385,7 @@ struct gnttab_setup_table {
> >      uint32_t nr_frames;
> >      /* OUT parameters. */
> >      int16_t  status;              /* => enum grant_status */
> > -    XEN_GUEST_HANDLE(ulong) frame_list;
> > +    XEN_GUEST_HANDLE(xen_pfn_t) frame_list;
> >  };
> >  typedef struct gnttab_setup_table gnttab_setup_table_t;
> >  DEFINE_XEN_GUEST_HANDLE(gnttab_setup_table_t);
> > --- a/xen/include/public/xen.h
> > +++ b/xen/include/public/xen.h
> > @@ -43,8 +43,6 @@ DEFINE_XEN_GUEST_HANDLE(char);
> >  __DEFINE_XEN_GUEST_HANDLE(uchar, unsigned char);
> >  DEFINE_XEN_GUEST_HANDLE(int);
> >  __DEFINE_XEN_GUEST_HANDLE(uint,  unsigned int);
> > -DEFINE_XEN_GUEST_HANDLE(long);
> > -__DEFINE_XEN_GUEST_HANDLE(ulong, unsigned long);
> >  DEFINE_XEN_GUEST_HANDLE(void);
> >  
> >  DEFINE_XEN_GUEST_HANDLE(uint64_t);
> 
> 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?

Nevertheless, here is the fix.

8<-----------------------------------------------------

# HG changeset patch
# User Ian Campbell <ijc@xxxxxxxxxxxxxx>
# 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 <ian.campbell@xxxxxxxxxx>

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);



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