mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-07-31 05:57:16 +00:00
qemu: process: Move clearing of QEMU_CAPS_CHARDEV_FD_PASS to qemuProcessPrepareQEMUCaps
Move the post-processing of the QEMU_CAPS_CHARDEV_FD_PASS flag to the new function. The clearing of the capability is based on the presence of VIR_QEMU_PROCESS_START_STANDALONE so we must also pass in the process start flags. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
parent
3a075524d9
commit
97c9ece79b
@ -5490,6 +5490,7 @@ qemuProcessStartUpdateCustomCaps(virDomainObjPtr vm)
|
|||||||
* qemuProcessPrepareQEMUCaps:
|
* qemuProcessPrepareQEMUCaps:
|
||||||
* @vm: domain object
|
* @vm: domain object
|
||||||
* @qemuCapsCache: cache of QEMU capabilities
|
* @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
|
* Prepare the capabilities of a QEMU process for startup. This includes
|
||||||
* copying the caps to a static cache and potential post-processing depending
|
* copying the caps to a static cache and potential post-processing depending
|
||||||
@ -5499,7 +5500,8 @@ qemuProcessStartUpdateCustomCaps(virDomainObjPtr vm)
|
|||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
qemuProcessPrepareQEMUCaps(virDomainObjPtr vm,
|
qemuProcessPrepareQEMUCaps(virDomainObjPtr vm,
|
||||||
virFileCachePtr qemuCapsCache)
|
virFileCachePtr qemuCapsCache,
|
||||||
|
unsigned int processStartFlags)
|
||||||
{
|
{
|
||||||
qemuDomainObjPrivatePtr priv = vm->privateData;
|
qemuDomainObjPrivatePtr priv = vm->privateData;
|
||||||
size_t i;
|
size_t i;
|
||||||
@ -5519,6 +5521,9 @@ qemuProcessPrepareQEMUCaps(virDomainObjPtr vm,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (processStartFlags & VIR_QEMU_PROCESS_START_STANDALONE)
|
||||||
|
virQEMUCapsClear(priv->qemuCaps, QEMU_CAPS_CHARDEV_FD_PASS);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5574,12 +5579,9 @@ qemuProcessInit(virQEMUDriverPtr driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
VIR_DEBUG("Determining emulator version");
|
VIR_DEBUG("Determining emulator version");
|
||||||
if (qemuProcessPrepareQEMUCaps(vm, driver->qemuCapsCache) < 0)
|
if (qemuProcessPrepareQEMUCaps(vm, driver->qemuCapsCache, flags) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (flags & VIR_QEMU_PROCESS_START_STANDALONE)
|
|
||||||
virQEMUCapsClear(priv->qemuCaps, QEMU_CAPS_CHARDEV_FD_PASS);
|
|
||||||
|
|
||||||
if (qemuDomainUpdateCPU(vm, updatedCPU, &origCPU) < 0)
|
if (qemuDomainUpdateCPU(vm, updatedCPU, &origCPU) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user