public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Naveen N Rao <naveen@kernel.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	 Alejandro Jimenez <alejandro.j.jimenez@oracle.com>
Subject: Re: [PATCH 1/3] KVM: SVM: Disable x2AVIC RDMSR interception for MSRs KVM actually supports
Date: Wed, 6 May 2026 07:07:00 -0700	[thread overview]
Message-ID: <aftLBDM1dF_xHmo8@google.com> (raw)
In-Reply-To: <adlNjCRRCur8mjCA@google.com>

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*

  reply	other threads:[~2026-05-06 14:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-09 22:24 [PATCH 0/3] KVM: SVM: Fix x2AVIC MSR interception mess Sean Christopherson
2026-04-09 22:24 ` [PATCH 1/3] KVM: SVM: Disable x2AVIC RDMSR interception for MSRs KVM actually supports Sean Christopherson
2026-04-10 16:45   ` Naveen N Rao
2026-04-10 19:20     ` Sean Christopherson
2026-05-06 14:07       ` Sean Christopherson [this message]
2026-04-09 22:24 ` [PATCH 2/3] KVM: SVM: Always intercept RDMSR for TMCCT (current APIC timer count) Sean Christopherson
2026-04-09 22:24 ` [PATCH 3/3] KVM: SVM: Only disable x2AVIC WRMSR interception for MSRs that are accelerated Sean Christopherson
2026-04-10 16:53   ` Naveen N Rao
2026-04-10 17:19     ` Sean Christopherson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aftLBDM1dF_xHmo8@google.com \
    --to=seanjc@google.com \
    --cc=alejandro.j.jimenez@oracle.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=naveen@kernel.org \
    --cc=pbonzini@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox