From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59748) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0tMu-0003Nd-LL for qemu-devel@nongnu.org; Fri, 05 Jun 2015 11:17:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z0tMt-0008Vt-MK for qemu-devel@nongnu.org; Fri, 05 Jun 2015 11:17:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53481) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0tMt-0008Vl-GG for qemu-devel@nongnu.org; Fri, 05 Jun 2015 11:17:11 -0400 From: Paolo Bonzini Date: Fri, 5 Jun 2015 17:15:38 +0200 Message-Id: <1433517363-32335-38-git-send-email-pbonzini@redhat.com> In-Reply-To: <1433517363-32335-1-git-send-email-pbonzini@redhat.com> References: <1433517363-32335-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PULL 37/62] icount: print a warning if there is no more deadline in sleep=no mode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Victor CLEMENT From: Victor CLEMENT 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 Message-Id: <1432912446-9811-4-git-send-email-victor.clement@openwide.fr> Signed-off-by: Paolo Bonzini --- 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