pci: deassert intx when pci device unrealize
PATCH 1/1 pci: deassert intx when pci device unrealize
If a pci device is not reset by VM (by writing into config space) and unplugged by VM, after that when VM reboots, qemu may assert:pcibus_reset: Assertion `bus->irq_count[i] == 0' failed
Signed-off-by herongguang <[email protected]>
--- hw/pci/pci.c | 1 + 1 file changed, 1 insertion(+)
hw/pci/pci.c +1 -0
@@ -1083,6 +1083,7 @@ static void pci_qdev_unrealize(DeviceState *dev, Error **errp) pc->exit (pci_dev); } +pci_device_deassert_intx (pci_dev);do_pci_unregister_device (pci_dev); }
--
1.7.12.4
Quoted 22 lines · Herongguang (Stephen)
If a pci device is not reset by VM (by writing into config space) and unplugged by VM, after that when VM reboots, qemu may assert:
pcibus_reset: Assertion `bus->irq_count[i] == 0' failedSigned-off-by herongguang <[email protected]>--- hw/pci/pci.c | 1 + 1 file changed, 1 insertion(+)hw/pci/pci.c +1
-1@@ -1083,6 +1083,7 @@ static void pci_qdev_unrealize(DeviceState *dev, Error **errp) pc->exit (pci_dev); } +pci_device_deassert_intx (pci_dev);do_pci_unregister_device (pci_dev); } --
Quoted 1 line
1.7.12.4
Reviewed-by Marcel Apfelbaum <[email protected]>
Thanks,
Marcel