On 13/08/2015 13:17, Paolo Bonzini wrote:
On 10/08/2015 17:27, fred.kon...@greensocs.com 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".
Nice catch thanks!
I missed the fact that it was running through the list of VCPUs and
exited the
for(;;) loop.
I should rework this patch a little.. Maybe it's better to keep this
loop and exit it
when necessary eg: when icount elapse or cpu halted.
Fred
Also, cpu->interrupt_request is not protected by any mutex, so
everything apart from the non-zero test must take the iothread mutex.
Paolo