KVM: s390: selftests: memop: add a simple AR test
authorEric Farman <farman@linux.ibm.com>
Tue, 20 Feb 2024 21:12:11 +0000 (22:12 +0100)
committerHeiko Carstens <hca@linux.ibm.com>
Thu, 22 Feb 2024 15:06:56 +0000 (16:06 +0100)
commit559a1462909b893c52b41e2e39c364af8bacae8a
treed59b5b16cdbe88a42eb903f80d5b17a1870775fd
parent01be7f53dfc29e0a362f3d05e5ab2c8dfcc171c8
KVM: s390: selftests: memop: add a simple AR test

There is a selftest that checks for an (expected) error when an
invalid AR is specified, but not one that exercises the AR path.

Add a simple test that mirrors the vanilla write/read test while
providing an AR. An AR that contains zero will direct the CPU to
use the primary address space normally used anyway. AR[1] is
selected for this test because the host AR[1] is usually non-zero,
and KVM needs to correctly swap those values.

Reviewed-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Signed-off-by: Eric Farman <farman@linux.ibm.com>
Link: https://lore.kernel.org/r/20240220211211.3102609-3-farman@linux.ibm.com
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
tools/testing/selftests/kvm/s390x/memop.c