mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-16 03:24:31 +03:00
qemuDomainAttachNetDevice: Don't construct network device properties under monitor lock
After the 'qemuFDPass' code was refactored we no longer need to hand off the FD to qemu before we know the path for it. Thus the call to qemuBuildHostNetProps can be moved outside of the monitor critical section. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
29067596f2
commit
3e9cc6e78e
@ -1452,17 +1452,15 @@ qemuDomainAttachNetDevice(virQEMUDriver *driver,
|
||||
for (i = 0; i < vhostfdSize; i++)
|
||||
vhostfdName[i] = g_strdup_printf("vhostfd-%s%zu", net->info.alias, i);
|
||||
|
||||
qemuDomainObjEnterMonitor(driver, vm);
|
||||
|
||||
if (qemuFDPassTransferMonitor(netpriv->vdpafd, priv->mon) < 0) {
|
||||
qemuDomainObjExitMonitor(vm);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (!(netprops = qemuBuildHostNetProps(net,
|
||||
tapfdName, tapfdSize,
|
||||
vhostfdName, vhostfdSize,
|
||||
slirpfdName))) {
|
||||
slirpfdName)))
|
||||
goto cleanup;
|
||||
|
||||
qemuDomainObjEnterMonitor(driver, vm);
|
||||
|
||||
if (qemuFDPassTransferMonitor(netpriv->vdpafd, priv->mon) < 0) {
|
||||
qemuDomainObjExitMonitor(vm);
|
||||
goto cleanup;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user