All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/6] KVM: arm64: Selftest IPA fixes and 16kB support
@ 2021-12-27 12:48 ` Marc Zyngier
  0 siblings, 0 replies; 45+ messages in thread
From: Marc Zyngier @ 2021-12-27 12:48 UTC (permalink / raw)
  To: Paolo Bonzini, Andrew Jones
  Cc: James Morse, Suzuki K Poulose, Alexandru Elisei, kvmarm, kvm,
	linux-arm-kernel, kernel-team

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" (40bit 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, which allows us to implement support for 16kB pages.

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 (these tests are hardcoded to use 4kB
pages even if the VM uses something else -- oh well...).

* From v1:
  - Rebased on 5.16-rc7 and dropped the initial patch, now that
    non-x86 systems are up and running again
  - Used Andrew's trick to initialise the default mode as a
    constructor instead of hacking every single test (I decided to
    make it an arm64-special instead of an all-arch thing though)
  - Reworked the way TCR_EL1 gets configured for easier integration of
    new modes
  - Added support for various 16kB modes
  - Various cleanups as requested by Andrew

Marc Zyngier (6):
  KVM: selftests: arm64: Initialise default guest mode at test startup
    time
  KVM: selftests: arm64: Introduce a variable default IPA size
  KVM: selftests: arm64: Check for supported page sizes
  KVM: selftests: arm64: Rework TCR_EL1 configuration
  KVM: selftests: arm64: Add support for VM_MODE_P36V48_{4K,64K}
  KVM: selftests: arm64: Add support for various modes with 16kB page
    size

 .../selftests/kvm/include/aarch64/processor.h |  3 +
 .../testing/selftests/kvm/include/kvm_util.h  | 10 ++-
 .../selftests/kvm/lib/aarch64/processor.c     | 82 +++++++++++++++++--
 tools/testing/selftests/kvm/lib/guest_modes.c | 49 +++++++++--
 tools/testing/selftests/kvm/lib/kvm_util.c    | 22 +++++
 5 files changed, 152 insertions(+), 14 deletions(-)

-- 
2.30.2


^ permalink raw reply	[flat|nested] 45+ messages in thread

end of thread, other threads:[~2021-12-28 11:10 UTC | newest]

Thread overview: 45+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-27 12:48 [PATCH v2 0/6] KVM: arm64: Selftest IPA fixes and 16kB support Marc Zyngier
2021-12-27 12:48 ` Marc Zyngier
2021-12-27 12:48 ` Marc Zyngier
2021-12-27 12:48 ` [PATCH v2 1/6] KVM: selftests: arm64: Initialise default guest mode at test startup time Marc Zyngier
2021-12-27 12:48   ` Marc Zyngier
2021-12-27 12:48   ` Marc Zyngier
2021-12-28  9:37   ` Andrew Jones
2021-12-28  9:37     ` Andrew Jones
2021-12-28  9:37     ` Andrew Jones
2021-12-27 12:48 ` [PATCH v2 2/6] KVM: selftests: arm64: Introduce a variable default IPA size Marc Zyngier
2021-12-27 12:48   ` Marc Zyngier
2021-12-27 12:48   ` Marc Zyngier
2021-12-28  9:26   ` Andrew Jones
2021-12-28  9:26     ` Andrew Jones
2021-12-28  9:26     ` Andrew Jones
2021-12-28 10:29     ` Marc Zyngier
2021-12-28 10:29       ` Marc Zyngier
2021-12-28 10:29       ` Marc Zyngier
2021-12-28 10:33       ` Andrew Jones
2021-12-28 10:33         ` Andrew Jones
2021-12-28 10:33         ` Andrew Jones
2021-12-27 12:48 ` [PATCH v2 3/6] KVM: selftests: arm64: Check for supported page sizes Marc Zyngier
2021-12-27 12:48   ` Marc Zyngier
2021-12-27 12:48   ` Marc Zyngier
2021-12-28  9:37   ` Andrew Jones
2021-12-28  9:37     ` Andrew Jones
2021-12-28  9:37     ` Andrew Jones
2021-12-27 12:48 ` [PATCH v2 4/6] KVM: selftests: arm64: Rework TCR_EL1 configuration Marc Zyngier
2021-12-27 12:48   ` Marc Zyngier
2021-12-27 12:48   ` Marc Zyngier
2021-12-28  9:37   ` Andrew Jones
2021-12-28  9:37     ` Andrew Jones
2021-12-28  9:37     ` Andrew Jones
2021-12-27 12:48 ` [PATCH v2 5/6] KVM: selftests: arm64: Add support for VM_MODE_P36V48_{4K,64K} Marc Zyngier
2021-12-27 12:48   ` [PATCH v2 5/6] KVM: selftests: arm64: Add support for VM_MODE_P36V48_{4K, 64K} Marc Zyngier
2021-12-27 12:48   ` Marc Zyngier
2021-12-27 12:48 ` [PATCH v2 6/6] KVM: selftests: arm64: Add support for various modes with 16kB page size Marc Zyngier
2021-12-27 12:48   ` Marc Zyngier
2021-12-27 12:48   ` Marc Zyngier
2021-12-28  9:38   ` Andrew Jones
2021-12-28  9:38     ` Andrew Jones
2021-12-28  9:38     ` Andrew Jones
2021-12-28 11:09 ` [PATCH v2 0/6] KVM: arm64: Selftest IPA fixes and 16kB support Marc Zyngier
2021-12-28 11:09   ` Marc Zyngier
2021-12-28 11:09   ` Marc Zyngier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.