qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RFC] icount: warp in the main_loop.


From: fred . konrad
Subject: [Qemu-devel] [RFC] icount: warp in the main_loop.
Date: Tue, 1 Jul 2014 18:13:40 +0200

From: KONRAD Frederic <address@hidden>

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 <address@hidden>
---
 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]