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>
This commit is contained in:
Ritesh Harjani (IBM) 2026-10-06 15:58:42 +05:30 committed by Sean Christopherson
parent e5983ef19a
commit 23140d6e54
2 changed files with 4 additions and 0 deletions

View File

@ -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

View File

@ -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++) {