]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: nVMX: Make setup/unsetup under the same conditions
authorPeng Hao <flyingpeng@tencent.com>
Tue, 22 Feb 2022 10:40:54 +0000 (18:40 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 25 Feb 2022 13:20:13 +0000 (08:20 -0500)
commitd70d26a9534b08f9cd7db4db19970f35925913fd
tree08b1c43746eab7ec31ec6953cd01485a4b4dc053
parent0dd27b4774a9d8696d91d194de13ea5f57443c46
KVM: nVMX: Make setup/unsetup under the same conditions

Make sure nested_vmx_hardware_setup/unsetup() are called in pairs under
the same conditions.  Calling nested_vmx_hardware_unsetup() when nested
is false "works" right now because it only calls free_page() on zero-
initialized pointers, but it's possible that more code will be added to
nested_vmx_hardware_unsetup() in the future.

Reviewed-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Peng Hao <flyingpeng@tencent.com>
Message-Id: <20220222104054.70286-1-flyingpeng@tencent.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/vmx.c