]> Git Repo - qemu.git/commitdiff
s390x/tcg: fix DIAG 308 with > 1 VCPU (MTTCG)
authorDavid Hildenbrand <[email protected]>
Thu, 16 Nov 2017 17:05:26 +0000 (18:05 +0100)
committerCornelia Huck <[email protected]>
Mon, 20 Nov 2017 08:31:46 +0000 (09:31 +0100)
Currently, multi threaded TCG with > 1 VCPU gets stuck during IPL, when
the bios tries to switch to the loaded kernel via DIAG 308.

As run_on_cpu() is used, we run into a deadlock after handling the reset.
We need the iolock (just like KVM).

Signed-off-by: David Hildenbrand <[email protected]>
Message-Id: <20171116170526[email protected]>
Reviewed-by: Thomas Huth <[email protected]>
Signed-off-by: Cornelia Huck <[email protected]>
target/s390x/misc_helper.c

index 4afd90b96948b059ee3a98270cc10e9c6cd0b374..d272851e1ca05c5748ae9f763d07482787fcfafb 100644 (file)
@@ -103,7 +103,9 @@ void HELPER(diag)(CPUS390XState *env, uint32_t r1, uint32_t r3, uint32_t num)
         break;
     case 0x308:
         /* ipl */
+        qemu_mutex_lock_iothread();
         handle_diag_308(env, r1, r3);
+        qemu_mutex_unlock_iothread();
         r = 0;
         break;
     case 0x288:
This page took 0.029073 seconds and 4 git commands to generate.