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

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

To: Hollis Blanchard <hollisb@xxxxxxxxxx>
Subject: Re: [XenPPC] [rfc] [patch] 64-bitize guest handles
From: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
Date: Tue, 27 Jun 2006 18:15:35 -0400
Cc: xen-ppc-devel <xen-ppc-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 27 Jun 2006 15:15:46 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1151441941.31429.150.camel@xxxxxxxxxxxxxxxxxxxxx>
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>
References: <1151441941.31429.150.camel@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
I think you'll like this.

On Jun 27, 2006, at 4:59 PM, Hollis Blanchard wrote:

 #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

how about:
     struct __guest_handle_struct {
         char __pad[sizeof (long) - sizeof (void *)];
         type *p;
     } __attribute__((__aligned__(8)));
 #define __DEFINE_XEN_GUEST_HANDLE(name, type) \
     typedef struct __guest_handle_struct __guest_handle_ ## name

That way no matter who which ABI reads it 'p' is "correct" then, I think, the rest of the diff can go.

-JX

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