if (qemuDomainAdjustMaxMemLock(vm) < 0)
goto removedef;
- if (qemuProcessSetupEmulator(vm, true) < 0)
+ if (qemuProcessSetupEmulator(vm) < 0)
goto removedef;
restoreemulatorcgroup = true;
VIR_WARN("Unable to remove memory device from /dev");
if (releaseaddr)
qemuDomainReleaseMemoryDeviceSlot(vm, mem);
+ if (restoreemulatorcgroup)
+ qemuProcessSetupEmulator(vm);
}
- if (restoreemulatorcgroup)
- qemuProcessSetupEmulator(vm, false);
-
virDomainMemoryDefFree(mem);
return ret;
mem_mode == VIR_DOMAIN_NUMATUNE_MEM_RESTRICTIVE)) {
/* QEMU allocates its memory from the emulator thread. Thus it
- * needs to access union of all host nodes configured. This is
- * going to be replaced with proper value later in the startup
- * process. */
+ * needs to access union of all host nodes configured. */
if (unionMems &&
nameval == VIR_CGROUP_THREAD_EMULATOR &&
mem_mode != VIR_DOMAIN_NUMATUNE_MEM_RESTRICTIVE) {
int
-qemuProcessSetupEmulator(virDomainObj *vm,
- bool unionMems)
+qemuProcessSetupEmulator(virDomainObj *vm)
{
return qemuProcessSetupPid(vm, vm->pid, VIR_CGROUP_THREAD_EMULATOR,
0, vm->def->cputune.emulatorpin,
vm->def->cputune.emulator_period,
vm->def->cputune.emulator_quota,
vm->def->cputune.emulatorsched,
- unionMems);
+ true);
}
goto cleanup;
VIR_DEBUG("Setting emulator tuning/settings");
- if (qemuProcessSetupEmulator(vm, true) < 0)
+ if (qemuProcessSetupEmulator(vm) < 0)
goto cleanup;
VIR_DEBUG("Setting cgroup for external devices (if required)");
if (qemuConnectAgent(driver, vm) < 0)
goto cleanup;
- VIR_DEBUG("Fixing up emulator tuning/settings");
- if (qemuProcessSetupEmulator(vm, false) < 0)
- goto cleanup;
-
VIR_DEBUG("setting up hotpluggable cpus");
if (qemuDomainHasHotpluggableStartupVcpus(vm->def)) {
if (qemuDomainRefreshVcpuInfo(vm, asyncJob, false) < 0)