Re: [PATCH 3/3] KVM: Reset PIT irq injection logic when the PIT IRQ is unmasked

2009-01-06 Thread Dor Laor
Avi Kivity wrote: Marcelo Tosatti wrote: I'm worried about: - boot guest using local apic timer - reset - boot with pit timer - a zillion interrupts So at the very least, we need a limiter. Or have a new notifier on kvm_pic_reset, instead of simply acking one pending irq? That seems th

Re: [PATCH 3/3] KVM: Reset PIT irq injection logic when the PIT IRQ is unmasked

2009-01-06 Thread Avi Kivity
Marcelo Tosatti wrote: I'm worried about: - boot guest using local apic timer - reset - boot with pit timer - a zillion interrupts So at the very least, we need a limiter. Or have a new notifier on kvm_pic_reset, instead of simply acking one pending irq? That seems the appropriate place

Re: [PATCH 3/3] KVM: Reset PIT irq injection logic when the PIT IRQ is unmasked

2009-01-05 Thread Marcelo Tosatti
On Mon, Jan 05, 2009 at 10:59:01PM +0200, Avi Kivity wrote: > Marcelo Tosatti wrote: >> On Sun, Jan 04, 2009 at 06:14:45PM +0200, Avi Kivity wrote: >> >>> While the PIT is masked the guest cannot ack the irq, so the reinject logic >>> will never allow the interrupt to be injected. >>> >>> Fix by

Re: [PATCH 3/3] KVM: Reset PIT irq injection logic when the PIT IRQ is unmasked

2009-01-05 Thread Avi Kivity
Marcelo Tosatti wrote: On Sun, Jan 04, 2009 at 06:14:45PM +0200, Avi Kivity wrote: While the PIT is masked the guest cannot ack the irq, so the reinject logic will never allow the interrupt to be injected. Fix by resetting the reinjection counters on unmask. Unbreaks Xen. diff --git a/arch

Re: [PATCH 3/3] KVM: Reset PIT irq injection logic when the PIT IRQ is unmasked

2009-01-05 Thread Marcelo Tosatti
On Sun, Jan 04, 2009 at 06:14:45PM +0200, Avi Kivity wrote: > While the PIT is masked the guest cannot ack the irq, so the reinject logic > will never allow the interrupt to be injected. > > Fix by resetting the reinjection counters on unmask. > > Unbreaks Xen. > > Signed-off-by: Avi Kivity > -

[PATCH 3/3] KVM: Reset PIT irq injection logic when the PIT IRQ is unmasked

2009-01-04 Thread Avi Kivity
While the PIT is masked the guest cannot ack the irq, so the reinject logic will never allow the interrupt to be injected. Fix by resetting the reinjection counters on unmask. Unbreaks Xen. Signed-off-by: Avi Kivity --- arch/x86/kvm/i8254.c | 15 +++ arch/x86/kvm/i8254.h |1 +