[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH V6 05/18] protect TBContext with tb_lock.
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [RFC PATCH V6 05/18] protect TBContext with tb_lock. |
Date: |
Fri, 26 Jun 2015 17:45:43 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1 |
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!
[Qemu-devel] [RFC PATCH V6 08/18] cpu: remove exit_request global., fred . konrad, 2015/06/26
[Qemu-devel] [RFC PATCH V6 09/18] cpu: add a tcg_executing flag., fred . konrad, 2015/06/26
[Qemu-devel] [RFC PATCH V6 10/18] tcg: switch on multithread., fred . konrad, 2015/06/26
[Qemu-devel] [RFC PATCH V6 11/18] cpus: make qemu_cpu_kick_thread public., fred . konrad, 2015/06/26
[Qemu-devel] [RFC PATCH V6 07/18] Drop global lock during TCG code execution, fred . konrad, 2015/06/26