mirror of
https://github.com/libvirt/libvirt.git
synced 2026-10-02 12:20:06 -05:00
qemu_hotplug: enter monitor in order to rollback passed FD
Reported-by: Peter Krempa <pkrempa@redhat.com> Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
1 parent
fe782ed334
commit
4374dbbbf0
1 file changed
+5
-4
@@ -1674,15 +1674,16 @@ qemuDomainAttachHostPCIDevice(virQEMUDriver *driver,
|
||||
if (teardownmemlock && qemuDomainAdjustMaxMemLock(vm) < 0)
|
||||
VIR_WARN("Unable to reset maximum locked memory on hotplug fail");
|
||||
|
||||
if (removeiommufd) {
|
||||
qemuDomainObjEnterMonitor(vm);
|
||||
qemuDomainObjEnterMonitor(vm);
|
||||
|
||||
if (removeiommufd)
|
||||
ignore_value(qemuMonitorDelObject(priv->mon, "iommufd0", false));
|
||||
qemuDomainObjExitMonitor(vm);
|
||||
}
|
||||
|
||||
qemuFDPassDirectTransferMonitorRollback(hostdevPriv->vfioDeviceFd, priv->mon);
|
||||
qemuFDPassDirectTransferMonitorRollback(priv->iommufd, priv->mon);
|
||||
|
||||
qemuDomainObjExitMonitor(vm);
|
||||
|
||||
if (releaseaddr)
|
||||
qemuDomainReleaseDeviceAddress(vm, info);
|
||||
|
||||
|
||||
Reference in new issue
Block a user