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/
Home Products Support Community News


[Xen-devel] Re: [RFC PATCH 03/35] Add Xen interface header files

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: [Xen-devel] Re: [RFC PATCH 03/35] Add Xen interface header files
From: Hollis Blanchard <hollisb@xxxxxxxxxx>
Date: Tue, 09 May 2006 14:35:09 -0500
Cc: Chris Wright <chrisw@xxxxxxxxxxxx>, virtualization@xxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, Ian Pratt <ian.pratt@xxxxxxxxxxxxx>
Delivery-date: Tue, 09 May 2006 12:34:36 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20060509151516.GA16332@xxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: IBM Linux Technology Center
References: <20060509084945.373541000@xxxxxxxxxxxx> <20060509085147.903310000@xxxxxxxxxxxx> <20060509151516.GA16332@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Tue, 2006-05-09 at 16:15 +0100, Christoph Hellwig wrote:
> > +#ifdef __XEN__
> > +#define __DEFINE_GUEST_HANDLE(name, type) \
> > +    typedef struct { type *p; } __guest_handle_ ## name
> > +#else
> > +#define __DEFINE_GUEST_HANDLE(name, type) \
> > +    typedef type * __guest_handle_ ## name
> > +#endif
> please get rid of all these stupid typedefs 

These typedefs are a new hack to work around a basic interface problem:
instead of explicitly-sized types, Xen uses longs and pointers in its
interface. On PowerPC in particular, where we need a 32-bit userland
communicating with a 64-bit hypervisor, those types don't work.

However, the maintainers are reluctant to switch the interface to use
explicitly-sized types because it would break binary compatibility.
These ugly "HANDLE" macros allow PowerPC to do what we need without
affecting binary compatibility on x86.

Hollis Blanchard
IBM Linux Technology Center

Xen-devel mailing list

<Prev in Thread] Current Thread [Next in Thread>