KVM: selftests: arm64: Fix ttbr0_el1 encoding for PA bits > 48
authorRyan Roberts <ryan.roberts@arm.com>
Wed, 8 Mar 2023 11:09:48 +0000 (11:09 +0000)
committerMarc Zyngier <maz@kernel.org>
Thu, 30 Mar 2023 18:27:56 +0000 (19:27 +0100)
commite17071754cf50e5f6ff8ebee077e0e4114d3bea5
tree7df837bd601532b6c2d0a97cfe73cf1331fe313d
parente659babfc5a693553cf9473470840464f0ed5d77
KVM: selftests: arm64: Fix ttbr0_el1 encoding for PA bits > 48

Bits [51:48] of the pgd address are stored at bits [5:2] of ttbr0_el1.
page_table_test stores its page tables at the far end of IPA space so
was tripping over this when run on a system that supports FEAT_LPA (or
FEAT_LPA2).

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