KVM: arm64: selftests: Add MMIO readl/writel support
authorRaghavendra Rao Ananta <rananta@google.com>
Thu, 7 Oct 2021 23:34:25 +0000 (23:34 +0000)
committerMarc Zyngier <maz@kernel.org>
Sun, 17 Oct 2021 10:15:11 +0000 (11:15 +0100)
commit88ec7e258b70eed5e532d32115fccd11ea2a6287
tree1d9a69affdedec58146e868ed9a7981c24a51a55
parent9e1ff307c779ce1f0f810c7ecce3d95bbae40896
KVM: arm64: selftests: Add MMIO readl/writel support

Define the readl() and writel() functions for the guests to
access (4-byte) the MMIO region.

The routines, and their dependents, are inspired from the kernel's
arch/arm64/include/asm/io.h and arch/arm64/include/asm/barrier.h.

Signed-off-by: Raghavendra Rao Ananta <rananta@google.com>
Reviewed-by: Oliver Upton <oupton@google.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211007233439.1826892-2-rananta@google.com
tools/testing/selftests/kvm/include/aarch64/processor.h