Skip to content

Commit fbc722a

Browse files
sean-jcbonzini
authored andcommitted
KVM: VMX: Rename "KVM is using eVMCS" static key to match its wrapper
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>
1 parent 19f1031 commit fbc722a

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

arch/x86/kvm/vmx/hyperv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ int nested_evmcs_check_controls(struct vmcs12 *vmcs12)
609609
}
610610

611611
#if IS_ENABLED(CONFIG_HYPERV)
612-
DEFINE_STATIC_KEY_FALSE(enable_evmcs);
612+
DEFINE_STATIC_KEY_FALSE(__kvm_is_using_evmcs);
613613

614614
/*
615615
* KVM on Hyper-V always uses the latest known eVMCSv1 revision, the assumption

arch/x86/kvm/vmx/hyperv.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ static inline u64 evmcs_read_any(struct hv_enlightened_vmcs *evmcs,
6767

6868
#if IS_ENABLED(CONFIG_HYPERV)
6969

70-
DECLARE_STATIC_KEY_FALSE(enable_evmcs);
70+
DECLARE_STATIC_KEY_FALSE(__kvm_is_using_evmcs);
7171

7272
static __always_inline bool kvm_is_using_evmcs(void)
7373
{
74-
return static_branch_unlikely(&enable_evmcs);
74+
return static_branch_unlikely(&__kvm_is_using_evmcs);
7575
}
7676

7777
static __always_inline int get_evmcs_offset(unsigned long field,

arch/x86/kvm/vmx/vmx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ static __init void hv_init_evmcs(void)
579579

580580
if (enlightened_vmcs) {
581581
pr_info("Using Hyper-V Enlightened VMCS\n");
582-
static_branch_enable(&enable_evmcs);
582+
static_branch_enable(&__kvm_is_using_evmcs);
583583
}
584584

585585
if (ms_hyperv.nested_features & HV_X64_NESTED_DIRECT_FLUSH)

0 commit comments

Comments
 (0)