lkml.org 
[lkml]   [2006]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC PATCH 03/35] Add Xen interface header files
From
Date
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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-05-09 21:36    [W:0.109 / U:1.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site