VM startup and CPU hotplug always set the affinity regardless of cgroups
support. Use the same approach for the pinning API.
---
src/qemu/qemu_driver.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 24c1ca4..d1e5188 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -5068,12 +5068,11 @@ qemuDomainPinVcpuFlags(virDomainPtr dom,
goto endjob;
if (qemuSetupCgroupCpusetCpus(cgroup_vcpu, pcpumap) < 0)
goto endjob;
- } else {
- if (virProcessSetAffinity(qemuDomainGetVcpuPid(vm, vcpu),
- pcpumap) < 0)
- goto endjob;
}
+ if (virProcessSetAffinity(qemuDomainGetVcpuPid(vm, vcpu), pcpumap) < 0)
+ goto endjob;
+
virBitmapFree(vcpuinfolive->cpumask);
vcpuinfolive->cpumask = pcpumaplive;
pcpumaplive = NULL;
--
2.6.2