]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
KVM: VMX: Don't bother disabling eVMCS static key on module exit
authorSean Christopherson <seanjc@google.com>
Wed, 30 Nov 2022 23:08:55 +0000 (23:08 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Mar 2023 07:57:49 +0000 (08:57 +0100)
[ Upstream commit da66de44b01e9b7fa09731057593850394bf32e4 ]

Don't disable the eVMCS static key on module exit, kvm_intel.ko owns the
key so there can't possibly be users after the kvm_intel.ko is unloaded,
at least not without much bigger issues.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20221130230934.1014142-12-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Stable-dep-of: e32b120071ea ("KVM: VMX: Do _all_ initialization before exposing /dev/kvm to userspace")
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/kvm/vmx/vmx.c

index 4e2a321097d7886e658f05c7dd0f485475ad3685..4389d4c341ca2ebef456823eb4587840847d267f 100644 (file)
@@ -8530,10 +8530,6 @@ static void vmx_exit(void)
 
        kvm_exit();
 
-#if IS_ENABLED(CONFIG_HYPERV)
-       if (static_branch_unlikely(&enable_evmcs))
-               static_branch_disable(&enable_evmcs);
-#endif
        vmx_cleanup_l1d_flush();
 
        allow_smaller_maxphyaddr = false;