[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v11 03/24] mttcg: Add missing tb_lock/unlock() in cp
From: |
Alex Bennée |
Subject: |
[Qemu-devel] [PATCH v11 03/24] mttcg: Add missing tb_lock/unlock() in cpu_exec_step() |
Date: |
Thu, 9 Feb 2017 17:08: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.
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 v11 00/24] MTTCG Base enabling patches with ARM enablement, Alex Bennée, 2017/02/09
- [Qemu-devel] [PATCH v11 02/24] mttcg: translate-all: Enable locking debug in a debug build, Alex Bennée, 2017/02/09
- [Qemu-devel] [PATCH v11 06/24] tcg: add kick timer for single-threaded vCPU emulation, Alex Bennée, 2017/02/09
- [Qemu-devel] [PATCH v11 03/24] mttcg: Add missing tb_lock/unlock() in cpu_exec_step(),
Alex Bennée <=
- [Qemu-devel] [PATCH v11 04/24] tcg: move TCG_MO/BAR types into own file, Alex Bennée, 2017/02/09
- [Qemu-devel] [PATCH v11 09/24] tcg: remove global exit_request, Alex Bennée, 2017/02/09
- [Qemu-devel] [PATCH v11 01/24] docs: new design document multi-thread-tcg.txt, Alex Bennée, 2017/02/09
- [Qemu-devel] [PATCH v11 05/24] tcg: add options for enabling MTTCG, Alex Bennée, 2017/02/09
- [Qemu-devel] [PATCH v11 14/24] cputlb: tweak qemu_ram_addr_from_host_nofail reporting, Alex Bennée, 2017/02/09
- [Qemu-devel] [PATCH v11 11/24] tcg: enable thread-per-vCPU, Alex Bennée, 2017/02/09
- [Qemu-devel] [PATCH v11 10/24] tcg: enable tb_lock() for SoftMMU, Alex Bennée, 2017/02/09
- [Qemu-devel] [PATCH v11 13/24] cputlb: add assert_cpu_is_self checks, Alex Bennée, 2017/02/09
- [Qemu-devel] [PATCH v11 12/24] tcg: handle EXCP_ATOMIC exception for system emulation, Alex Bennée, 2017/02/09
- [Qemu-devel] [PATCH v11 08/24] tcg: drop global lock during TCG code execution, Alex Bennée, 2017/02/09