qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] i386/kvm: Do not sync nested state during runti


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH] i386/kvm: Do not sync nested state during runtime
Date: Mon, 22 Jul 2019 13:23:26 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

On 22/07/19 12:43, Jan Kiszka wrote:
>> Currently QEMU writes to userspace maintained nested-state only at 
>> kvm_arch_init_vcpu() and
>> when loading vmstate_nested_state vmstate subsection.
>> kvm_arch_reset_vcpu() do not modify userspace maintained nested-state.
> Hmm, then we probably achieve that effect by clearing the related bit in CR4.

Almost: by clearing the VMX enable bit in MSR_IA32_FEATURE_CONTROL.
Actually I think you contributed that. :)

I think we could in principle skip that MSR write if env->nested_state
!= NULL, but it doesn't hurt either, and it makes sense that nested virt
state goes together with MSR_IA32_FEATURE_CONTROL since the latter is
indede nested virtualization related.

Paolo

> If doing that implies an invalidation of the nested state by KVM, we
> are fine. Otherwise, I would expect userspace to reset the state to
> VMCLEAR and purge any traces of prior use.



reply via email to

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