|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] Structure packing when using hypercall.
On 22/10/07 22:55, "Roger Cruz" <rcruz@xxxxxxxxxxxxxxxxxxxxxxxx> wrote:
> Thanks Keir, but I didn't see anything in that file dealing specifically
> with packing issues. Did I miss it?
There's only one example right now: do_memory_op_compat32(). The only valid
grant table operation currently is GNTTABOP_query_size, which does not need
32-to-64 conversion. Other grant-table operations will need treatment
similar to memory_op().
> What I was looking for was public hypercall header files that would work
> no matter what OS/compiler the guest application and the hypersor were
> built with. There doesn't appear to be any #pragma pack around the
> grant_table.h header files that would force fields to some specific
> alignment.
Yes, we used to have gcc-specific packing attributes, but that got
complaints from those who don't use gcc to build their OS. So we ended up
with vanilla header files and the hypervisor ABI is defined by those header
files interpreted according to the Linux/x86 C ABI rules. If you need
different then you have to hand tweak. It'd be great to script generation of
appropriate header files -- we could put the source header files in a more
formal format to aid that -- but I don't think anyone is immediately likely
to step forward to do that. It could also allow us to clean up the
hand-crafted 32-on-64 compat goop (there's not much of it for HVM guests as
yet, but there's quite a lot for 32-on-64 PV!) by auto-generating some more
of that too.
At least you only have to hand-tweak once -- the hypervisor interfaces
aren't changing and you probably only use a small subset of the hypercalls.
-- Keir
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|