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

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



oops! a typo and an update, see below
On Jun 27, 2006, at 6:15 PM, Jimi Xenidis wrote:
how about:
     struct __guest_handle_struct {
         char __pad[sizeof (long) - sizeof (void *)];
needs to be:
  char __pad[sizeof (u64) - sizeof (void *)];

Also, we will have to set the __pad member to zero or 32bit "creators" will have garbage there, so let make it an u32:

  u32 __pad[(sizeof (u64) - sizeof (void *)) / 4];

and...
-#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)

  #define set_xen_guest_handle(hnd, val) \
      do { \
          if (sizeof ((hnd).__pad)) \
              (hnd).__pad = 0; \
          (hnd).p = val; \
      } while (0)

-JX

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.