Re: [PATCH] mc146818rtc: fix timer interrupt reinjection

2019-10-10 Thread Marcelo Tosatti
On Wed, Oct 09, 2019 at 11:13:16PM +0200, Paolo Bonzini wrote: > On 09/10/19 20:40, Marcelo Tosatti wrote: > > s->period = period; > > lost_clock += old_irq_coalesced * old_period; > > -s->irq_coalesced = lost_clock / s->period; > > +if (old_period)

Re: [PATCH] mc146818rtc: fix timer interrupt reinjection

2019-10-09 Thread Paolo Bonzini
On 09/10/19 20:40, Marcelo Tosatti wrote: > s->period = period; > lost_clock += old_irq_coalesced * old_period; > -s->irq_coalesced = lost_clock / s->period; > +if (old_period) { > +s->irq_coalesced = lost_clock / s->period; > +