virDomainNumatuneMemMode mem_mode;
virCgroupPtr cgroup = NULL;
virBitmapPtr use_cpumask = NULL;
+ virBitmapPtr afinity_cpumask = NULL;
g_autoptr(virBitmap) hostcpumap = NULL;
char *mem_mask = NULL;
int ret = -1;
* its config file */
if (qemuProcessGetAllCpuAffinity(&hostcpumap) < 0)
goto cleanup;
- use_cpumask = hostcpumap;
+ afinity_cpumask = hostcpumap;
}
/*
}
+ if (!afinity_cpumask)
+ afinity_cpumask = use_cpumask;
+
/* Setup legacy affinity. */
- if (use_cpumask && virProcessSetAffinity(pid, use_cpumask) < 0)
+ if (afinity_cpumask && virProcessSetAffinity(pid, afinity_cpumask) < 0)
goto cleanup;
/* Set scheduler type and priority, but not for the main thread. */