[Qemu-devel] [PULL 20/49] cpu-exec: reset BQL after longjmp in cpu_exec_step_atomic

Paolo Bonzini posted 49 patches 6 years, 9 months ago
Only 48 patches received!
[Qemu-devel] [PULL 20/49] cpu-exec: reset BQL after longjmp in cpu_exec_step_atomic
Posted by Paolo Bonzini 6 years, 9 months ago
From: "Emilio G. Cota" <cota@braap.org>

Just like we do in cpu_exec().

Reported-by: Max Filippov <jcmvbkbc@gmail.com>
Tested-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Emilio G. Cota <cota@braap.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 accel/tcg/cpu-exec.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c
index 55e0ca4..fefd955 100644
--- a/accel/tcg/cpu-exec.c
+++ b/accel/tcg/cpu-exec.c
@@ -266,6 +266,9 @@ void cpu_exec_step_atomic(CPUState *cpu)
 #ifndef CONFIG_SOFTMMU
         tcg_debug_assert(!have_mmap_lock());
 #endif
+        if (qemu_mutex_iothread_locked()) {
+            qemu_mutex_unlock_iothread();
+        }
         assert_no_pages_locked();
     }
 
-- 
1.8.3.1