
在 2018-01-05 21:16:20,"John Ferlan" <jferlan@redhat.com> 写道:
On 01/05/2018 05:40 AM, Ján Tomko wrote:
On Fri, Dec 22, 2017 at 04:04:03PM +0800, Chen Hanxiao wrote:
From: Chen Hanxiao <chenhanxiao@gmail.com>
[...]
+ if ((ret = qemuDomainWaitForDeviceRemoval(vm)) == 1) + ret = qemuDomainRemoveRedirdevDevice(driver, vm, tmpRedirdevDef);
If qemuDomainWaitForDeviceRemoval returns 0 (QEMU supports DEVICE_DEL_EVENT and did not unplug the device in 5 seconds), then libvirtd should remove the device asynchronnously, when the device deletion event arrives.
qemuDomainRemoveRedirdevDevice needs to be also called from qemuDomainRemoveDevice for that to happen.
Jan
oh yeah - right, adding :
+ case VIR_DOMAIN_DEVICE_REDIRDEV: + ret = qemuDomainRemoveRedirdevDevice(driver, vm, dev->data.redirdev); + break; +
to qemuDomainRemoveDevice
Thanks, will be updated soon. Regards, - Chen