]> Gentwo Git Trees - linux/.git/commit
KVM: selftests: SYNC after guest ITS setup in vgic_lpi_stress
authorMaximilian Dittgen <mdittgen@amazon.de>
Wed, 19 Nov 2025 13:57:44 +0000 (14:57 +0100)
committerOliver Upton <oupton@kernel.org>
Wed, 19 Nov 2025 20:38:59 +0000 (12:38 -0800)
commit85f329df293119d6ba1a26453d109556631081a4
treeadd3b958c481b9cbdaa1ba925d57bbe216b7eaad
parent31df012da496968d8d4368f693ad45dfcbfba40b
KVM: selftests: SYNC after guest ITS setup in vgic_lpi_stress

vgic_lpi_stress sends MAPTI and MAPC commands during guest GIC setup to
map interrupt events to ITT entries and collection IDs to
redistributors, respectively.

We have no guarantee that the ITS will finish handling these mapping
commands before the selftest calls KVM_SIGNAL_MSI to inject LPIs to the
guest. If LPIs are injected before ITS mapping completes, the ITS cannot
properly pass the interrupt on to the redistributor.

Fix by adding a SYNC command to the selftests ITS library, then calling
SYNC after ITS mapping to ensure mapping completes before signal_lpi()
writes to GITS_TRANSLATER.

Signed-off-by: Maximilian Dittgen <mdittgen@amazon.de>
Link: https://msgid.link/20251119135744.68552-2-mdittgen@amazon.de
Signed-off-by: Oliver Upton <oupton@kernel.org>
tools/testing/selftests/kvm/arm64/vgic_lpi_stress.c
tools/testing/selftests/kvm/include/arm64/gic_v3_its.h
tools/testing/selftests/kvm/lib/arm64/gic_v3_its.c