]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
KVM: arm64: selftests: vgic_irq: Perform EOImode==1 deactivation in ack order
authorMarc Zyngier <maz@kernel.org>
Thu, 20 Nov 2025 17:25:36 +0000 (17:25 +0000)
committerOliver Upton <oupton@kernel.org>
Mon, 24 Nov 2025 22:29:15 +0000 (14:29 -0800)
When EOImode==1, perform the deactivation in the order of activation,
just to make things a bit worse for KVM. Yes, I'm nasty.

Tested-by: Fuad Tabba <tabba@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Tested-by: Mark Brown <broonie@kernel.org>
Link: https://msgid.link/20251120172540.2267180-47-maz@kernel.org
Signed-off-by: Oliver Upton <oupton@kernel.org>
tools/testing/selftests/kvm/arm64/vgic_irq.c

index 9d4761f1a3204938fa70af1d56c250acc86f53af..72f7bb0d201e5d3bc591a5a0eec4507eb05ff8ab 100644 (file)
@@ -400,8 +400,18 @@ static void test_inject_preemption(struct test_args *args,
                        continue;
 
                gic_set_eoi(intid);
-               if (args->eoi_split)
-                       gic_set_dir(intid);
+       }
+
+       if (args->eoi_split) {
+               for (i = 0; i < num; i++) {
+                       intid = i + first_intid;
+
+                       if (exclude && test_bit(i, exclude))
+                               continue;
+
+                       if (args->eoi_split)
+                               gic_set_dir(intid);
+               }
        }
 
        local_irq_enable();