]> www.infradead.org Git - users/dwmw2/linux.git/commit
KVM: fix handling of ACK from shared guest IRQ
authorMark McLoughlin <markmc@redhat.com>
Tue, 2 Dec 2008 12:16:33 +0000 (12:16 +0000)
committerAvi Kivity <avi@redhat.com>
Wed, 10 Dec 2008 09:32:58 +0000 (11:32 +0200)
commitdf1095d4818ac87347ebb58795b28ee435bf512d
tree5636c1ba87b7cf11cfcda59efc0fe728a9c0c1aa
parent2f1be8b8b60d24e7f12002650544d0d95550f7cd
KVM: fix handling of ACK from shared guest IRQ

If an assigned device shares a guest irq with an emulated
device then we currently interpret an ack generated by the
emulated device as originating from the assigned device
leading to e.g. "Unbalanced enable for IRQ 4347" from the
enable_irq() in kvm_assigned_dev_ack_irq().

The fix is fairly simple - don't enable the physical device
irq unless it was previously disabled.

Of course, this can still lead to a situation where a
non-assigned device ACK can cause the physical device irq to
be reenabled before the device was serviced. However, being
level sensitive, the interrupt will merely be regenerated.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
include/linux/kvm_host.h
virt/kvm/kvm_main.c