mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-03 20:01:16 +00:00
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.
This commit is contained in:
parent
cfbccb3821
commit
2ce90ea296
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user