]> git.proxmox.com Git - mirror_qemu.git/commitdiff
mttcg: Add missing tb_lock/unlock() in cpu_exec_step()
authorPranith Kumar <bobby.prani@gmail.com>
Thu, 23 Feb 2017 18:29:06 +0000 (18:29 +0000)
committerAlex Bennée <alex.bennee@linaro.org>
Fri, 24 Feb 2017 10:32:45 +0000 (10:32 +0000)
The recent patch enabling lock assertions uncovered the missing lock
acquisition in cpu_exec_step(). This patch adds them.

Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <rth@twiddle.net>
cpu-exec.c

index 142a5862fc31ec74a1b7127e669b690da48c0c14..ec84fdb3d739451bfef198b304ad736eda9e2b60 100644 (file)
@@ -233,14 +233,18 @@ static void cpu_exec_step(CPUState *cpu)
     uint32_t flags;
 
     cpu_get_tb_cpu_state(env, &pc, &cs_base, &flags);
+    tb_lock();
     tb = tb_gen_code(cpu, pc, cs_base, flags,
                      1 | CF_NOCACHE | CF_IGNORE_ICOUNT);
     tb->orig_tb = NULL;
+    tb_unlock();
     /* execute the generated code */
     trace_exec_tb_nocache(tb, pc);
     cpu_tb_exec(cpu, tb);
+    tb_lock();
     tb_phys_invalidate(tb, -1);
     tb_free(tb);
+    tb_unlock();
 }
 
 void cpu_exec_step_atomic(CPUState *cpu)