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)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 29 Dec 2022 20:40:57 +0000 (15:40 -0500)
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>
arch/x86/kvm/vmx/vmx.c

index a68d1adfd66bd6ccf19b3ec2d73d9a9368d3e1fa..d9139738dd2cde81daf31063b15a084bc19b1605 100644 (file)
@@ -8533,10 +8533,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;