diff options
| author | Ritesh Harjani (IBM) <ritesh.list@gmail.com> | 2026-10-06 15:58:42 +0530 |
|---|---|---|
| committer | Sean Christopherson <seanjc@google.com> | 2026-10-13 12:07:29 -0700 |
| commit | 23140d6e54ac31e2f4ef3bcd7fb586a14360be34 (patch) | |
| tree | 20d2813bff5d95e5d61962ce623c732df835dbbf /tools/testing | |
| parent | e5983ef19a6a4243ea9e6c7612dd7b59620c8745 (diff) | |
KVM: selftests: Enable hardware disable test PPC (without pSeries LPAR)
Enable the hardware disable test for PPC, but skip the test when running
on pSeries LPAR. The test forks 512 children, each of which does
KVM_CREATE_VM and then SIGKILLs without waiting. On a PAPR LPAR, that
ioctl is H_GUEST_CREATE and unreaped guests may still occupy L0 Guest
Management Space, which means create can fail with -ENOMEM error. Skip
the test for now, as making it play nice with pSeries LPAR is non-trivial,
while the test provides meaningful coverage for other flavors of PPC.
Signed-off-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Reviewed-by: Gautam Menghani <gautam@linux.ibm.com>
Tested-by: Gautam Menghani <gautam@linux.ibm.com>
Acked-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/23f36aab5e9c849719ffeb796e1a74e69eb5d142.1791280439.git.ritesh.list@gmail.com
[sean: massage changelog]
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'tools/testing')
| -rw-r--r-- | tools/testing/selftests/kvm/Makefile.kvm | 1 | ||||
| -rw-r--r-- | tools/testing/selftests/kvm/hardware_disable_test.c | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/tools/testing/selftests/kvm/Makefile.kvm b/tools/testing/selftests/kvm/Makefile.kvm index 692bbae44a65..38c3900cac68 100644 --- a/tools/testing/selftests/kvm/Makefile.kvm +++ b/tools/testing/selftests/kvm/Makefile.kvm @@ -258,6 +258,7 @@ TEST_GEN_PROGS_loongarch += steal_time TEST_GEN_PROGS_powerpc = $(TEST_GEN_PROGS_COMMON) TEST_GEN_PROGS_powerpc += access_tracking_perf_test +TEST_GEN_PROGS_powerpc += hardware_disable_test SPLIT_TESTS += arch_timer SPLIT_TESTS += get-reg-list diff --git a/tools/testing/selftests/kvm/hardware_disable_test.c b/tools/testing/selftests/kvm/hardware_disable_test.c index 43a36ef3ead8..0104b7e840b5 100644 --- a/tools/testing/selftests/kvm/hardware_disable_test.c +++ b/tools/testing/selftests/kvm/hardware_disable_test.c @@ -130,6 +130,9 @@ int main(int argc, char **argv) int s, r, cpu, i; pid_t pid; + /* PowerPC PAPR L0 cannot guarantee 512 overlapping H_GUEST_CREATE from fork+SIGKILL. */ + TEST_REQUIRE(!kvm_is_ppc_pseries_lpar()); + kvm_sched_getaffinity(0, sizeof(cpu_set_t), &allowed_cpu_set); for (i = 0; i < NR_VCPUS && CPU_COUNT(&allowed_cpu_set); i++) { |
