]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: arm64: selftests: Introduce and use hardware-definition macros
authorRaghavendra Rao Ananta <rananta@google.com>
Sat, 5 Apr 2025 00:10:41 +0000 (00:10 +0000)
committerOliver Upton <oliver.upton@linux.dev>
Sun, 6 Apr 2025 18:13:41 +0000 (11:13 -0700)
commitd8d78398e550039295e0237eafb703e2d21f7d57
treeb900323028c3d1ba039640ef79686689a21a7e1e
parent26fbdf36922711f285fd185ad644f0acdf15959f
KVM: arm64: selftests: Introduce and use hardware-definition macros

The kvm selftest library for arm64 currently configures the hardware
fields, such as shift and mask in the page-table entries and registers,
directly with numbers. While it add comments at places, it's better to
rewrite them with appropriate macros to improve the readability and
reduce the risk of errors. Hence, introduce macros to define the
hardware fields and use them in the arm64 processor library.

Most of the definitions are primary copied from the Linux's header,
arch/arm64/include/asm/pgtable-hwdef.h.

No functional change intended.

Suggested-by: Oliver Upton <oupton@google.com>
Signed-off-by: Raghavendra Rao Ananta <rananta@google.com>
Link: https://lore.kernel.org/r/20250405001042.1470552-2-rananta@google.com
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
tools/testing/selftests/kvm/arm64/page_fault_test.c
tools/testing/selftests/kvm/include/arm64/processor.h
tools/testing/selftests/kvm/lib/arm64/processor.c