diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 53dcb3efaa..62013c672f 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -3160,6 +3160,9 @@ static void vfio_realize(PCIDevice *pdev, Error **errp) return; out_deregister: + if (vdev->interrupt == VFIO_INT_INTx) { + vfio_intx_disable(vdev); + } pci_device_set_intx_routing_notifier(&vdev->pdev, NULL); if (vdev->irqchip_change_notifier.notify) { kvm_irqchip_remove_change_notifier(&vdev->irqchip_change_notifier);