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. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel