[RFC PATCH 19/19] KVM: SVM/SEV: Allow creating VMs with Secure AVIC enabled

Neeraj Upadhyay posted 19 patches 9 months, 2 weeks ago
There is a newer version of this series
[RFC PATCH 19/19] KVM: SVM/SEV: Allow creating VMs with Secure AVIC enabled
Posted by Neeraj Upadhyay 9 months, 2 weeks ago
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@amd.com>
---
 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