]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
KVM: SVM: Use str_enabled_disabled() helper in svm_hardware_setup()
authorThorsten Blum <thorsten.blum@linux.dev>
Fri, 10 Jan 2025 10:11:00 +0000 (11:11 +0100)
committerSean Christopherson <seanjc@google.com>
Fri, 10 Jan 2025 14:56:20 +0000 (06:56 -0800)
Remove hard-coded strings by using the str_enabled_disabled() helper
function.

Suggested-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://lore.kernel.org/r/20250110101100.272312-2-thorsten.blum@linux.dev
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/svm/svm.c

index f39724bf26be16ff98482385e585f1c8fc3aa793..7367976bbdfaa14e689c170cbe7374817b1f5d15 100644 (file)
@@ -28,6 +28,7 @@
 #include <linux/rwsem.h>
 #include <linux/cc_platform.h>
 #include <linux/smp.h>
+#include <linux/string_choices.h>
 
 #include <asm/apic.h>
 #include <asm/perf_event.h>
@@ -5332,7 +5333,7 @@ static __init int svm_hardware_setup(void)
        /* Force VM NPT level equal to the host's paging level */
        kvm_configure_mmu(npt_enabled, get_npt_level(),
                          get_npt_level(), PG_LEVEL_1G);
-       pr_info("Nested Paging %sabled\n", npt_enabled ? "en" : "dis");
+       pr_info("Nested Paging %s\n", str_enabled_disabled(npt_enabled));
 
        /* Setup shadow_me_value and shadow_me_mask */
        kvm_mmu_set_me_spte_mask(sme_me_mask, sme_me_mask);