]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: selftests: arm64: Introduce a variable default IPA size
authorMarc Zyngier <maz@kernel.org>
Mon, 27 Dec 2021 12:48:05 +0000 (12:48 +0000)
committerMarc Zyngier <maz@kernel.org>
Tue, 28 Dec 2021 11:04:20 +0000 (11:04 +0000)
commit86fe835099cbaf64ed034b0eb96f2dae1ec25247
treed4308c23be6ededc349d56647862b7a36cf1b8bb
parent7994c213569022ffc19b774fca5ec88a65651b88
KVM: selftests: arm64: Introduce a variable default IPA size

Contrary to popular belief, there is no such thing as a default
IPA size on arm64. Anything goes, and implementations are the
usual Wild West.

The selftest infrastructure default to 40bit IPA, which obviously
doesn't work for some systems out there.

Turn VM_MODE_DEFAULT from a constant into a variable, and let
guest_modes_append_default() populate it, depending on what
the HW can do. In order to preserve the current behaviour, we
still pick 40bits IPA as the default if it is available, and
the largest supported IPA space otherwise.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Link: https://lore.kernel.org/r/20211227124809.1335409-3-maz@kernel.org
tools/testing/selftests/kvm/include/kvm_util.h
tools/testing/selftests/kvm/lib/guest_modes.c