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: Muli Ben-Yehuda <muli@xxxxxxxxxx>
Subject: Re: [XenPPC] [rfc] [patch] 64-bitize guest handles
From: Hollis Blanchard <hollisb@xxxxxxxxxx>
Date: Wed, 28 Jun 2006 12:11:40 -0500
Cc: xen-ppc-devel <xen-ppc-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 28 Jun 2006 10:11:22 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20060628061557.GA3110@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
References: <1151441941.31429.150.camel@xxxxxxxxxxxxxxxxxxxxx> <20060628061557.GA3110@xxxxxxxxxxxxxxxxxx>
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Wed, 2006-06-28 at 09:15 +0300, Muli Ben-Yehuda wrote:
> On Tue, Jun 27, 2006 at 03:59:00PM -0500, 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
> 
> Is this bit using unsigned long long ...
> > 
> >  #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)
> 
> ... while this one uses unsigned long - on purpose?

Just laziness really; the assignment would work fine. You're right,
though, I should add the extra "long".

-- 
Hollis Blanchard
IBM Linux Technology Center


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