virDomainDefPtr persistentDef;
int ret = -1;
qemuDomainObjPrivatePtr priv;
- bool doReset = false;
virBitmapPtr pcpumap = NULL;
virQEMUDriverConfigPtr cfg = NULL;
virObjectEventPtr event = NULL;
goto endjob;
}
- /* pinning to all physical cpus means resetting,
- * so check if we can reset setting.
- */
- if (virBitmapIsAllSet(pcpumap))
- doReset = true;
-
if (def) {
if (virCgroupHasController(priv->cgroup, VIR_CGROUP_CONTROLLER_CPUSET)) {
if (virCgroupNewThread(priv->cgroup, VIR_CGROUP_THREAD_EMULATOR,
virBitmapFree(def->cputune.emulatorpin);
def->cputune.emulatorpin = NULL;
- if (!doReset &&
- !(def->cputune.emulatorpin = virBitmapNewCopy(pcpumap)))
+ if (!(def->cputune.emulatorpin = virBitmapNewCopy(pcpumap)))
goto endjob;
if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0)
virBitmapFree(persistentDef->cputune.emulatorpin);
persistentDef->cputune.emulatorpin = NULL;
- if (!doReset &&
- !(persistentDef->cputune.emulatorpin = virBitmapNewCopy(pcpumap)))
+ if (!(persistentDef->cputune.emulatorpin = virBitmapNewCopy(pcpumap)))
goto endjob;
ret = virDomainSaveConfig(cfg->configDir, persistentDef);