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: Muli Ben-Yehuda <muli@xxxxxxxxxx>
Date: Wed, 28 Jun 2006 09:15:57 +0300
Cc: xen-ppc-devel <xen-ppc-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 27 Jun 2006 23:16:06 -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
User-agent: Mutt/1.5.11
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?

Cheers,
Muli

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