Re: [PATCH] KVM: SVM: Flush the current TLB when transitioning from xAVIC => x2AVIC

From: Sean Christopherson

Date: Wed May 27 2026 - 14:11:30 EST


On Fri, 15 May 2026 10:15:36 -0700, Sean Christopherson wrote:
> Flush the current TLB when xAVIC *or* x2AVIC is activated, as KVM is
> (apparently) responsible for purging TLB entries when transitioning from
> xAVIC to x2AVIC. The APM says a whole lot of nothing about TLB flushing
> with respect to (x2)AVIC, but empirical data strongly suggests hardware
> also does a whole lot of nothing.
>
> Failure to flush the TLB when enabling x2AVIC can lead to guest accesses
> to the APIC base address getting incorrectly redirected to the virtual
> APIC page. The flaw most visibly manifests as failures in KVM-Unit-Test's
> verify_disabled_apic_mmio() testcase when x2APIC is enabled (though for
> reasons unknown, the test only reliably fails with EFI builds).
>
> [...]

Applied to kvm-x86 fixes, thanks!

[1/1] KVM: SVM: Flush the current TLB when transitioning from xAVIC => x2AVIC
https://github.com/kvm-x86/linux/commit/a9e18aa3263f

--
https://github.com/kvm-x86/linux/tree/next