summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorHerongguang (Stephen) <herongguang.he@huawei.com>2017-04-25 10:29:54 +0800
committerMichael Roth <mdroth@linux.vnet.ibm.com>2017-07-31 16:43:34 -0500
commit0b906e4d0ab270afda5de71977a84801e1ffac1d (patch)
tree29fd1cd7dfc0e42182469f85a87d778a32999989 /hw
parent181e005f14aebfba80e5703c770c18531f0c73a4 (diff)
downloadqemu-0b906e4d0ab270afda5de71977a84801e1ffac1d.tar.gz
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 Cc: qemu-stable@nongnu.org Signed-off-by: herongguang <herongguang.he@huawei.com> Reviewed-by: Marcel Apfelbaum <marcel@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> (cherry picked from commit 3936161f1fd72d1dfa577aaba910819c5e873260) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/pci/pci.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 259483b1c0..98ccc27533 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -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);
}