aboutsummaryrefslogtreecommitdiff
path: root/cpus.c
diff options
context:
space:
mode:
authorVictor CLEMENT <victor.clement@openwide.fr>2015-05-29 17:14:06 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2015-06-05 17:10:00 +0200
commitd7a0f71d9aac33e58d39fdbe4861d440af44fa8b (patch)
tree49d5f894556e14d0bfbc9355702f8912e19120c3 /cpus.c
parentf1f4b57e88ff7c9cb20b074ff6106fd8f4397baa (diff)
icount: print a warning if there is no more deadline in sleep=no mode
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 <victor.clement@openwide.fr> Message-Id: <1432912446-9811-4-git-send-email-victor.clement@openwide.fr> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'cpus.c')
-rw-r--r--cpus.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/cpus.c b/cpus.c
index 4e90e63b43..f38b858f9b 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;
}