/**
- * qemuDomainDetectVcpuPids:
+ * qemuDomainRefreshVcpuInfo:
* @driver: qemu driver data
* @vm: domain object
* @asyncJob: current asynchronous job type
*
- * Updates vCPU thread ids in the private data of @vm.
+ * Updates vCPU information private data of @vm.
*
* Returns number of detected vCPU threads on success, -1 on error and reports
* an appropriate error, -2 if the domain doesn't exist any more.
*/
int
-qemuDomainDetectVcpuPids(virQEMUDriverPtr driver,
- virDomainObjPtr vm,
- int asyncJob)
+qemuDomainRefreshVcpuInfo(virQEMUDriverPtr driver,
+ virDomainObjPtr vm,
+ int asyncJob)
{
virDomainVcpuDefPtr vcpu;
size_t maxvcpus = virDomainDefGetVcpusMax(vm->def);
bool qemuDomainHasVcpuPids(virDomainObjPtr vm);
pid_t qemuDomainGetVcpuPid(virDomainObjPtr vm, unsigned int vcpuid);
-int qemuDomainDetectVcpuPids(virQEMUDriverPtr driver, virDomainObjPtr vm,
- int asyncJob);
+int qemuDomainRefreshVcpuInfo(virQEMUDriverPtr driver,
+ virDomainObjPtr vm,
+ int asyncJob);
bool qemuDomainSupportsNicdev(virDomainDefPtr def,
virDomainNetDefPtr net);
vcpuinfo->online = true;
- if ((rc = qemuDomainDetectVcpuPids(driver, vm, QEMU_ASYNC_JOB_NONE)) <= 0) {
+ if ((rc = qemuDomainRefreshVcpuInfo(driver, vm, QEMU_ASYNC_JOB_NONE)) <= 0) {
/* vcpu pids were not detected, skip setting of affinity */
if (rc == 0)
ret = 0;
goto cleanup;
}
- if ((rc = qemuDomainDetectVcpuPids(driver, vm, QEMU_ASYNC_JOB_NONE)) < 0) {
+ if ((rc = qemuDomainRefreshVcpuInfo(driver, vm, QEMU_ASYNC_JOB_NONE)) < 0) {
/* rollback only if domain didn't exit */
if (rc == -2)
goto cleanup;
if (qemuSetupCpusetMems(vm) < 0)
goto cleanup;
- VIR_DEBUG("Detecting VCPU PIDs");
- if (qemuDomainDetectVcpuPids(driver, vm, asyncJob) < 0)
+ VIR_DEBUG("Refreshing VCPU info");
+ if (qemuDomainRefreshVcpuInfo(driver, vm, asyncJob) < 0)
goto cleanup;
VIR_DEBUG("Detecting IOThread PIDs");
}
VIR_DEBUG("Detecting VCPU PIDs");
- if (qemuDomainDetectVcpuPids(driver, vm, QEMU_ASYNC_JOB_NONE) < 0)
+ if (qemuDomainRefreshVcpuInfo(driver, vm, QEMU_ASYNC_JOB_NONE) < 0)
goto error;
VIR_DEBUG("Detecting IOThread PIDs");