From: Peter Krempa Date: Fri, 19 Feb 2016 15:04:15 +0000 (+0100) Subject: qemu: emulatorpin: Always set affinity when pinning emulator thread X-Git-Tag: v1.3.2-rc1~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2242503efbfbacb6cd4b89091ee8bc313443e1b3;p=thirdparty%2Flibvirt.git qemu: emulatorpin: Always set affinity when pinning emulator thread Similarly to VM startup always set the legacy affinity. Additionally we don't need to report an explicit error since virProcessSetAffinity reports them themselves. --- diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 1927b3c3d3..48612549f9 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -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;