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 3936161f1f
)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
stable-2.9
parent
181e005f14
commit
0b906e4d0a
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue