Skip to content

KVM: selftests: add powerpc support

Nicholas Piggin kvm linuxppc-dev 5 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest4 patches 0 repliesNew
  2. v36 patches 2 repliesSuperseded
  3. v2 posting 2/24 patches 3 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v2 posting 1/22 patches0 repliesSuperseded
v12 patches8 repliesSuperseded

Changes in v4 from the cover letter

https://lore.kernel.org/linuxppc-dev/[email protected]/
- Rebased to upstream (on top of Sean's ucall and guest assert rework).
- Drop powerpc specific tests for now, concentrate on base enablement.
- Fix a bunch of bugs and issues including the ones noticed by Joel in v3:
- Work around powerpc's max VCPU ID complexity to fix test case failure.
- Use TEST_REQUIRE for radix mode so hash hosts don't assert.
- Pack page table "fragments" in pages (like Linux kernel does), which fixes PTE memory consumption estimation and prevents the max memory test from failing with no memory for page tables.

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4KVM: selftests: Move pgd_created check into virt_pgd_alloctools/testing/selftests/kvm/include/kvm_util_base.h tools/testing/selftests/kvm/lib/aarch64/processor.c tools/testing/selftests/kvm/lib/riscv/processor.c +2 more+7 -170 replies
2/4KVM: selftests: Add aligned guest physical page allocatortools/testing/selftests/kvm/include/kvm_util_base.h tools/testing/selftests/kvm/lib/kvm_util.c+29 -170 replies
3/4KVM: PPC: selftests: add support for powerpcMAINTAINERS tools/testing/selftests/kvm/Makefile tools/testing/selftests/kvm/include/kvm_util_base.h +11 more+862 -40 replies
4/4KVM: PPC: selftests: powerpc enable kvm_create_max_vcpus testtools/testing/selftests/kvm/Makefile tools/testing/selftests/kvm/kvm_create_max_vcpus.c+10 -00 replies

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by.

PatchMichael Ellerman
1/4
2/4
3/4A-b
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/4] KVM: selftests: add powerpc support

This series adds initial KVM selftests support for powerpc (64-bit, BookS, radix MMU).

Since v3:
https://lore.kernel.org/linuxppc-dev/[email protected]/
- Rebased to upstream (on top of Sean's ucall and guest assert rework).
- Drop powerpc specific tests for now, concentrate on base enablement.
- Fix a bunch of bugs and issues including the ones noticed by Joel in v3:
- Work around powerpc's max VCPU ID complexity to fix test case failure.
- Use TEST_REQUIRE for radix mode so hash hosts don't assert.
- Pack page table "fragments" in pages (like Linux kernel does), which fixes PTE memory consumption estimation and prevents the max memory test from failing with no memory for page tables.

Since v2:
- Added a couple of new tests (patch 5,6)
- Make default page size match host page size.
- Check for radix MMU capability.
- Build a few more of the generic tests.

Since v1:
- Update MAINTAINERS KVM PPC entry to include kvm selftests.
- Fixes and cleanups from Sean's review including new patch 1.
- Add 4K guest page support requiring new patch 2.

Thanks,
Nick

Nicholas Piggin (4):
KVM: selftests: Move pgd_created check into virt_pgd_alloc
KVM: selftests: Add aligned guest physical page allocator
KVM: PPC: selftests: add support for powerpc
KVM: PPC: selftests: powerpc enable kvm_create_max_vcpus test

 MAINTAINERS                                   |   2 +
 tools/testing/selftests/kvm/Makefile          |  20 +
 .../selftests/kvm/include/kvm_util_base.h     |  31 ++
 .../selftests/kvm/include/powerpc/hcall.h     |  17 +
 .../selftests/kvm/include/powerpc/ppc_asm.h   |  32 ++
 .../selftests/kvm/include/powerpc/processor.h |  39 ++
 .../selftests/kvm/include/powerpc/ucall.h     |  21 +
 .../selftests/kvm/kvm_create_max_vcpus.c      |   9 +
 .../selftests/kvm/lib/aarch64/processor.c     |   4 -
 tools/testing/selftests/kvm/lib/guest_modes.c |  27 +-
 tools/testing/selftests/kvm/lib/kvm_util.c    |  56 ++-
 .../selftests/kvm/lib/powerpc/handlers.S      |  93 ++++
 .../testing/selftests/kvm/lib/powerpc/hcall.c |  45 ++
 .../selftests/kvm/lib/powerpc/processor.c     | 468 ++++++++++++++++++
 .../testing/selftests/kvm/lib/powerpc/ucall.c |  21 +
 .../selftests/kvm/lib/riscv/processor.c       |   4 -
 .../selftests/kvm/lib/s390x/processor.c       |   4 -
 .../selftests/kvm/lib/x86_64/processor.c      |   7 +-
 tools/testing/selftests/kvm/powerpc/helpers.h |  46 ++
 19 files changed, 908 insertions(+), 38 deletions(-)
 create mode 100644 tools/testing/selftests/kvm/include/powerpc/hcall.h
 create mode 100644 tools/testing/selftests/kvm/include/powerpc/ppc_asm.h
 create mode 100644 tools/testing/selftests/kvm/include/powerpc/processor.h
 create mode 100644 tools/testing/selftests/kvm/include/powerpc/ucall.h
 create mode 100644 tools/testing/selftests/kvm/lib/powerpc/handlers.S
 create mode 100644 tools/testing/selftests/kvm/lib/powerpc/hcall.c
 create mode 100644 tools/testing/selftests/kvm/lib/powerpc/processor.c
 create mode 100644 tools/testing/selftests/kvm/lib/powerpc/ucall.c
 create mode 100644 tools/testing/selftests/kvm/powerpc/helpers.h
Signature · 1 line
2.42.0