[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v10 03/23] mttcg: Add missing tb_lock/unlock() in cp
From: |
Alex Bennée |
Subject: |
[Qemu-devel] [PATCH v10 03/23] mttcg: Add missing tb_lock/unlock() in cpu_exec_step() |
Date: |
Mon, 6 Feb 2017 15:30:53 +0000 |
From: Pranith Kumar <address@hidden>
The recent patch enabling lock assertions uncovered the missing lock
acquisition in cpu_exec_step(). This patch adds them.
Signed-off-by: Pranith Kumar <address@hidden>
Signed-off-by: Alex Bennée <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
---
cpu-exec.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/cpu-exec.c b/cpu-exec.c
index 57583f16a0..97ff37eb73 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)
--
2.11.0
- [Qemu-devel] [PATCH v10 00/23] MTTCG Base enabling patches with ARM enablement, Alex Bennée, 2017/02/06
- [Qemu-devel] [PATCH v10 03/23] mttcg: Add missing tb_lock/unlock() in cpu_exec_step(),
Alex Bennée <=
- [Qemu-devel] [PATCH v10 04/23] tcg: move TCG_MO/BAR types into own file, Alex Bennée, 2017/02/06
- [Qemu-devel] [PATCH v10 01/23] docs: new design document multi-thread-tcg.txt, Alex Bennée, 2017/02/06
- [Qemu-devel] [PATCH v10 02/23] mttcg: translate-all: Enable locking debug in a debug build, Alex Bennée, 2017/02/06
- [Qemu-devel] [PATCH v10 07/23] tcg: rename tcg_current_cpu to tcg_current_rr_cpu, Alex Bennée, 2017/02/06
- [Qemu-devel] [PATCH v10 06/23] tcg: add kick timer for single-threaded vCPU emulation, Alex Bennée, 2017/02/06
- [Qemu-devel] [PATCH v10 10/23] tcg: enable tb_lock() for SoftMMU, Alex Bennée, 2017/02/06
- [Qemu-devel] [PATCH v10 05/23] tcg: add options for enabling MTTCG, Alex Bennée, 2017/02/06