From: Pranith Kumar Date: Thu, 23 Feb 2017 18:29:06 +0000 (+0000) Subject: mttcg: Add missing tb_lock/unlock() in cpu_exec_step() X-Git-Tag: v2.9.0-rc0~70^2~21 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4ec667042d9ac017daad318ad848cd05cd823df8;p=thirdparty%2Fqemu.git mttcg: Add missing tb_lock/unlock() in cpu_exec_step() The recent patch enabling lock assertions uncovered the missing lock acquisition in cpu_exec_step(). This patch adds them. Signed-off-by: Pranith Kumar Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- diff --git a/cpu-exec.c b/cpu-exec.c index 142a5862fc3..ec84fdb3d73 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -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)