From: Oliver Upton <oupton@kernel.org>
To: Marc Zyngier <maz@kernel.org>
Cc: Maximilian Dittgen <mdittgen@amazon.de>,
oliver.upton@linux.dev, pbonzini@redhat.com, shuah@kernel.org,
linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev,
linux-kselftest@vger.kernel.org, kvm@vger.kernel.org,
lilitj@amazon.de, nh-open-source@amazon.com
Subject: Re: [PATCH] KVM: selftests: Add SYNC after guest ITS setup in vgic_lpi_stress
Date: Fri, 14 Nov 2025 12:26:15 -0800 [thread overview]
Message-ID: <aReQZ7VCOMYv9I7G@kernel.org> (raw)
In-Reply-To: <86bjl4tyc9.wl-maz@kernel.org>
On Fri, Nov 14, 2025 at 03:42:30PM +0000, Marc Zyngier wrote:
> On Fri, 14 Nov 2025 14:39:02 +0000,
> Maximilian Dittgen <mdittgen@amazon.de> wrote:
> > diff --git a/tools/testing/selftests/kvm/arm64/vgic_lpi_stress.c b/tools/testing/selftests/kvm/arm64/vgic_lpi_stress.c
> > index 687d04463983..e857a605f577 100644
> > --- a/tools/testing/selftests/kvm/arm64/vgic_lpi_stress.c
> > +++ b/tools/testing/selftests/kvm/arm64/vgic_lpi_stress.c
> > @@ -118,6 +118,10 @@ static void guest_setup_gic(void)
> >
> > guest_setup_its_mappings();
> > guest_invalidate_all_rdists();
> > +
> > + /* SYNC to ensure ITS setup is complete */
> > + for (cpuid = 0; cpuid < test_data.nr_cpus; cpuid++)
> > + its_send_sync_cmd(test_data.cmdq_base_va, cpuid);
>
> You are making an implementation assumption here. There is nothing in
> the spec that says that the GICR_TYPER.Processor_Number associated
> with a given CPU is the same thing as the CPU number that the
> selftests infrastructure give you.
This is already rather widely assumed in the selftests GIC library as
well as this test (ex. guest_invalidate_all_rdists()). I'd be happy with
an assertion in gicv3_cpu_init() that ensures
GICR_TYPER.Processor_Number == cpu.
Thanks,
Oliver
next prev parent reply other threads:[~2025-11-14 20:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-14 14:39 [PATCH] KVM: selftests: Add SYNC after guest ITS setup in vgic_lpi_stress Maximilian Dittgen
2025-11-14 15:42 ` Marc Zyngier
2025-11-14 20:26 ` Oliver Upton [this message]
2025-11-19 13:57 ` [PATCH v2 1/2] KVM: selftests: Assert GICR_TYPER.Processor_Number matches selftest CPU number Maximilian Dittgen
2025-11-19 13:57 ` [PATCH v2 2/2] KVM: selftests: SYNC after guest ITS setup in vgic_lpi_stress Maximilian Dittgen
2025-11-19 22:35 ` [PATCH v2 1/2] KVM: selftests: Assert GICR_TYPER.Processor_Number matches selftest CPU number Oliver Upton
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=aReQZ7VCOMYv9I7G@kernel.org \
--to=oupton@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.linux.dev \
--cc=lilitj@amazon.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=maz@kernel.org \
--cc=mdittgen@amazon.de \
--cc=nh-open-source@amazon.com \
--cc=oliver.upton@linux.dev \
--cc=pbonzini@redhat.com \
--cc=shuah@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).