Re: [PATCH] hw/timer/hpet: Fix expiration time overflow

2023-02-28 Thread Akihiko Odaki
On 2023/02/28 21:57, Michael S. Tsirkin wrote: On Mon, Jan 30, 2023 at 11:55:18PM +0100, Philippe Mathieu-Daudé wrote: On 30/1/23 14:50, Akihiko Odaki wrote: The expiration time provided for timer_mod() can overflow if a ridiculously large value is set to the comparator register. The resulting

Re: [PATCH] hw/timer/hpet: Fix expiration time overflow

2023-02-28 Thread Michael S. Tsirkin
On Mon, Jan 30, 2023 at 11:55:18PM +0100, Philippe Mathieu-Daudé wrote: > On 30/1/23 14:50, Akihiko Odaki wrote: > > The expiration time provided for timer_mod() can overflow if a > > ridiculously large value is set to the comparator register. The > > resulting value can represent a past time after

Re: [PATCH] hw/timer/hpet: Fix expiration time overflow

2023-01-30 Thread Philippe Mathieu-Daudé
On 30/1/23 14:50, Akihiko Odaki wrote: The expiration time provided for timer_mod() can overflow if a ridiculously large value is set to the comparator register. The resulting value can represent a past time after rounded, forcing the timer to fire immediately. If the timer is configured as perio

Re: [PATCH] hw/timer/hpet: Fix expiration time overflow

2023-01-30 Thread Michael S. Tsirkin
On Mon, Jan 30, 2023 at 10:50:01PM +0900, Akihiko Odaki wrote: > The expiration time provided for timer_mod() can overflow if a > ridiculously large value is set to the comparator register. The > resulting value can represent a past time after rounded, forcing the > timer to fire immediately. If th

[PATCH] hw/timer/hpet: Fix expiration time overflow

2023-01-30 Thread Akihiko Odaki
The expiration time provided for timer_mod() can overflow if a ridiculously large value is set to the comparator register. The resulting value can represent a past time after rounded, forcing the timer to fire immediately. If the timer is configured as periodic, it will rearm the timer again, and f