[PATCH 0/5] KVM: arm64: Selftest IPA fixes

Marc Zyngier maz at kernel.org
Thu Dec 16 04:31:30 PST 2021


Now that the common variety of fruity arm64 systems makes a pretty
remarkable KVM host, I have decided to run the collection of selftests
on it.

Nothing works. Oh no!

As it turns out, the tests have a notion of "default mode" (36bit PA,
4kB), which cannot work in general on arm64 because there no such
thing as an IPA size that would be valid everywhere (apart from the
minimal 32bit), nor a guaranteed to be supported page size.

This small series is a first attempt at making these things computed
at runtime by making the default something else on systems that do not
support it. It also makes the supported page sizes dynamically
discovered. The initial patch addresses an issue that has already been
addressed separately, and is only there so that I don't get shouted at
by some robot.

With that, the selftests do run on the M1, with the exception of the
memslot tests that are freaked out by the use of 16kB pages on the
host and 4kB in the guest. Maybe I'll implement some form of 16kB
support in the future.

Marc Zyngier (5):
  KVM: selftests: Fix vm_compute_max_gfn on !x86
  KVM: selftests: Initialise default mode in each test
  KVM: selftests: arm64: Introduce a variable default IPA size
  KVM: selftests: arm64: Check for supported page sizes
  KVM: selftests: arm64: Add support for VM_MODE_P36V48_{4K,64K}

 .../selftests/kvm/aarch64/arch_timer.c        |  3 +
 .../selftests/kvm/aarch64/debug-exceptions.c  |  3 +
 .../selftests/kvm/aarch64/get-reg-list.c      |  3 +
 .../selftests/kvm/aarch64/psci_cpu_on_test.c  |  3 +
 .../testing/selftests/kvm/aarch64/vgic_init.c |  3 +
 .../testing/selftests/kvm/include/kvm_util.h  | 15 ++--
 .../selftests/kvm/kvm_binary_stats_test.c     |  3 +
 .../selftests/kvm/kvm_create_max_vcpus.c      |  3 +
 .../selftests/kvm/lib/aarch64/processor.c     |  8 ++
 tools/testing/selftests/kvm/lib/guest_modes.c | 77 +++++++++++++++++--
 tools/testing/selftests/kvm/lib/kvm_util.c    |  6 ++
 .../testing/selftests/kvm/memslot_perf_test.c |  4 +
 tools/testing/selftests/kvm/rseq_test.c       |  3 +
 .../selftests/kvm/set_memory_region_test.c    |  4 +
 tools/testing/selftests/kvm/steal_time.c      |  3 +
 15 files changed, 131 insertions(+), 10 deletions(-)

-- 
2.30.2




More information about the linux-arm-kernel mailing list