[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 12/18] qemu-timer: fix off-by-one
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 12/18] qemu-timer: fix off-by-one |
Date: |
Tue, 14 Mar 2017 17:18:14 +0100 |
If the first timer is exactly at the current value of the clock, the
deadline is met and the timer should fire. This fixes itself on the next
iteration of the loop without icount; with icount, however, execution
of instructions will stop exactly at the deadline and won't proceed.
Reviewed-by: Alex Bennée <address@hidden>
Reviewed-by: Edgar E. Iglesias <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
util/qemu-timer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/util/qemu-timer.c b/util/qemu-timer.c
index 6cf70b9..2f20151 100644
--- a/util/qemu-timer.c
+++ b/util/qemu-timer.c
@@ -199,7 +199,7 @@ bool timerlist_expired(QEMUTimerList *timer_list)
expire_time = timer_list->active_timers->expire_time;
qemu_mutex_unlock(&timer_list->active_timers_lock);
- return expire_time < qemu_clock_get_ns(timer_list->clock->type);
+ return expire_time <= qemu_clock_get_ns(timer_list->clock->type);
}
bool qemu_clock_expired(QEMUClockType type)
--
1.8.3.1
- [Qemu-devel] [PULL 00/18] Misc patches for QEMU 2.9 hard freeze, Paolo Bonzini, 2017/03/14
- [Qemu-devel] [PULL 02/18] docs: Add a note about mixing bootindex with "-boot order", Paolo Bonzini, 2017/03/14
- [Qemu-devel] [PULL 04/18] exec: add cpu_synchronize_state to cpu_memory_rw_debug, Paolo Bonzini, 2017/03/14
- [Qemu-devel] [PULL 05/18] kvm: Print MSR information if KVM_{GET, SET}_MSRS failed, Paolo Bonzini, 2017/03/14
- [Qemu-devel] [PULL 03/18] mem-prealloc: reduce large guest start-up and migration time., Paolo Bonzini, 2017/03/14
- [Qemu-devel] [PULL 06/18] kvmclock: Don't crash QEMU if KVM is disabled, Paolo Bonzini, 2017/03/14
- [Qemu-devel] [PULL 01/18] memory_region: Fix name comments, Paolo Bonzini, 2017/03/14
- [Qemu-devel] [PULL 08/18] configure: add the missing help output for optional features, Paolo Bonzini, 2017/03/14
- [Qemu-devel] [PULL 07/18] scripts/dump-guest-memory.py: fix int128_get64 on recent gcc, Paolo Bonzini, 2017/03/14
- [Qemu-devel] [PULL 09/18] util: Removed unneeded header from path.c, Paolo Bonzini, 2017/03/14
- [Qemu-devel] [PULL 12/18] qemu-timer: fix off-by-one,
Paolo Bonzini <=
- [Qemu-devel] [PULL 13/18] qemu-timer: do not include sysemu/cpus.h from util/qemu-timer.h, Paolo Bonzini, 2017/03/14
- [Qemu-devel] [PULL 14/18] cpus: define QEMUTimerListNotifyCB for QEMU system emulation, Paolo Bonzini, 2017/03/14
- [Qemu-devel] [PULL 16/18] icount: process QEMU_CLOCK_VIRTUAL timers in vCPU thread, Paolo Bonzini, 2017/03/14
- [Qemu-devel] [PULL 18/18] nbd/client: fix drop_sync [CVE-2017-2630], Paolo Bonzini, 2017/03/14
- [Qemu-devel] [PULL 11/18] target/nios2: take BQL around interrupt check, Paolo Bonzini, 2017/03/14
- [Qemu-devel] [PULL 10/18] scsi: mptsas: fix the wrong reading size in fetch request, Paolo Bonzini, 2017/03/14
- [Qemu-devel] [PULL 17/18] memory: info mtree check mr range overflow, Paolo Bonzini, 2017/03/14
- [Qemu-devel] [PULL 15/18] main-loop: remove now unnecessary optimization, Paolo Bonzini, 2017/03/14
- Re: [Qemu-devel] [PULL 00/18] Misc patches for QEMU 2.9 hard freeze, Peter Maydell, 2017/03/14