On 26/06/2015 17:39, Frederic Konrad wrote: >>> >>> @@ -11567,6 +11570,7 @@ void arm_cpu_dump_state(CPUState *cs, FILE >>> *f, fprintf_function cpu_fprintf, >>> void restore_state_to_opc(CPUARMState *env, TranslationBlock *tb, >>> int pc_pos) >>> { >>> + tb_lock(); >>> if (is_a64(env)) { >>> env->pc = tcg_ctx.gen_opc_pc[pc_pos]; >>> env->condexec_bits = 0; >>> @@ -11574,4 +11578,5 @@ void restore_state_to_opc(CPUARMState *env, >>> TranslationBlock *tb, int pc_pos) >>> env->regs[15] = tcg_ctx.gen_opc_pc[pc_pos]; >>> env->condexec_bits = gen_opc_condexec_bits[pc_pos]; >>> } >>> + tb_unlock(); >>> } >> Should these instead be added to the callers? >> >> Paolo > Good point, > I see only one caller and the mutex is already locked.
Good, then add a comment in include/exec/exec-all.h ("/* Called with tb_lock held. */") please!