From 2242503efbfbacb6cd4b89091ee8bc313443e1b3 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Fri, 19 Feb 2016 16:04:15 +0100 Subject: [PATCH] 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. --- src/qemu/qemu_driver.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) 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;