diff options
author | Janis Schoetterl-Glausch <scgl@linux.ibm.com> | 2023-02-06 17:45:54 +0100 |
---|---|---|
committer | Janosch Frank <frankja@linux.ibm.com> | 2023-02-07 18:05:59 +0100 |
commit | 12c12a9924b475d6a20760f992fbf5e080747ae3 (patch) | |
tree | 273f531c108674eff8990fe315f3b47058ce8d3f /tools | |
parent | 76a2ee43ed9a34f163d0331e3ba320c34c66c64e (diff) | |
download | linux-12c12a9924b475d6a20760f992fbf5e080747ae3.tar.gz linux-12c12a9924b475d6a20760f992fbf5e080747ae3.tar.bz2 linux-12c12a9924b475d6a20760f992fbf5e080747ae3.zip |
KVM: s390: selftest: memop: Fix wrong address being used in test
The guest code sets the key for mem1 only. In order to provoke a
protection exception the test codes needs to address mem1.
Signed-off-by: Janis Schoetterl-Glausch <scgl@linux.ibm.com>
Reviewed-by: Nico Boehr <nrb@linux.ibm.com>
Link: https://lore.kernel.org/r/20230206164602.138068-7-scgl@linux.ibm.com
Message-Id: <20230206164602.138068-7-scgl@linux.ibm.com>
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/selftests/kvm/s390x/memop.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/kvm/s390x/memop.c b/tools/testing/selftests/kvm/s390x/memop.c index 033a8603a096..1ae5c01f9904 100644 --- a/tools/testing/selftests/kvm/s390x/memop.c +++ b/tools/testing/selftests/kvm/s390x/memop.c @@ -450,9 +450,9 @@ static void test_errors_key(void) /* vm/vcpu, mismatching keys, fetch protection in effect */ CHECK_N_DO(ERR_PROT_MOP, t.vcpu, LOGICAL, WRITE, mem1, t.size, GADDR_V(mem1), KEY(2)); - CHECK_N_DO(ERR_PROT_MOP, t.vcpu, LOGICAL, READ, mem2, t.size, GADDR_V(mem2), KEY(2)); + CHECK_N_DO(ERR_PROT_MOP, t.vcpu, LOGICAL, READ, mem2, t.size, GADDR_V(mem1), KEY(2)); CHECK_N_DO(ERR_PROT_MOP, t.vm, ABSOLUTE, WRITE, mem1, t.size, GADDR_V(mem1), KEY(2)); - CHECK_N_DO(ERR_PROT_MOP, t.vm, ABSOLUTE, READ, mem2, t.size, GADDR_V(mem2), KEY(2)); + CHECK_N_DO(ERR_PROT_MOP, t.vm, ABSOLUTE, READ, mem2, t.size, GADDR_V(mem1), KEY(2)); kvm_vm_free(t.kvm_vm); } |