All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: "Maciej S. Szmigiero" <mail@maciej.szmigiero.name>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Naveen N Rao <naveen@kernel.org>,
	 Maxim Levitsky <mlevitsk@redhat.com>,
	Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>,
	 Alejandro Jimenez <alejandro.j.jimenez@oracle.com>,
	kvm@vger.kernel.org,  linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] KVM: selftests: Test TPR / CR8 sync and interrupt masking
Date: Fri, 17 Oct 2025 09:09:50 -0700	[thread overview]
Message-ID: <aPJqToq-589NovVS@google.com> (raw)
In-Reply-To: <ad3b910a-ff83-4738-888b-5432d09de073@maciej.szmigiero.name>

On Fri, Oct 17, 2025, Maciej S. Szmigiero wrote:
> On 25.09.2025 12:43, Naveen N Rao wrote:
> > On Tue, Sep 23, 2025 at 07:32:14PM +0200, Maciej S. Szmigiero wrote:
> > > From: "Maciej S. Szmigiero" <maciej.szmigiero@oracle.com>
> > > 
> > > Add a few extra TPR / CR8 tests to x86's xapic_state_test to see if:
> > > * TPR is 0 on reset,
> > > * TPR, PPR and CR8 are equal inside the guest,
> > > * TPR and CR8 read equal by the host after a VMExit
> > > * TPR borderline values set by the host correctly mask interrupts in the
> > > guest.
> > > 
> > > These hopefully will catch the most obvious cases of improper TPR sync or
> > > interrupt masking.
> > > 
> > > Do these tests both in x2APIC and xAPIC modes.
> > > The x2APIC mode uses SELF_IPI register to trigger interrupts to give it a
> > > bit of exercise too.
> > > 
> > > Signed-off-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com>
> > 
> > Acked-by: Naveen N Rao (AMD) <naveen@kernel.org>
> > 
> 
> Was this patch picked up or are there any other review comments here?
> I can't seem to find it in any KVM upstream tree.

Not applied yet, though it's in my queue to look at.

The main reason for the delay is that I think I made a mistake by shoving the ICR
test into xapic_state_test.c. Bundling the ICR test with APIC ID tests was "fine"
at the time, but it obviously encourages using the test as a dumping ground for
similar APIC tests.  And I don't want selftests to end up like KUT where there
are these huge, inscrutable tests that are painful to debug.

So I don't want to apply this patch before deciding whether or not to split
xapic_state_test.c, e.g. into xapic_id_test.c and xapic_icr_test.c, and then
this could add xapic_tpr_test.c.  But I haven't looked closely enough at your
patch to make a concrete suggestion (at a glance, it looks like there's not much
overlap with the ICR test, so I'm leaning strongly towards splitting).

      reply	other threads:[~2025-10-17 16:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-23 17:32 [PATCH v3] KVM: selftests: Test TPR / CR8 sync and interrupt masking Maciej S. Szmigiero
2025-09-25 10:43 ` Naveen N Rao
2025-10-17 13:51   ` Maciej S. Szmigiero
2025-10-17 16:09     ` Sean Christopherson [this message]

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=aPJqToq-589NovVS@google.com \
    --to=seanjc@google.com \
    --cc=Suravee.Suthikulpanit@amd.com \
    --cc=alejandro.j.jimenez@oracle.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mail@maciej.szmigiero.name \
    --cc=mlevitsk@redhat.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.