[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v3 07/32] xen/x86: fix arch_set_info_guest for HVM guests

On Fri, 2015-07-24 at 12:11 +0100, Andrew Cooper wrote:
> To avoid making the 32bit (and optionally 16bit) massive as a side 
> effect of 64bit, can I suggest
> uint32_t flags;
> union {
>      cpu_hvm32_regs;
>      cpu_hvm64_regs;
> };
> Which allows hvm32_regs to be a far smaller structure.

Given that you can't really know apriori which mode an HVM vcpu is in
and that having to pick the right half of the union everywhere is faff
for everyone on both sides of the API I'd suggest going with a single
struct as far as possible Perhaps with a union to allow the use of 32-
and 64-bit _names_ for things which are the same underlying register in
different widths (rip/pc, eax/rax etc), but that would be it.


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.