|
[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 24.07.15 at 13:11, <andrew.cooper3@xxxxxxxxxx> wrote:
>
> On 24/07/15 10:59, Roger Pau Monnà wrote:
>> El 24/07/15 a les 10.22, Jan Beulich ha escrit:
>>>>>> On 23.07.15 at 19:12, <andrew.cooper3@xxxxxxxxxx> wrote:
>>>> I would go with Jan's suggestion and make
>>>> XEN_DOMCTL_{get/set}vcpucontext ineligible for use on HVM guests.
>>> Plus, as you said earlier, a new VCPUOP_initialize.
>> (Adding the Linux maintainers to get their opinion on the interface)
>>
>> Just to recap and to make sure I got all the points:
>>
>> - vCPU initialization from the toolstack (BSP initialization) is going
>> to be done using XEN_DOMCTL_sethvmcontext.
>> - XEN_DOMCTL_{get/set}vcpucontext is going to return EOPNOTSUPP for
>> HVM guests.
>> - A new vcpu_guest_contatext (vcpu_hvm_context?) is going to be
>> introduced together with a a new VCPUOP_initialize hypercall
>> (VCPUOP_hvm_initialize?).
>>
>> The following is a layout proposal for the new vcpu_context:
>>
>> struct vcpu_hvm_context {
>> /* 32bit fields of the structure will be used. */
>> #define _VCPUHVM_MODE_32B 0
>> #define VCPUHVM_MODE_32B (1<<_VCPUHVM_MODE_32B)
>> /* 64bit fields of the structure will be used. */
>> #define _VCPUHVM_MODE_64B 1
>> #define VCPUHVM_MODE_64B (1<<_VCPUHVM_MODE_64B)
>> #define _VCPUHVM_online 2
>> #define VCPUHVM_online (1<<_VCPUHVM_online )
>> uint32_t flags; /* VCPUHVM_* flags. */
>> struct cpu_hvm_regs user_regs; /* CPU registers. */
>> };
>
> 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.
But that wouldn't help the size of the overall structure.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |