[PATCH v5 16/25] KVM: VMX: Mark __kvm_is_using_evmcs static key as __ro_after_init
Valentin Schneider
vschneid at redhat.com
Tue Apr 29 04:32:33 PDT 2025
The static key is only ever enabled in
__init hv_init_evmcs()
so mark it appropriately as __ro_after_init.
Reported-by: Sean Christopherson <seanjc at google.com>
Signed-off-by: Valentin Schneider <vschneid at redhat.com>
---
arch/x86/kvm/vmx/vmx_onhyperv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kvm/vmx/vmx_onhyperv.c b/arch/x86/kvm/vmx/vmx_onhyperv.c
index b9a8b91166d02..ff3d80c9565bb 100644
--- a/arch/x86/kvm/vmx/vmx_onhyperv.c
+++ b/arch/x86/kvm/vmx/vmx_onhyperv.c
@@ -3,7 +3,7 @@
#include "capabilities.h"
#include "vmx_onhyperv.h"
-DEFINE_STATIC_KEY_FALSE(__kvm_is_using_evmcs);
+DEFINE_STATIC_KEY_FALSE_RO(__kvm_is_using_evmcs);
/*
* KVM on Hyper-V always uses the latest known eVMCSv1 revision, the assumption
--
2.49.0
More information about the linux-riscv
mailing list