Re: [RFC PATCH v2 05/17] KVM: SVM: Do not intercept SECURE_AVIC_CONTROL MSR for SAVIC guests
From: Upadhyay, Neeraj
Date: Thu Sep 25 2025 - 01:17:00 EST
On 9/23/2025 7:25 PM, Tom Lendacky wrote:
On 9/23/25 00:03, Neeraj Upadhyay wrote:
Disable interception for SECURE_AVIC_CONTROL MSR for Secure AVIC
enabled guests. The SECURE_AVIC_CONTROL MSR holds the GPA of the
guest APIC backing page and bitfields to control enablement of Secure
AVIC and whether the guest allows NMIs to be injected by the hypervisor.
This MSR is populated by the guest and can be read by the guest to get
the GPA of the APIC backing page. The MSR can only be accessed in Secure
AVIC mode; accessing it when not in Secure AVIC mode results in #GP. So,
KVM should not intercept it.
The reason KVM should not intercept the MSR access is that the guest
would not be able to actually set the MSR if it is intercepted.
Yes, something like below looks ok?
Disable interception for SECURE_AVIC_CONTROL MSR for Secure AVIC
enabled guests. The SECURE_AVIC_CONTROL MSR holds the GPA of the
guest APIC backing page and bitfields to control enablement of Secure
AVIC and whether the guest allows NMIs to be injected by the hypervisor.
This MSR is populated by the guest and can be read by the guest to get
the GPA of the APIC backing page. This MSR is only accessible by the
guest when the Secure AVIC feature is active; any other access attempt
will result in a #GP fault. So, KVM should not intercept access to this
MSR, as doing so prevents the guest from successfully reading/writing
its configuration and enabling the feature.
- Neeraj