KVM: VMX: Rename "KVM is using eVMCS" static key to match its wrapper
authorSean Christopherson <seanjc@google.com>
Sat, 11 Feb 2023 00:35:34 +0000 (00:35 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 14 Mar 2023 14:28:58 +0000 (10:28 -0400)
Rename enable_evmcs to __kvm_is_using_evmcs to match its wrapper, and to
avoid confusion with enabling eVMCS for nested virtualization, i.e. have
"enable eVMCS" be reserved for "enable eVMCS support for L1".

No functional change intended.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20230211003534.564198-4-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/hyperv.c
arch/x86/kvm/vmx/hyperv.h
arch/x86/kvm/vmx/vmx.c

index 274fbd3..79450e1 100644 (file)
@@ -609,7 +609,7 @@ int nested_evmcs_check_controls(struct vmcs12 *vmcs12)
 }
 
 #if IS_ENABLED(CONFIG_HYPERV)
-DEFINE_STATIC_KEY_FALSE(enable_evmcs);
+DEFINE_STATIC_KEY_FALSE(__kvm_is_using_evmcs);
 
 /*
  * KVM on Hyper-V always uses the latest known eVMCSv1 revision, the assumption
index a54a2fd..9623fe1 100644 (file)
@@ -67,11 +67,11 @@ static inline u64 evmcs_read_any(struct hv_enlightened_vmcs *evmcs,
 
 #if IS_ENABLED(CONFIG_HYPERV)
 
-DECLARE_STATIC_KEY_FALSE(enable_evmcs);
+DECLARE_STATIC_KEY_FALSE(__kvm_is_using_evmcs);
 
 static __always_inline bool kvm_is_using_evmcs(void)
 {
-       return static_branch_unlikely(&enable_evmcs);
+       return static_branch_unlikely(&__kvm_is_using_evmcs);
 }
 
 static __always_inline int get_evmcs_offset(unsigned long field,
index 09e07fb..f777509 100644 (file)
@@ -579,7 +579,7 @@ static __init void hv_init_evmcs(void)
 
                if (enlightened_vmcs) {
                        pr_info("Using Hyper-V Enlightened VMCS\n");
-                       static_branch_enable(&enable_evmcs);
+                       static_branch_enable(&__kvm_is_using_evmcs);
                }
 
                if (ms_hyperv.nested_features & HV_X64_NESTED_DIRECT_FLUSH)