x86/kvm: Make kvm_async_pf_enabled __ro_after_init
authorValentin Schneider <vschneid@redhat.com>
Wed, 13 Mar 2024 18:01:05 +0000 (19:01 +0100)
committerIngo Molnar <mingo@kernel.org>
Fri, 22 Mar 2024 10:18:19 +0000 (11:18 +0100)
kvm_async_pf_enabled is only ever enabled in __init kvm_guest_init(), so
mark it as __ro_after_init.

Signed-off-by: Valentin Schneider <vschneid@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Sean Christopherson <seanjc@google.com>
Acked-by: Josh Poimboeuf <jpoimboe@kernel.org>
Link: https://lore.kernel.org/r/20240313180106.2917308-4-vschneid@redhat.com
arch/x86/kernel/kvm.c

index 4cadfd606e8e6a9f16a10eec4fdf85ac9b67f575..31a48bae2392d6a4ad26bcbb01e812a7eb4bfdaf 100644 (file)
@@ -44,7 +44,7 @@
 #include <asm/svm.h>
 #include <asm/e820/api.h>
 
-DEFINE_STATIC_KEY_FALSE(kvm_async_pf_enabled);
+DEFINE_STATIC_KEY_FALSE_RO(kvm_async_pf_enabled);
 
 static int kvmapf = 1;