From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=46671 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pvv3j-00080s-Ac for qemu-devel@nongnu.org; Sat, 05 Mar 2011 12:14:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pvv3h-0004SL-UD for qemu-devel@nongnu.org; Sat, 05 Mar 2011 12:14:27 -0500 Received: from mail-qy0-f180.google.com ([209.85.216.180]:64148) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pvv3h-0004Ry-RW for qemu-devel@nongnu.org; Sat, 05 Mar 2011 12:14:25 -0500 Received: by qyk10 with SMTP id 10so3368961qyk.4 for ; Sat, 05 Mar 2011 09:14:25 -0800 (PST) Sender: Paolo Bonzini From: Paolo Bonzini Date: Sat, 5 Mar 2011 18:14:13 +0100 Message-Id: <1299345255-577-2-git-send-email-pbonzini@redhat.com> In-Reply-To: <1299345255-577-1-git-send-email-pbonzini@redhat.com> References: <1299345255-577-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 1/3] qemu_next_deadline should not consider host-time timers List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: edgar.iglesias@gmail.com, mtosatti@redhat.com, jan.kiszka@web.de It is purely for icount-based virtual timers. Signed-off-by: Paolo Bonzini --- qemu-timer.c | 7 +------ 1 files changed, 1 insertions(+), 6 deletions(-) diff --git a/qemu-timer.c b/qemu-timer.c index 88c7b28..06fa507 100644 --- a/qemu-timer.c +++ b/qemu-timer.c @@ -689,16 +689,11 @@ int64_t qemu_next_deadline(void) /* To avoid problems with overflow limit this to 2^32. */ int64_t delta = INT32_MAX; + assert(use_icount); if (active_timers[QEMU_CLOCK_VIRTUAL]) { delta = active_timers[QEMU_CLOCK_VIRTUAL]->expire_time - qemu_get_clock_ns(vm_clock); } - if (active_timers[QEMU_CLOCK_HOST]) { - int64_t hdelta = active_timers[QEMU_CLOCK_HOST]->expire_time - - qemu_get_clock_ns(host_clock); - if (hdelta < delta) - delta = hdelta; - } if (delta < 0) delta = 0; -- 1.7.4