Re: [PATCH v3 1/3] KVM: x86: Add dedicated API for getting mask of accelerated x2APIC MSRs
From: Naveen N Rao
Date: Fri May 15 2026 - 10:29:35 EST
On Thu, May 14, 2026 at 02:31:13PM -0700, Sean Christopherson wrote:
> Add a dedicated local APIC API, kvm_x2apic_disable_intercept_reg_mask(),
> to provide the mask of x2APIC registers whose MSRs can and should be passed
> through to the guest when x2APIC virtualization is enable, and use it in
> lieu of the open-coded equivalent VMX logic. Providing a common helper
> will allow sharing the logic with SVM (x2AVIC), and as a bonus eliminates
> the somewhat confusing code where KVM enables interception for MSR_TYPE_RW,
> even though only the READ case actually needs to be updated.
I thought you discarded this patch based on your response to v2. I now
realize you were only referring to not unifying the WRMSR interception
paths (d'uh!)
This LGTM.
Reviewed-by: Naveen N Rao (AMD) <naveen@xxxxxxxxxx>
Thanks,
Naveen