KVM: VMX: Switch __vmx_exit() and kvm_x86_vendor_exit() in vmx_exit()
authorKai Huang <kai.huang@intel.com>
Thu, 27 Jun 2024 01:05:24 +0000 (13:05 +1200)
committerSean Christopherson <seanjc@google.com>
Fri, 28 Jun 2024 15:58:23 +0000 (08:58 -0700)
commit92c1e3cbf0d02916ae0c6fc3b78864dcb77624ad
tree98f307925ae250537400944d43e54ebedace6de9
parent23b2c5088d01dc7dfdb68aab76a7757704f09c6e
KVM: VMX: Switch __vmx_exit() and kvm_x86_vendor_exit() in vmx_exit()

In the vmx_init() error handling path, the __vmx_exit() is done before
kvm_x86_vendor_exit().  They should follow the same order in vmx_exit().

But currently __vmx_exit() is done after kvm_x86_vendor_exit() in
vmx_exit().  Switch the order of them to fix.

Fixes: e32b120071ea ("KVM: VMX: Do _all_ initialization before exposing /dev/kvm to userspace")
Signed-off-by: Kai Huang <kai.huang@intel.com>
Link: https://lore.kernel.org/r/20240627010524.3732488-1-kai.huang@intel.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/vmx/vmx.c