[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH V7 11/19] tcg: switch on multithread.
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [RFC PATCH V7 11/19] tcg: switch on multithread. |
Date: |
Thu, 13 Aug 2015 13:17:14 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 |
On 10/08/2015 17:27, address@hidden wrote:
> + while (!cpu->exit_request) {
> qemu_clock_enable(QEMU_CLOCK_VIRTUAL,
> (cpu->singlestep_enabled & SSTEP_NOTIMER) == 0);
>
> @@ -1507,7 +1480,7 @@ static void tcg_exec_all(void)
> }
> }
>
> - first_cpu->exit_request = 0;
> + cpu->exit_request = 0;
One issue here is that when tcg_cpu_exec returns EXCP_HALTED, the
function keeps looping. There is no need to set cpu->exit_request in
that case, since in fact there is no request pending, so the while loop
probably should be an "if".
Also, cpu->interrupt_request is not protected by any mutex, so
everything apart from the non-zero test must take the iothread mutex.
Paolo
- [Qemu-devel] [RFC PATCH V7 08/19] tcg: remove tcg_halt_cond global variable., (continued)
- [Qemu-devel] [RFC PATCH V7 08/19] tcg: remove tcg_halt_cond global variable., fred . konrad, 2015/08/10
- [Qemu-devel] [RFC PATCH V7 09/19] Drop global lock during TCG code execution, fred . konrad, 2015/08/10
- Re: [Qemu-devel] [RFC PATCH V7 09/19] Drop global lock during TCG code execution, Paolo Bonzini, 2015/08/10
- Re: [Qemu-devel] [RFC PATCH V7 09/19] Drop global lock during TCG code execution, Frederic Konrad, 2015/08/11
- Re: [Qemu-devel] [RFC PATCH V7 09/19] Drop global lock during TCG code execution, Alex Bennée, 2015/08/11
- Re: [Qemu-devel] [RFC PATCH V7 09/19] Drop global lock during TCG code execution, Frederic Konrad, 2015/08/11
- Re: [Qemu-devel] [RFC PATCH V7 09/19] Drop global lock during TCG code execution, Paolo Bonzini, 2015/08/12
- Re: [Qemu-devel] [RFC PATCH V7 09/19] Drop global lock during TCG code execution, Frederic Konrad, 2015/08/12
[Qemu-devel] [RFC PATCH V7 11/19] tcg: switch on multithread., fred . konrad, 2015/08/10
- Re: [Qemu-devel] [RFC PATCH V7 11/19] tcg: switch on multithread.,
Paolo Bonzini <=
[Qemu-devel] [RFC PATCH V7 13/19] add a callback when tb_invalidate is called., fred . konrad, 2015/08/10
[Qemu-devel] [RFC PATCH V7 10/19] cpu: remove exit_request global., fred . konrad, 2015/08/10
[Qemu-devel] [RFC PATCH V7 12/19] Use atomic cmpxchg to atomically check the exclusive value in a STREX, fred . konrad, 2015/08/10
[Qemu-devel] [RFC PATCH V7 14/19] cpu: introduce tlb_flush*_all., fred . konrad, 2015/08/10