diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2009-09-01 12:15:14 -0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-09-08 20:33:37 -0700 |
commit | a9baf6a17556ebc308cf569ef6459e486735717b (patch) | |
tree | 5d0fb416ee4645bbdedc12a377ca2b02c70201ee /virt | |
parent | 14596338f2a9ad1f461f2683d41a8bc279962c40 (diff) |
KVM: fix ack not being delivered when msi present
(cherry picked from commit 5116d8f6b977970ebefc1932c0f313163a6ec91f)
kvm_notify_acked_irq does not check irq type, so that it sometimes
interprets msi vector as irq. As a result, ack notifiers are not
called, which typially hangs the guest. The fix is to track and
check irq type.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'virt')
-rw-r--r-- | virt/kvm/irq_comm.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/virt/kvm/irq_comm.c b/virt/kvm/irq_comm.c index 864ac5483ba..8f2018a03bd 100644 --- a/virt/kvm/irq_comm.c +++ b/virt/kvm/irq_comm.c @@ -141,7 +141,8 @@ void kvm_notify_acked_irq(struct kvm *kvm, unsigned irqchip, unsigned pin) unsigned gsi = pin; list_for_each_entry(e, &kvm->irq_routing, link) - if (e->irqchip.irqchip == irqchip && + if (e->type == KVM_IRQ_ROUTING_IRQCHIP && + e->irqchip.irqchip == irqchip && e->irqchip.pin == pin) { gsi = e->gsi; break; @@ -240,6 +241,7 @@ static int setup_routing_entry(struct kvm_kernel_irq_routing_entry *e, int delta; e->gsi = ue->gsi; + e->type = ue->type; switch (ue->type) { case KVM_IRQ_ROUTING_IRQCHIP: delta = 0; |