WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ppc-devel

[XenPPC] [rfc] [patch] 64-bitize guest handles

To: xen-ppc-devel <xen-ppc-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [XenPPC] [rfc] [patch] 64-bitize guest handles
From: Hollis Blanchard <hollisb@xxxxxxxxxx>
Date: Tue, 27 Jun 2006 15:59:00 -0500
Delivery-date: Tue, 27 Jun 2006 13:59:37 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ppc-devel-request@lists.xensource.com?subject=help>
List-id: Xen PPC development <xen-ppc-devel.lists.xensource.com>
List-post: <mailto:xen-ppc-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: IBM Linux Technology Center
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
Jimi, does this work for you?

diff -r d6a49aaee312 xen/include/asm-ppc/guest_access.h
--- a/xen/include/asm-ppc/guest_access.h        Mon Jun 26 16:08:27 2006 -0500
+++ b/xen/include/asm-ppc/guest_access.h        Tue Jun 27 15:57:57 2006 -0500
@@ -39,7 +39,7 @@ extern void xencomm_add_offset(void *han
 /* Cast a guest handle to the specified type of handle. */
 #define guest_handle_cast(hnd, type) ({         \
     type *_x = (hnd).p;                         \
-    (XEN_GUEST_HANDLE(type)) { _x };                \
+    (XEN_GUEST_HANDLE(type)) _x;                \
 })

 /* Since we run in real mode, we can safely access all addresses. That also
diff -r d6a49aaee312 xen/include/public/arch-ppc64.h
--- a/xen/include/public/arch-ppc64.h   Mon Jun 26 16:08:27 2006 -0500
+++ b/xen/include/public/arch-ppc64.h   Tue Jun 27 15:57:57 2006 -0500
@@ -27,11 +27,12 @@
 #endif

 #define __DEFINE_XEN_GUEST_HANDLE(name, type) \
-    typedef struct { type *p; } __guest_handle_ ## name
+    typedef union { unsigned long long l; type *p; } __guest_handle_ ## name

 #define DEFINE_XEN_GUEST_HANDLE(name) __DEFINE_XEN_GUEST_HANDLE(name, name)
 #define XEN_GUEST_HANDLE(name)        __guest_handle_ ## name
-#define set_xen_guest_handle(hnd, val)  do { (hnd).p = val; } while (0)
+#define set_xen_guest_handle(hnd, val) \
+    do { (hnd).l = (unsigned long)(void *)val; } while (0)
 #ifdef __XEN_TOOLS__
 #define get_xen_guest_handle(val, hnd)  do { val = (hnd).p; } while (0)
 #endif


-- 
Hollis Blanchard
IBM Linux Technology Center


_______________________________________________
Xen-ppc-devel mailing list
Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ppc-devel