qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [QEMU PATCH v3 7/9] KVM: i386: Add support for save and


From: Liran Alon
Subject: Re: [Qemu-devel] [QEMU PATCH v3 7/9] KVM: i386: Add support for save and restore nested state
Date: Tue, 18 Jun 2019 18:40:11 +0300

> On 18 Jun 2019, at 12:03, Dr. David Alan Gilbert <address@hidden> wrote:
> 
> * Liran Alon (address@hidden) wrote:
>> 
>> +static const VMStateDescription vmstate_vmx_vmcs12 = {
>> +    .name = "cpu/kvm_nested_state/vmx/vmcs12",
>> +    .version_id = 1,
>> +    .minimum_version_id = 1,
>> +    .needed = vmx_vmcs12_needed,
>> +    .fields = (VMStateField[]) {
>> +        VMSTATE_UINT8_ARRAY(data.vmx[0].vmcs12,
>> +                            struct kvm_nested_state, 0x1000),
> 
> Where did that magic 0x1000 come from?

Currently, KVM folks (including myself), haven’t decided yet to expose vmcs12 
struct layout to userspace but instead to still leave it opaque.
The formal size of this size is VMCS12_SIZE (defined in kernel as 0x1000). I 
was wondering if we wish to expose VMCS12_SIZE constant to userspace or not.
So currently I defined these __u8 arrays as 0x1000. But in case Paolo agrees to 
expose VMCS12_SIZE, we can use that instead.

-Liran

> --
> Dr. David Alan Gilbert / address@hidden / Manchester, UK




reply via email to

[Prev in Thread] Current Thread [Next in Thread]