[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/5] qemu-timer: fix off-by-one
From: |
Alex Bennée |
Subject: |
Re: [Qemu-devel] [PATCH 1/5] qemu-timer: fix off-by-one |
Date: |
Fri, 10 Mar 2017 09:46:02 +0000 |
User-agent: |
mu4e 0.9.19; emacs 25.2.8 |
Paolo Bonzini <address@hidden> writes:
> 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 without icount,
> but with icount execution of instructions will stop exactly at the deadline.
>
> Signed-off-by: Paolo Bonzini <address@hidden>
Reviewed-by: Alex Bennée <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)
--
Alex Bennée
- [Qemu-devel] [PATCH 0/6] tcg: fix icount super slowdown, Paolo Bonzini, 2017/03/03
- [Qemu-devel] [PATCH 2/5] qemu-timer: do not include sysemu/cpus.h from util/qemu-timer.h, Paolo Bonzini, 2017/03/03
- [Qemu-devel] [PATCH 1/5] qemu-timer: fix off-by-one, Paolo Bonzini, 2017/03/03
- [Qemu-devel] [PATCH 4/5] main-loop: remove now unnecessary optimization, Paolo Bonzini, 2017/03/03
- [Qemu-devel] [PATCH 5/5] icount: process QEMU_CLOCK_VIRTUAL timers in vCPU thread, Paolo Bonzini, 2017/03/03
- Re: [Qemu-devel] [PATCH 5/5] icount: process QEMU_CLOCK_VIRTUAL timers in vCPU thread, Alex Bennée, 2017/03/13
- Re: [Qemu-devel] [PATCH 5/5] icount: process QEMU_CLOCK_VIRTUAL timers in vCPU thread, Paolo Bonzini, 2017/03/13
- Re: [Qemu-devel] [PATCH 5/5] icount: process QEMU_CLOCK_VIRTUAL timers in vCPU thread, Alex Bennée, 2017/03/13
- Re: [Qemu-devel] [PATCH 5/5] icount: process QEMU_CLOCK_VIRTUAL timers in vCPU thread, Paolo Bonzini, 2017/03/14
- Re: [Qemu-devel] [PATCH 5/5] icount: process QEMU_CLOCK_VIRTUAL timers in vCPU thread, Paolo Bonzini, 2017/03/14
- Re: [Qemu-devel] [PATCH 5/5] icount: process QEMU_CLOCK_VIRTUAL timers in vCPU thread, Alex Bennée, 2017/03/14