|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] 32/64-bit hypercall interface
I was looking at the definition of privcmd_hypercall:
typedef struct privcmd_hypercall
{
unsigned long op;
unsigned long arg[5];
} privcmd_hypercall_t;
For ppc64, we are using 32-bit management tools, so this is a problem: they
will create structs where long is 32 bits, and the (64-bit) kernel and
hypervisor will expect structs where long is 64 bits.
The standard (and awkward) way of dealing with the privcmd ioctl is to create
an in-kernel privcmd_hypercall_t, copy the 32-bit values into it field by
field, and then pass *that* struct on to privcmd_ioctl(). Of course, that's
only for legacy interfaces; for all new interfaces, we can just design them
properly so that their size and alignment doesn't change.
There are also longs in some of the dom0_op sub-structures. For example:
typedef struct {
/* IN variables. */
domid_t domain;
unsigned long max_memkb;
} dom0_setdomainmaxmem_t;
I suggest that all longs in these structures be converted to u32.
--
Hollis Blanchard
IBM Linux Technology Center
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] 32/64-bit hypercall interface,
Hollis Blanchard <=
|
|
|
|
|