[RFC PATCH 19/19] KVM: SVM/SEV: Allow creating VMs with Secure AVIC enabled
From: Neeraj Upadhyay
Date: Fri Feb 28 2025 - 04:29:38 EST
Now that all the initialization required to enable secure AVIC is done,
set supported_vmsa_features to allow creating Secure AVIC VMs.
Signed-off-by: Neeraj Upadhyay <Neeraj.Upadhyay@xxxxxxx>
---
arch/x86/kvm/svm/sev.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c
index 881311227504..6b1ce8bc490c 100644
--- a/arch/x86/kvm/svm/sev.c
+++ b/arch/x86/kvm/svm/sev.c
@@ -3100,6 +3100,9 @@ void __init sev_hardware_setup(void)
if (sev_es_enabled && cpu_feature_enabled(X86_FEATURE_ALLOWED_SEV_FEATURES))
sev_supported_vmsa_features |= SVM_SEV_FEAT_ALLOWED_SEV_FEATURES;
+
+ if (sev_snp_savic_enabled)
+ sev_supported_vmsa_features |= SVM_SEV_FEAT_SECURE_AVIC;
}
void sev_hardware_unsetup(void)
--
2.34.1