s390x/misc_helper.c: wrap s390_virtio_hypercall in BQL
authorAurelien Jarno <aurelien@aurel32.net>
Sun, 23 Apr 2017 22:32:40 +0000 (00:32 +0200)
committerAlexander Graf <agraf@suse.de>
Tue, 25 Apr 2017 11:39:43 +0000 (13:39 +0200)
s390_virtio_hypercall can trigger IO events and interrupts, most notably
when using virtio-ccw devices.

Reviewed-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Fixes: 278f5e98c647 ("s390x/misc_helper.c: wrap IO instructions in BQL")
Signed-off-by: Alexander Graf <agraf@suse.de>
target/s390x/misc_helper.c

index 83d38944d78a04cebe20345b660b8eea351425f9..eca82441d05b60a869c78d52367ea28d93f58da0 100644 (file)
@@ -288,7 +288,9 @@ void HELPER(diag)(CPUS390XState *env, uint32_t r1, uint32_t r3, uint32_t num)
     switch (num) {
     case 0x500:
         /* KVM hypercall */
+        qemu_mutex_lock_iothread();
         r = s390_virtio_hypercall(env);
+        qemu_mutex_unlock_iothread();
         break;
     case 0x44:
         /* yield */