]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: arm64: selftests: Add MMIO sign-extending load test
authorFuad Tabba <fuad.tabba@linux.dev>
Mon, 6 Jul 2026 11:55:22 +0000 (12:55 +0100)
committerMarc Zyngier <maz@kernel.org>
Mon, 6 Jul 2026 16:18:34 +0000 (17:18 +0100)
commit65a38ddeaeed1a962bc1b4ca03c98201c877fea5
tree3a98a2d777ac159dabfd7055e71dc79fdddcc88e
parent85f56708a443ec02a290878f00d79a1ff5110e41
KVM: arm64: selftests: Add MMIO sign-extending load test

Add a test for sign-extending MMIO loads (LDRSB, LDRSH, LDRSW) into Xt
and Wt destinations, with and without the sign bit set. The host supplies
the MMIO data and checks the guest register holds the sign-extended value.

Repeat the loads big-endian on a mixed-endian implementation. Issue those
at EL0: SCTLR_EL1.EE would make an EL1 load big-endian but also walk the
little-endian page tables big-endian, whereas SCTLR_EL1.E0E selects only
EL0 data endianness and leaves the walk little-endian.

Signed-off-by: Fuad Tabba <fuad.tabba@linux.dev>
Link: https://patch.msgid.link/20260706115522.954913-3-fuad.tabba@linux.dev
Signed-off-by: Marc Zyngier <maz@kernel.org>
tools/testing/selftests/kvm/Makefile.kvm
tools/testing/selftests/kvm/arm64/mmio_sign_ext.c [new file with mode: 0644]