From: Peter Krempa Date: Fri, 12 Feb 2016 06:05:24 +0000 (+0100) Subject: qemu: vcpupin: Always set affinity even when cgroups are supported X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=9958422d1065cdff0030f9f63e7e29e7113e311e;p=libvirt.git qemu: vcpupin: Always set affinity even when cgroups are supported VM startup and CPU hotplug always set the affinity regardless of cgroups support. Use the same approach for the pinning API. --- diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 24c1ca4386..d1e51889bc 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;