aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2019-11-18 13:16:46 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2019-11-18 13:16:46 +0100
commitfe289ebb65eee604f08fd1f8ab33ded3e955a7df (patch)
tree786ded63b34d0c62bbe0821e1dbf5860248f6001 /tools/testing
parentKVM: x86: deliver KVM IOAPIC scan request to target vCPUs (diff)
parentKVM: s390: Do not yield when target is already running (diff)
downloadlinux-dev-fe289ebb65eee604f08fd1f8ab33ded3e955a7df.tar.xz
linux-dev-fe289ebb65eee604f08fd1f8ab33ded3e955a7df.zip
Merge tag 'kvm-s390-next-5.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD
KVM: s390: small fixes and enhancements - selftest improvements - yield improvements - cleanups
Diffstat (limited to 'tools/testing')
-rw-r--r--tools/testing/selftests/kvm/s390x/sync_regs_test.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/tools/testing/selftests/kvm/s390x/sync_regs_test.c b/tools/testing/selftests/kvm/s390x/sync_regs_test.c
index d5290b4ad636..b705637ca14b 100644
--- a/tools/testing/selftests/kvm/s390x/sync_regs_test.c
+++ b/tools/testing/selftests/kvm/s390x/sync_regs_test.c
@@ -25,12 +25,15 @@
static void guest_code(void)
{
- register u64 stage asm("11") = 0;
-
- for (;;) {
- GUEST_SYNC(0);
- asm volatile ("ahi %0,1" : : "r"(stage));
- }
+ /*
+ * We embed diag 501 here instead of doing a ucall to avoid that
+ * the compiler has messed with r11 at the time of the ucall.
+ */
+ asm volatile (
+ "0: diag 0,0,0x501\n"
+ " ahi 11,1\n"
+ " j 0b\n"
+ );
}
#define REG_COMPARE(reg) \