qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PULL 37/62] icount: print a warning if there is no more de


From: Paolo Bonzini
Subject: [Qemu-devel] [PULL 37/62] icount: print a warning if there is no more deadline in sleep=no mode
Date: Fri, 5 Jun 2015 17:15:38 +0200

From: Victor CLEMENT <address@hidden>

While qemu is running in sleep=no mode, a warning will be printed
when no timer deadline is set.
As this mode is intended for getting deterministic virtual time, if no
timer is set on the virtual clock this determinism is broken.

Signed-off-by: Victor CLEMENT <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
 cpus.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/cpus.c b/cpus.c
index 4e90e63..f38b858 100644
--- a/cpus.c
+++ b/cpus.c
@@ -419,6 +419,11 @@ void qemu_clock_warp(QEMUClockType type)
     clock = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL_RT);
     deadline = qemu_clock_deadline_ns_all(QEMU_CLOCK_VIRTUAL);
     if (deadline < 0) {
+        static bool notified;
+        if (!icount_sleep && !notified) {
+            error_report("WARNING: icount sleep disabled and no active 
timers");
+            notified = true;
+        }
         return;
     }
 
-- 
2.4.1





reply via email to

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