mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 20:15:17 +00:00
qemuProcessPrepareQEMUCaps: Don't clear QEMU_CAPS_CHARDEV_FD_PASS_COMMANDLINE
All the fd-passing setup of chardevs which this hack meant to disable was moved to the host-preparation phase which is skipped for formatting of non-real commandlines. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
a85f0095f2
commit
dc5fd559eb
@ -6255,7 +6255,7 @@ static char *qemuConnectDomainXMLToNative(virConnectPtr conn,
|
||||
vm->def->nets[i] = newNet;
|
||||
}
|
||||
|
||||
if (qemuProcessCreatePretendCmdPrepare(driver, vm, NULL, true,
|
||||
if (qemuProcessCreatePretendCmdPrepare(driver, vm, NULL,
|
||||
VIR_QEMU_PROCESS_START_COLD) < 0)
|
||||
goto cleanup;
|
||||
|
||||
|
@ -5522,7 +5522,6 @@ qemuProcessStartUpdateCustomCaps(virDomainObj *vm)
|
||||
* qemuProcessPrepareQEMUCaps:
|
||||
* @vm: domain object
|
||||
* @qemuCapsCache: cache of QEMU capabilities
|
||||
* @processStartFlags: flags based on the VIR_QEMU_PROCESS_START_* enum
|
||||
*
|
||||
* Prepare the capabilities of a QEMU process for startup. This includes
|
||||
* copying the caps to a static cache and potential post-processing depending
|
||||
@ -5532,8 +5531,7 @@ qemuProcessStartUpdateCustomCaps(virDomainObj *vm)
|
||||
*/
|
||||
static int
|
||||
qemuProcessPrepareQEMUCaps(virDomainObj *vm,
|
||||
virFileCache *qemuCapsCache,
|
||||
unsigned int processStartFlags)
|
||||
virFileCache *qemuCapsCache)
|
||||
{
|
||||
qemuDomainObjPrivate *priv = vm->privateData;
|
||||
|
||||
@ -5544,9 +5542,6 @@ qemuProcessPrepareQEMUCaps(virDomainObj *vm,
|
||||
vm->def->os.machine)))
|
||||
return -1;
|
||||
|
||||
if (processStartFlags & VIR_QEMU_PROCESS_START_STANDALONE)
|
||||
virQEMUCapsClear(priv->qemuCaps, QEMU_CAPS_CHARDEV_FD_PASS_COMMANDLINE);
|
||||
|
||||
/* Update qemu capabilities according to lists passed in via namespace */
|
||||
if (qemuProcessStartUpdateCustomCaps(vm) < 0)
|
||||
return -1;
|
||||
@ -5605,7 +5600,7 @@ qemuProcessInit(virQEMUDriver *driver,
|
||||
}
|
||||
|
||||
VIR_DEBUG("Determining emulator version");
|
||||
if (qemuProcessPrepareQEMUCaps(vm, driver->qemuCapsCache, flags) < 0)
|
||||
if (qemuProcessPrepareQEMUCaps(vm, driver->qemuCapsCache) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (qemuDomainUpdateCPU(vm, updatedCPU, &origCPU) < 0)
|
||||
@ -7887,7 +7882,6 @@ int
|
||||
qemuProcessCreatePretendCmdPrepare(virQEMUDriver *driver,
|
||||
virDomainObj *vm,
|
||||
const char *migrateURI,
|
||||
bool standalone,
|
||||
unsigned int flags)
|
||||
{
|
||||
virCheckFlags(VIR_QEMU_PROCESS_START_COLD |
|
||||
@ -7899,9 +7893,6 @@ qemuProcessCreatePretendCmdPrepare(virQEMUDriver *driver,
|
||||
if (!migrateURI)
|
||||
flags |= VIR_QEMU_PROCESS_START_NEW;
|
||||
|
||||
if (standalone)
|
||||
flags |= VIR_QEMU_PROCESS_START_STANDALONE;
|
||||
|
||||
if (qemuProcessInit(driver, vm, NULL, QEMU_ASYNC_JOB_NONE,
|
||||
!!migrateURI, flags) < 0)
|
||||
return -1;
|
||||
|
@ -79,8 +79,6 @@ typedef enum {
|
||||
VIR_QEMU_PROCESS_START_PRETEND = 1 << 3,
|
||||
VIR_QEMU_PROCESS_START_NEW = 1 << 4, /* internal, new VM is starting */
|
||||
VIR_QEMU_PROCESS_START_GEN_VMID = 1 << 5, /* Generate a new VMID */
|
||||
VIR_QEMU_PROCESS_START_STANDALONE = 1 << 6, /* Require CLI args to be usable standalone,
|
||||
ie no FD passing and the like */
|
||||
} qemuProcessStartFlags;
|
||||
|
||||
int qemuProcessStart(virConnectPtr conn,
|
||||
@ -98,7 +96,6 @@ int qemuProcessStart(virConnectPtr conn,
|
||||
int qemuProcessCreatePretendCmdPrepare(virQEMUDriver *driver,
|
||||
virDomainObj *vm,
|
||||
const char *migrateURI,
|
||||
bool standalone,
|
||||
unsigned int flags);
|
||||
|
||||
virCommand *qemuProcessCreatePretendCmdBuild(virQEMUDriver *driver,
|
||||
|
@ -460,7 +460,7 @@ testCompareXMLToArgvCreateArgs(virQEMUDriver *drv,
|
||||
bool enableFips = !!(flags & FLAG_FIPS_HOST);
|
||||
size_t i;
|
||||
|
||||
if (qemuProcessCreatePretendCmdPrepare(drv, vm, migrateURI, false,
|
||||
if (qemuProcessCreatePretendCmdPrepare(drv, vm, migrateURI,
|
||||
VIR_QEMU_PROCESS_START_COLD) < 0)
|
||||
return NULL;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user