KVM: selftests: arm64: Determine max ipa size per-page size
authorRyan Roberts <ryan.roberts@arm.com>
Mon, 27 Nov 2023 11:17:36 +0000 (11:17 +0000)
committerMarc Zyngier <maz@kernel.org>
Mon, 27 Nov 2023 15:03:50 +0000 (15:03 +0000)
commit72324ac52ddddb168d8008e36d6a617b9b74f6c1
treed7bcf75cad1a51cb0101a6cd37513ceae9ca529a
parentd782ac5b2ceebee5d374e13e990655d1a140d3a6
KVM: selftests: arm64: Determine max ipa size per-page size

We are about to add 52 bit PA guest modes for 4K and 16K pages when the
system supports LPA2. In preparation beef up the logic that parses mmfr0
to also tell us what the maximum supported PA size is for each page
size. Max PA size = 0 implies the page size is not supported at all.

Reviewed-by: Oliver Upton <oliver.upton@linux.dev>
Signed-off-by: Ryan Roberts <ryan.roberts@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20231127111737.1897081-12-ryan.roberts@arm.com
tools/testing/selftests/kvm/include/aarch64/processor.h
tools/testing/selftests/kvm/include/guest_modes.h
tools/testing/selftests/kvm/lib/aarch64/processor.c
tools/testing/selftests/kvm/lib/guest_modes.c