Skip to content

Commit ce4253e

Browse files
committed
KVM: SVM: Always print "AVIC enabled" separately, even when force enabled
Print the customary "AVIC enabled" informational message even when AVIC is force enabled on a system that doesn't advertise supported for AVIC in CPUID, as not printing the standard message can confuse users and tools. Opportunistically clean up the scary message when AVIC is force enabled, but keep it as separate message so that it is printed at level "warn", versus the standard message only being printed for level "info". Suggested-by: Naveen N Rao (AMD) <[email protected]> Reviewed-by: Naveen N Rao (AMD) <[email protected]> Tested-by: Naveen N Rao (AMD) <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sean Christopherson <[email protected]>
1 parent a9095e4 commit ce4253e

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

arch/x86/kvm/svm/avic.c

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,16 +1167,15 @@ bool __init avic_hardware_setup(void)
11671167
return false;
11681168
}
11691169

1170-
if (boot_cpu_has(X86_FEATURE_AVIC)) {
1171-
pr_info("AVIC enabled\n");
1172-
} else if (force_avic) {
1173-
/*
1174-
* Some older systems does not advertise AVIC support.
1175-
* See Revision Guide for specific AMD processor for more detail.
1176-
*/
1177-
pr_warn("AVIC is not supported in CPUID but force enabled");
1178-
pr_warn("Your system might crash and burn");
1179-
}
1170+
/*
1171+
* Print a scary message if AVIC is force enabled to make it abundantly
1172+
* clear that ignoring CPUID could have repercussions. See Revision
1173+
* Guide for specific AMD processor for more details.
1174+
*/
1175+
if (!boot_cpu_has(X86_FEATURE_AVIC))
1176+
pr_warn("AVIC unsupported in CPUID but force enabled, your system might crash and burn\n");
1177+
1178+
pr_info("AVIC enabled\n");
11801179

11811180
/* AVIC is a prerequisite for x2AVIC. */
11821181
x2avic_enabled = boot_cpu_has(X86_FEATURE_X2AVIC);

0 commit comments

Comments
 (0)