提交 dc7404ce 编写于 作者: A Avi Kivity

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: NAvi Kivity <avi@qumranet.com>
上级 85428ac7
...@@ -228,7 +228,7 @@ void kvm_pit_ack_irq(struct kvm_irq_ack_notifier *kian) ...@@ -228,7 +228,7 @@ void kvm_pit_ack_irq(struct kvm_irq_ack_notifier *kian)
irq_ack_notifier); irq_ack_notifier);
spin_lock(&ps->inject_lock); spin_lock(&ps->inject_lock);
if (atomic_dec_return(&ps->pit_timer.pending) < 0) if (atomic_dec_return(&ps->pit_timer.pending) < 0)
WARN_ON(1); atomic_inc(&ps->pit_timer.pending);
ps->irq_ack = 1; ps->irq_ack = 1;
spin_unlock(&ps->inject_lock); spin_unlock(&ps->inject_lock);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册