KVM: nVMX: Reset vmxon_ptr upon VMXOFF emulation.
authorVitaly Kuznetsov <vkuznets@redhat.com>
Wed, 29 Sep 2021 17:51:54 +0000 (01:51 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 30 Sep 2021 08:27:02 +0000 (04:27 -0400)
commitfeb3162f9debbbeee5b00ad5a4e776f826dd9161
treec09ce06c684d580a77ba854ef1cd1e3675037454
parent64c785082c21a88d3c25c2b95f16fe29eb5ee862
KVM: nVMX: Reset vmxon_ptr upon VMXOFF emulation.

Currently, 'vmx->nested.vmxon_ptr' is not reset upon VMXOFF
emulation. This is not a problem per se as we never access
it when !vmx->nested.vmxon. But this should be done to avoid
any issue in the future.

Also, initialize the vmxon_ptr when vcpu is created.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Yu Zhang <yu.c.zhang@linux.intel.com>
Message-Id: <20210929175154.11396-3-yu.c.zhang@linux.intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/nested.c
arch/x86/kvm/vmx/vmx.c