]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: cpu: Don't remove pinning of cold-unplugged cpu
authorPeter Krempa <pkrempa@redhat.com>
Thu, 10 Mar 2016 08:37:08 +0000 (09:37 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 10 Mar 2016 14:56:55 +0000 (15:56 +0100)
After adding support for offline vcpu pinning the code that removes the
pinning for cpu cold-unplug was forgotten. This fixes up commit 02ae21d

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1316371

src/qemu/qemu_driver.c

index 19caf934d0f1e311f51c54333c86d91dcc2b0395..91f5f518eaebcb5a90f74a95d6c8aca4aebe561d 100644 (file)
@@ -4917,19 +4917,6 @@ qemuDomainSetVcpusFlags(virDomainPtr dom, unsigned int nvcpus,
     }
 
     if (persistentDef) {
-        /* remove vcpupin entries for vcpus that were unplugged */
-        if (nvcpus < virDomainDefGetVcpus(persistentDef)) {
-            for (i = virDomainDefGetVcpus(persistentDef) - 1; i >= nvcpus; i--) {
-                virDomainVcpuInfoPtr vcpu = virDomainDefGetVcpu(persistentDef,
-                                                                i);
-
-                if (vcpu) {
-                    virBitmapFree(vcpu->cpumask);
-                    vcpu->cpumask = NULL;
-                }
-            }
-        }
-
         if (flags & VIR_DOMAIN_VCPU_MAXIMUM) {
             if (virDomainDefSetVcpusMax(persistentDef, nvcpus) < 0)
                 goto endjob;