Re: [PATCH 1/3] KVM: SVM: Disable x2AVIC RDMSR interception for MSRs KVM actually supports
From: Sean Christopherson
Date: Wed May 06 2026 - 10:07:13 EST
On Fri, Apr 10, 2026, Sean Christopherson wrote:
> On Fri, Apr 10, 2026, Naveen N Rao wrote:
> > -- we may be interested in specific exits, such as AVIC-related exits for
> > some of the tests...
> > Thoughts?
>
> I don't think we should plan on leveraging per-exit stats for testing purposes,
> as they may never land upstream, and if they do, it will take some time. E.g.
> even though we find them valuable, I'm far from convinced that what we've got
> implemented internally is suitable for upstream.
>
> However! Idea. For many testcases, we don't actually care about *what* exit
> occurred, only if *an* exit occurred (or not). I.e. tests really just need a
> binary yes/no signal. Which we _almost_ have today, except stat.exits is polluted
> with exits that are host-induced/owned (e.g. IRQs and NMIs) and/or asynchronous
> in nature, e.g. the VMX preemption timer (which is arguably host-owned as well).
>
> If KVM provides a stat that increments only on exits that are the direct result
> of a guest action, then we can use that in selftests to detect unexpected (or
> missed) exits, without having to worry about false failures due to noise from
> host IRQs/NMIs/SMIs, etc.
>
> The hardest part is probably figuring out a name :-)
Gah, wrong once again. Because to actually detect the bugs here, where KVM
misconfigures the x2APIC MSR bitmaps, the selftest needs the exact exit reason
so that it can assert that a RDMSR/WRMSR triggered SVM_EXIT_MSR, not
SVM_EXIT_AVIC_UNACCELERATED_ACCESS. *sigh*