Skip to content
This repository has been archived by the owner on May 5, 2021. It is now read-only.

Commit

Permalink
pci-assign: Update legacy interrupts only if used
Browse files Browse the repository at this point in the history
Don't mess with assign_intx on devices that are in MSI or MSI-X mode, it
would corrupt their interrupt routing.

Signed-off-by: Jan Kiszka <[email protected]>
Signed-off-by: Marcelo Tosatti <[email protected]>
  • Loading branch information
jan-kiszka authored and matosatti committed Aug 24, 2011
1 parent 6ab4cde commit 096392e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions hw/device-assignment.c
Original file line number Diff line number Diff line change
Expand Up @@ -1052,9 +1052,12 @@ void assigned_dev_update_irqs(void)
dev = QLIST_FIRST(&devs);
while (dev) {
next = QLIST_NEXT(dev, next);
r = assign_irq(dev);
if (r < 0)
qdev_unplug(&dev->dev.qdev);
if (dev->irq_requested_type & KVM_DEV_IRQ_HOST_INTX) {
r = assign_irq(dev);
if (r < 0) {
qdev_unplug(&dev->dev.qdev);
}
}
dev = next;
}
}
Expand Down

0 comments on commit 096392e

Please sign in to comment.