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 1927b3c..4861254 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;
--
2.6.2