[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC PATCH] pci: deassert intx when pci device unrealize
From: |
Herongguang (Stephen) |
Subject: |
[Qemu-devel] [RFC PATCH] pci: deassert intx when pci device unrealize |
Date: |
Mon, 24 Apr 2017 21:12:29 +0800 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 |
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 <address@hidden>
---
Is there need to call pci_do_device_reset()?
---
hw/pci/pci.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 259483b..afe6397 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -1078,6 +1078,7 @@ static void pci_qdev_unrealize(DeviceState *dev, Error
**errp)
pci_unregister_io_regions(pci_dev);
pci_del_option_rom(pci_dev);
+ pci_device_deassert_intx(pci_dev);
if (pc->exit) {
pc->exit(pci_dev);
--
1.7.12.4
- [Qemu-devel] [RFC PATCH] pci: deassert intx when pci device unrealize,
Herongguang (Stephen) <=