提交 2ce90ea2 编写于 作者: O Osier Yang

qemu: Init reattaching related members of pciDevice before reattach

Otherwise the device will still be bound to pci-stub driver even
it's set as "managed=yes" when do detaching. Of course, it won't
triger any driver reprobing too.
上级 cfbccb38
......@@ -1761,6 +1761,7 @@ int qemuDomainDetachHostPciDevice(struct qemud_driver *driver,
pciDeviceListDel(driver->activePciHostdevs, pci);
if (pciResetDevice(pci, driver->activePciHostdevs, NULL) < 0)
ret = -1;
pciDeviceReAttachInit(pci);
qemuReattachPciDevice(pci, driver);
pciFreeDevice(pci);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册