KVM: selftests: aarch64: Construct DEFAULT_MAIR_EL1 using sysreg.h macros
authorRicardo Koller <ricarkol@google.com>
Mon, 17 Oct 2022 19:58:24 +0000 (19:58 +0000)
committerMarc Zyngier <maz@kernel.org>
Thu, 10 Nov 2022 19:10:27 +0000 (19:10 +0000)
commit41f5189ea9c08f7fc28340a7aefc93d0d2dcb769
tree1eaa5e90f2540c805ab921e4ddf0e8b17cd0bc76
parentb6b03b86c0250a80b671313dbc0d7bcdbab78f41
KVM: selftests: aarch64: Construct DEFAULT_MAIR_EL1 using sysreg.h macros

Define macros for memory type indexes and construct DEFAULT_MAIR_EL1
with macros from asm/sysreg.h.  The index macros can then be used when
constructing PTEs (instead of using raw numbers).

Reviewed-by: Andrew Jones <andrew.jones@linux.dev>
Reviewed-by: Oliver Upton <oupton@google.com>
Signed-off-by: Ricardo Koller <ricarkol@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20221017195834.2295901-5-ricarkol@google.com
tools/testing/selftests/kvm/include/aarch64/processor.h
tools/testing/selftests/kvm/lib/aarch64/processor.c