mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-28 11:21:44 +03:00
qemu: command: Don't hide 'vhost' fds from 'standalone' command line
We already format a commandline using FD passing for the tap devices so formatting the 'vhost' file descriptors won't make it any less usable directly. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
5b9c880e89
commit
0b64b75a09
@ -8684,8 +8684,7 @@ qemuInterfaceVhostuserConnect(virCommand *cmd,
|
||||
int
|
||||
qemuBuildInterfaceConnect(virDomainObj *vm,
|
||||
virDomainNetDef *net,
|
||||
virNetDevVPortProfileOp vmop,
|
||||
bool standalone)
|
||||
virNetDevVPortProfileOp vmop)
|
||||
{
|
||||
|
||||
qemuDomainObjPrivate *priv = vm->privateData;
|
||||
@ -8767,7 +8766,7 @@ qemuBuildInterfaceConnect(virDomainObj *vm,
|
||||
}
|
||||
}
|
||||
|
||||
if (vhostfd && !standalone) {
|
||||
if (vhostfd) {
|
||||
if (qemuInterfaceOpenVhostNet(vm, net) < 0)
|
||||
return -1;
|
||||
}
|
||||
@ -8783,7 +8782,6 @@ qemuBuildInterfaceCommandLine(virQEMUDriver *driver,
|
||||
virDomainNetDef *net,
|
||||
virQEMUCaps *qemuCaps,
|
||||
virNetDevVPortProfileOp vmop,
|
||||
bool standalone,
|
||||
size_t *nnicindexes,
|
||||
int **nicindexes)
|
||||
{
|
||||
@ -8801,7 +8799,7 @@ qemuBuildInterfaceCommandLine(virQEMUDriver *driver,
|
||||
if (qemuDomainValidateActualNetDef(net, qemuCaps) < 0)
|
||||
return -1;
|
||||
|
||||
if (qemuBuildInterfaceConnect(vm, net, vmop, standalone) < 0)
|
||||
if (qemuBuildInterfaceConnect(vm, net, vmop) < 0)
|
||||
return -1;
|
||||
|
||||
switch (actualType) {
|
||||
@ -8991,7 +8989,6 @@ qemuBuildNetCommandLine(virQEMUDriver *driver,
|
||||
virCommand *cmd,
|
||||
virQEMUCaps *qemuCaps,
|
||||
virNetDevVPortProfileOp vmop,
|
||||
bool standalone,
|
||||
size_t *nnicindexes,
|
||||
int **nicindexes)
|
||||
{
|
||||
@ -9005,8 +9002,7 @@ qemuBuildNetCommandLine(virQEMUDriver *driver,
|
||||
|
||||
if (qemuBuildInterfaceCommandLine(driver, vm, cmd, net,
|
||||
qemuCaps, vmop,
|
||||
standalone, nnicindexes,
|
||||
nicindexes) < 0)
|
||||
nnicindexes, nicindexes) < 0)
|
||||
goto error;
|
||||
|
||||
last_good_net = i;
|
||||
@ -10596,8 +10592,7 @@ qemuBuildCommandLine(virQEMUDriver *driver,
|
||||
if (qemuBuildFilesystemCommandLine(cmd, def, qemuCaps, priv) < 0)
|
||||
return NULL;
|
||||
|
||||
if (qemuBuildNetCommandLine(driver, vm, cmd,
|
||||
qemuCaps, vmop, standalone,
|
||||
if (qemuBuildNetCommandLine(driver, vm, cmd, qemuCaps, vmop,
|
||||
nnicindexes, nicindexes) < 0)
|
||||
return NULL;
|
||||
|
||||
|
@ -91,8 +91,7 @@ qemuBuildHostNetProps(virDomainNetDef *net);
|
||||
int
|
||||
qemuBuildInterfaceConnect(virDomainObj *vm,
|
||||
virDomainNetDef *net,
|
||||
virNetDevVPortProfileOp vmop,
|
||||
bool standalone);
|
||||
virNetDevVPortProfileOp vmop);
|
||||
|
||||
/* Current, best practice */
|
||||
virJSONValue *
|
||||
|
@ -1268,7 +1268,7 @@ qemuDomainAttachNetDevice(virQEMUDriver *driver,
|
||||
*/
|
||||
VIR_APPEND_ELEMENT_COPY(vm->def->nets, vm->def->nnets, net);
|
||||
|
||||
if (qemuBuildInterfaceConnect(vm, net, VIR_NETDEV_VPORT_PROFILE_OP_CREATE, false) < 0)
|
||||
if (qemuBuildInterfaceConnect(vm, net, VIR_NETDEV_VPORT_PROFILE_OP_CREATE) < 0)
|
||||
return -1;
|
||||
|
||||
iface_connected = true;
|
||||
|
Loading…
Reference in New Issue
Block a user