From: KONRAD Frederic <fred.kon...@greensocs.com> This fixes a bug where QEMU stall in icount mode.
It happens when a simple timer callback is created on VIRTUAL CLOCK modding itself regularly. The actual warping mechanism is called once and then the time didn't grow anymore. Signed-off-by: KONRAD Frederic <fred.kon...@greensocs.com> --- main-loop.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main-loop.c b/main-loop.c index 8a85493..ef889b0 100644 --- a/main-loop.c +++ b/main-loop.c @@ -489,6 +489,12 @@ int main_loop_wait(int nonblocking) qemu_clock_run_all_timers(); + /* + * In icount mode, sometimes the VCPU is blocked and an event is needed to + * continue. + * Just warp to make the time grows and have a chance to run the CPU. + */ + qemu_clock_warp(QEMU_CLOCK_VIRTUAL); return ret; } -- 1.9.0