aboutsummaryrefslogtreecommitdiff
path: root/util/main-loop.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/main-loop.c')
-rw-r--r--util/main-loop.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/util/main-loop.c b/util/main-loop.c
index 217c8d6056..0c5fe0107e 100644
--- a/util/main-loop.c
+++ b/util/main-loop.c
@@ -27,7 +27,7 @@
#include "qemu/cutils.h"
#include "qemu/timer.h"
#include "sysemu/qtest.h"
-#include "sysemu/cpus.h"
+#include "sysemu/cpu-timers.h"
#include "sysemu/replay.h"
#include "qemu/main-loop.h"
#include "block/aio.h"
@@ -521,9 +521,13 @@ void main_loop_wait(int nonblocking)
mlpoll.state = ret < 0 ? MAIN_LOOP_POLL_ERR : MAIN_LOOP_POLL_OK;
notifier_list_notify(&main_loop_poll_notifiers, &mlpoll);
- /* CPU thread can infinitely wait for event after
- missing the warp */
- qemu_start_warp_timer();
+ if (icount_enabled()) {
+ /*
+ * CPU thread can infinitely wait for event after
+ * missing the warp
+ */
+ qemu_start_warp_timer();
+ }
qemu_clock_run_all_timers();
}