KVM: selftests: arm64: Check for supported page sizes
authorMarc Zyngier <maz@kernel.org>
Mon, 27 Dec 2021 12:48:06 +0000 (12:48 +0000)
committerMarc Zyngier <maz@kernel.org>
Tue, 28 Dec 2021 11:04:20 +0000 (11:04 +0000)
commit0303ffdb9ecffac4654b16bbf69ba84d131eb8b7
treea21976a88e6d42ca0047d2d062d9dfaa87081ce3
parent357c628e1248dd53f5c43a768246a83478a7f489
KVM: selftests: arm64: Check for supported page sizes

Just as arm64 implemenations don't necessary support all IPA
ranges, they don't  all support the same page sizes either. Fun.

Create a dummy VM to snapshot the page sizes supported by the
host, and filter the supported modes.

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