提交 0b906e4d 编写于 作者: H Herongguang (Stephen) 提交者: Michael Roth

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: Nherongguang <herongguang.he@huawei.com>
Reviewed-by: NMarcel Apfelbaum <marcel@redhat.com>
Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
(cherry picked from commit 3936161f)
Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
上级 181e005f
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册