[RFC PATCH v3 07/27] KVM: SVM: Set guest_apic_protected if Secure AVIC is enabled
From: Naveen N Rao (AMD)
Date: Wed Jul 08 2026 - 02:41:52 EST
Mark the guest APIC as protected if Secure AVIC is enabled.
Signed-off-by: Naveen N Rao (AMD) <naveen@xxxxxxxxxx>
---
arch/x86/kvm/svm/avic.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/x86/kvm/svm/avic.c b/arch/x86/kvm/svm/avic.c
index c5b1d294b15a..7340c9e251e0 100644
--- a/arch/x86/kvm/svm/avic.c
+++ b/arch/x86/kvm/svm/avic.c
@@ -884,6 +884,9 @@ int avic_init_vcpu(struct vcpu_svm *svm)
if (!enable_apicv || !irqchip_in_kernel(vcpu->kvm))
return 0;
+ if (snp_is_secure_avic_enabled(vcpu->kvm))
+ vcpu->arch.apic->guest_apic_protected = true;
+
ret = avic_init_backing_page(vcpu);
if (ret)
return ret;
--
2.54.0