[PATCH 4/6] rcutorture: Make torture.sh test NMIs for RCU on x86
From: Paul E. McKenney
Date: Mon Nov 16 2026 - 12:26:58 EST
This commit adds '--qemu-args "-cpu host,pmu=on"' and kernel boot
arguments "rcutorture.nmi_readers=1 rcutorture.nmi_calls=1" for
--do-rcutorture runs of torture.sh. This ensures regular testing of
atomic RCU readers and call_rcu() updaters from NMI handlers, at least
when running on x86 systems providing PMU support.
Signed-off-by: Paul E. McKenney <paulmck@xxxxxxxxxx>
---
tools/testing/selftests/rcutorture/bin/torture.sh | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/rcutorture/bin/torture.sh b/tools/testing/selftests/rcutorture/bin/torture.sh
index 0be8bb08c5ca0..bc842c94c4379 100755
--- a/tools/testing/selftests/rcutorture/bin/torture.sh
+++ b/tools/testing/selftests/rcutorture/bin/torture.sh
@@ -513,8 +513,15 @@ fi
# --torture rcu
if test "$do_rcutorture" = "yes"
then
- torture_bootargs="rcupdate.rcu_cpu_stall_suppress_at_boot=1 torture.disable_onoff_at_boot rcupdate.rcu_task_stall_timeout=30000"
- torture_set "rcutorture" tools/testing/selftests/rcutorture/bin/kvm.sh --allcpus --duration "$duration_rcutorture" --configs "$configs_rcutorture" --trust-make
+ qemu_args=
+ if test "$ifnotaarch64" = yes
+ then
+ qemu_args="-cpu host,pmu=on"
+ fi
+ torture_bootargs="rcupdate.rcu_cpu_stall_suppress_at_boot=1 torture.disable_onoff_at_boot rcupdate.rcu_task_stall_timeout=30000 rcutorture.nmi_calls=1 rcutorture.nmi_readers=1"
+ torture_set "rcutorture" tools/testing/selftests/rcutorture/bin/kvm.sh --allcpus \
+ --duration "$duration_rcutorture" --configs "$configs_rcutorture" \
+ ${qemu_args:+--qemu-args "$qemu_args"} --trust-make
fi
# Test atomic SRCU across Tree SRCU (SRCU-N and SRCU-P) and Tiny SRCU
--
2.40.1