summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/kvm/s390x
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2019-07-31 17:15:24 +0200
committerChristian Borntraeger <borntraeger@de.ibm.com>2019-08-02 15:44:23 +0200
commitf90f57b3971a3370be5a3cf02ae783b4bf728b7f (patch)
tree4a57cdb4946f22f05b5e2ff7ec0880c6c8c92b53 /tools/testing/selftests/kvm/s390x
parent2040f414d12f31be3e73eb3f5048d2b1cdec48f6 (diff)
KVM: selftests: Implement ucall() for s390x
On s390x, we can neither exit via PIO nor MMIO, but have to use an instruction like DIAGNOSE. Now that ucall() is implemented, we can use it in the sync_reg_test on s390x, too. Reviewed-by: Andrew Jones <drjones@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com> Link: https://lore.kernel.org/r/20190731151525.17156-3-thuth@redhat.com Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'tools/testing/selftests/kvm/s390x')
-rw-r--r--tools/testing/selftests/kvm/s390x/sync_regs_test.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/testing/selftests/kvm/s390x/sync_regs_test.c b/tools/testing/selftests/kvm/s390x/sync_regs_test.c
index e85ff0d69548..bbc93094519b 100644
--- a/tools/testing/selftests/kvm/s390x/sync_regs_test.c
+++ b/tools/testing/selftests/kvm/s390x/sync_regs_test.c
@@ -25,9 +25,11 @@
static void guest_code(void)
{
+ register u64 stage asm("11") = 0;
+
for (;;) {
- asm volatile ("diag 0,0,0x501");
- asm volatile ("ahi 11,1");
+ GUEST_SYNC(0);
+ asm volatile ("ahi %0,1" : : "r"(stage));
}
}