From 096392efe1e5ee670f880c96c31f7ea8d6d76cf4 Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Tue, 23 Aug 2011 19:32:58 +0200 Subject: [PATCH] pci-assign: Update legacy interrupts only if used 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 Signed-off-by: Marcelo Tosatti --- hw/device-assignment.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/device-assignment.c b/hw/device-assignment.c index bb4bbe03f..de0048d81 100644 --- a/hw/device-assignment.c +++ b/hw/device-assignment.c @@ -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; } }