Re: [PATCH v5 0/9] KVM: selftests: add powerpc support

From: IBM

Date: Mon Oct 05 2026 - 01:32:41 EST



Hi Sean,

Sorry I didn't see this email before sending out v6.
I think we can ignore v6, once the discussion here is sorted - I can
share a v7.

Sean Christopherson <seanjc@xxxxxxxxxx> writes:

> On Sat, Oct 03, 2026, Ritesh Harjani wrote:
>> Sean Christopherson <seanjc@xxxxxxxxxx> writes:
>> Also note - I will open code the TEST_GEN_PROGS_COMMON and will skip the
>> kvm_create_max_vcpus
>
> Oh, right, kvm_create_max_vcpus is a common test. Can userspace detect that it's
> running KVM-on-PowerVM (in a not completely unpleasant way)? If so, an alternative
> would be to keep the KVM_CAP_PPC_SMT change in v6 (patch 2) as a prep patch (before
> adding PPC support to Makefile.kvm), and then add a
> TEST_REQUIRE(!kvm_is_on_ppc_powervm()) or whatever.
>

So stictly speaking there is no simple check like that - however, I
think we can skip the test when we are running on pseries LPAR (meaning
trying to run a nested guest). We already have the check
is_pseries_lpar() for access_tracking_perf_test. I think we can re-use
the same check here as well.

> I think I'd even prefer to take on an #ifdef (to scope it to PPC if necessary)
> over open coding TEST_GEN_PROGS_COMMON.

Sure, so will add this check for kvm_create_max_vcpus()

#ifdef __powerpc64__
TEST_REQUIRE(!is_pseries_lpar());
#endif


Actually I was thinking we may as well use the same check for now for
skipping hardware_disable_test on pseries. Because there also we suffer
from the same resource limitation. Let me know if that sounds ok to you
or do you want us to skip kvm_create_max_vcpus() only for now, since it
is part of TEST_GEN_PROGS_COMMON?

> LoongArch open coded its full test list
> for some reason, and in less than a year it has started missing out on new common
> tests.
>
>> (& maybe few others like vm_types_test) from that in v6.
>
> What's wrong with VM types test? That one really should Just Work on all
> architectures. It doesn't run on LoongArch, but I assume that's
> oversight?

So the test doesn't fail (it gets skipped). However this cap
"KVM_CAP_VM_TYPES" is only supported on x86 and since I was planning to
open code all common tests, hence I thought I may as well not add this
in the first place.


BTW, based on this discussion, I think I will re-arrange the patches in
the following order and send a v7. (The Makefile.kvm changes will only
get added after the main patch which adds powerpc support).

cfabdb049bd7 2026-10-05 [Ritesh Harjani (IBM)] (HEAD -> feat-ppc-kvm-selftests-new-sean-v7) KVM: selftests: Skip hardware_disable_test on pseries
2b51fab87b95 2026-09-22 [Ritesh Harjani (IBM)] KVM: PPC: selftests: Skip idle-page check when running nested on pseries LPAR
f5d1de1be4e9 2026-10-05 [Ritesh Harjani (IBM)] KVM: selftests: Skip kvm_create_max_vcpus on pseries
e45ba15cea25 2026-10-03 [Ritesh Harjani (IBM)] KVM: PPC: selftests: Add helper for checking if running nested
178c9bca0e20 2026-09-22 [Nicholas Piggin] KVM: PPC: selftests: add support for powerpc
22320662e776 2026-09-11 [Ritesh Harjani (IBM)] KVM: selftests: Fix kvm_create_max_vcpus test for powerpc
11b5712b213b 2026-09-22 [Ritesh Harjani (IBM)] KVM: selftests: Move memslot_perf_test off the 256M ELF load address
63c900860b5f 2026-09-22 [Ritesh Harjani (IBM)] KVM: selftests: Don't limit LE dirty-bitmap bitops to s390x


Please let me know if this sounds ok?

-ritesh