|
|
|
|
|
|
|
|
|
|
xen-ppc-devel
[XenPPC] [rfc] [patch] 64-bitize guest handles
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
|
|
|
|
|