@@ -1057,8 +1057,8 @@ static int avic_ga_log_notifier(u32 ga_tag)
}
/*
- * Get maximum number of encrypted guest supported: Fn8001_001F[ECX].
- * [31:0]: Number of supported guest
+ * Get the maximum number of encrypted guests:
+ * Fn8001_001F[ECX][31:0]: Number of supported guests.
*/
static __init void sev_hardware_setup(void)
{
@@ -1096,12 +1096,12 @@ static __init int svm_hardware_setup(void)
}
if (sev) {
- if (!boot_cpu_has(X86_FEATURE_SEV) ||
- !IS_ENABLED(CONFIG_KVM_AMD_SEV)) {
- sev = false;
- } else {
+ if (boot_cpu_has(X86_FEATURE_SEV) &&
+ IS_ENABLED(CONFIG_KVM_AMD_SEV)) {
sev_hardware_setup();
pr_info("SEV supported\n");
+ } else {
+ sev = false;
}
}