Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] KVM: arm64: selftests: Cover the ITS MOVALL command
@ 2026-10-01  7:10 Fuad Tabba
  2026-10-01  7:10 ` [PATCH v2 1/3] KVM: arm64: selftests: Add MOVI and MOVALL commands to the ITS library Fuad Tabba
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Fuad Tabba @ 2026-10-01  7:10 UTC (permalink / raw)
  To: Marc Zyngier, Oliver Upton
  Cc: kvmarm, linux-arm-kernel, Will Deacon, Joey Gouly,
	Suzuki K Poulose, Zenghui Yu, Steffen Eiden, Yuchao Zhang,
	Fuad Tabba

Hi folks,

Changes since v1 [1]:
  - Make the LPIs pending before they're moved, since pending state is
    what MOVALL moves. (Marc)
  - Put the test in vgic_lpi_stress, which now builds a VM per test.
    (Marc)
  - Test MOVI as well.
  - Rebased on kvmarm/next.

This series tests MOVI and MOVALL on pending LPIs, in vgic_lpi_stress.
The MOVALL case passes only with "KVM: arm64: vgic-its: Fix MOVALL
handling of source redistributor", which is in kvmarm/fixes. Under QEMU
with pKVM, VHE and nVHE hosts, it failed all 21 runs without the fix,
and the test passed all 21 with it and all 5 on top of Oliver's series
[2]. MOVI is there because it's what Linux uses to change an LPI's
affinity.

The test can also catch the stale LR that Oliver's "KVM: arm64: vgic:
Move IRQ migrations out of vgic_prune_ap_list()" fixes, since the vCPU
the LPI is moved from can keep it in its list registers during the
move. I've only seen that in the MOVALL case without the MOVALL fix,
where 13 of the 21 runs took the LPI on that vCPU. I couldn't reproduce
it with MOVI, with the fix, or in 70 runs in a Linux VM on an M4 with
Ubuntu's 6.8 kernel, which predates the MOVALL bug. Oliver, this may be
the pending-LPI migration test you mentioned.

Turns out the test does run on an M4, unlike what I said in v1, since
KVM emulates the ITS whether or not the host has one.

Based on kvmarm/next (8c00199d322b9).

Cheers,
/fuad

[1] https://lore.kernel.org/all/cover.1790708299.git.fuad.tabba@linux.dev/
[2] https://lore.kernel.org/all/20260929212925.31775-1-oupton@kernel.org/

Fuad Tabba (3):
  KVM: arm64: selftests: Add MOVI and MOVALL commands to the ITS library
  KVM: arm64: selftests: Build a VM per test in vgic_lpi_stress
  KVM: arm64: selftests: Test MOVI and MOVALL on a pending LPI

 .../selftests/kvm/arm64/vgic_lpi_stress.c     | 258 ++++++++++++++++--
 .../selftests/kvm/include/arm64/gic_v3_its.h  |   2 +
 .../selftests/kvm/lib/arm64/gic_v3_its.c      |  28 ++
 3 files changed, 265 insertions(+), 23 deletions(-)


base-commit: 8c00199d322b9e5e936bb0ff624ac95b01c740fe
-- 
2.39.5



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-10-01  7:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-01  7:10 [PATCH v2 0/3] KVM: arm64: selftests: Cover the ITS MOVALL command Fuad Tabba
2026-10-01  7:10 ` [PATCH v2 1/3] KVM: arm64: selftests: Add MOVI and MOVALL commands to the ITS library Fuad Tabba
2026-10-01  7:10 ` [PATCH v2 2/3] KVM: arm64: selftests: Build a VM per test in vgic_lpi_stress Fuad Tabba
2026-10-01  7:11 ` [PATCH v2 3/3] KVM: arm64: selftests: Test MOVI and MOVALL on a pending LPI Fuad Tabba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox