[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v7 03/27] mttcg: Add missing tb_lock/unlock() in cpu
From: |
Alex Bennée |
Subject: |
[Qemu-devel] [PATCH v7 03/27] mttcg: Add missing tb_lock/unlock() in cpu_exec_step() |
Date: |
Thu, 19 Jan 2017 17:04:43 +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.
CC: Richard Henderson <address@hidden>
CC: Alex Bennée <address@hidden>
Signed-off-by: Pranith Kumar <address@hidden>
---
cpu-exec.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/cpu-exec.c b/cpu-exec.c
index 4188fed3c6..1b8685dc21 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 v7 00/27] Remaining MTTCG Base patches and ARM enablement, Alex Bennée, 2017/01/19
- [Qemu-devel] [PATCH v7 03/27] mttcg: Add missing tb_lock/unlock() in cpu_exec_step(),
Alex Bennée <=
- [Qemu-devel] [PATCH v7 01/27] docs: new design document multi-thread-tcg.txt, Alex Bennée, 2017/01/19
- [Qemu-devel] [PATCH v7 06/27] tcg: add kick timer for single-threaded vCPU emulation, Alex Bennée, 2017/01/19
- [Qemu-devel] [PATCH v7 04/27] tcg: move TCG_MO/BAR types into own file, Alex Bennée, 2017/01/19
- [Qemu-devel] [PATCH v7 07/27] tcg: rename tcg_current_cpu to tcg_current_rr_cpu, Alex Bennée, 2017/01/19
- [Qemu-devel] [PATCH v7 05/27] tcg: add options for enabling MTTCG, Alex Bennée, 2017/01/19