Re: [PATCH 3/3] KVM: SVM: Only disable x2AVIC WRMSR interception for MSRs that are accelerated
From: Sean Christopherson
Date: Fri Apr 10 2026 - 13:20:51 EST
On Fri, Apr 10, 2026, Naveen N Rao wrote:
> On Thu, Apr 09, 2026 at 03:24:49PM -0700, Sean Christopherson wrote:
> > When x2AVIC is enabled, disable WRMSR interception only for MSRs that are
> > actually accelerated by hardware. Disabling interception for MSRs that
> > aren't accelerated is functionally "fine", but very suboptimal as many
> > accesses generate AVIC_UNACCELERATED_ACCESS fault #VMEXITs, which requires
> > KVM to decode the instruction to figure out what the guest was trying to
> > access.
>
> Not sure I follow: as far as I can see, most writes are actually trapped
> except for MSRs that are supposed to be RO?
Yeah, that's what I was trying to say by "only for MSRs that are actually
accelerated by hardware". Oh, but that's bad verbiage, because trap-like
#VMEXITs are also due to lack of acceleration, it's specifically "software is
being stupid" that triggers fault-like exits.