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

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

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

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

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 resetting the

[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 a...@redhat.com --- arch/x86/kvm/i8254.c | 15 +++