[Devel] [PATCH vz9 6/9] ms/KVM: VMX: Don't bother disabling eVMCS static key on module exit

Konstantin Khorenko khorenko at virtuozzo.com
Wed Nov 1 16:38:53 MSK 2023


From: Maxim Levitsky <mlevitsk at redhat.com>

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2177720

commit da66de44b01e9b7fa09731057593850394bf32e4
Author: Sean Christopherson <seanjc at google.com>
Date:   Wed Nov 30 23:08:55 2022 +0000

    KVM: VMX: Don't bother disabling eVMCS static key on module exit

    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 at google.com>
    Message-Id: <20221130230934.1014142-12-seanjc at google.com>
    Signed-off-by: Paolo Bonzini <pbonzini at redhat.com>

Signed-off-by: Maxim Levitsky <mlevitsk at redhat.com>

(cherry picked from CentOS 9 Stream commit 792515ab9ac2)
https://pmc.acronis.work/browse/VSTOR-76102
Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>

Feature: fix ms/KVM
---
 arch/x86/kvm/vmx/vmx.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
index e0c507fcd09e..a47a2b953273 100644
--- a/arch/x86/kvm/vmx/vmx.c
+++ b/arch/x86/kvm/vmx/vmx.c
@@ -8438,10 +8438,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;
-- 
2.39.3



More information about the Devel mailing list