From: Avi Kivity Date: Sun, 17 Aug 2008 13:03:46 +0000 (+0300) Subject: KVM: Handle spurious acks for PIT interrupts X-Git-Tag: v2.6.28-rc1~269^2~87 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=dc7404cea34ef997dfe89ca94d16358e9d29c8d8;p=linux-2.6-omap-h63xx.git KVM: Handle spurious acks for PIT interrupts Spurious acks can be generated, for example if the PIC is being reset. Handle those acks gracefully rather than flooding the log with warnings. Signed-off-by: Avi Kivity --- diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c index 7d04dd3ef85..c842060c6c0 100644 --- a/arch/x86/kvm/i8254.c +++ b/arch/x86/kvm/i8254.c @@ -228,7 +228,7 @@ void kvm_pit_ack_irq(struct kvm_irq_ack_notifier *kian) irq_ack_notifier); spin_lock(&ps->inject_lock); if (atomic_dec_return(&ps->pit_timer.pending) < 0) - WARN_ON(1); + atomic_inc(&ps->pit_timer.pending); ps->irq_ack = 1; spin_unlock(&ps->inject_lock); }