]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: emulatorpin: Always set affinity when pinning emulator thread
authorPeter Krempa <pkrempa@redhat.com>
Fri, 19 Feb 2016 15:04:15 +0000 (16:04 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 19 Feb 2016 15:47:09 +0000 (16:47 +0100)
Similarly to VM startup always set the legacy affinity. Additionally we
don't need to report an explicit error since virProcessSetAffinity
reports them themselves.

src/qemu/qemu_driver.c

index 1927b3c3d336e238d434e4229bd750986ad18ad5..48612549f956fccb9f4e848a2dea0a59d9472d57 100644 (file)
@@ -5276,15 +5276,11 @@ qemuDomainPinEmulator(virDomainPtr dom,
                                  " for emulator threads"));
                 goto endjob;
             }
-        } else {
-            if (virProcessSetAffinity(vm->pid, pcpumap) < 0) {
-                virReportError(VIR_ERR_SYSTEM_ERROR, "%s",
-                               _("failed to set cpu affinity for "
-                                 "emulator thread"));
-                goto endjob;
-            }
         }
 
+        if (virProcessSetAffinity(vm->pid, pcpumap) < 0)
+            goto endjob;
+
         virBitmapFree(def->cputune.emulatorpin);
         def->cputune.emulatorpin = NULL;