From 9047b9aec0d2f224edd072cd81ca0a20a4a77796 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Wed, 17 Oct 2018 14:59:52 +0100 Subject: [PATCH] Revert "qemu: Forbid pinning vCPUs for TCG domain" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 8b035c84d8a7362a87a95e6114b8e7f959685ed9. The MTTCG impl in QEMU does allow pinning vCPUs. When the guest is running we already check if pinning is possible in the qemuDomainPinVcpuLive method, so this check was adding no benefit. When the guest is not running, we cannot know whether the subsequent launch will use MTTCG or TCG, so we must allow the pinning request. If the guest does use TCG on the next launch it will fail, but this is no worse than if the user had done a virDomainDefineXML with an XML doc specifying vCPU pinning. Reviewed-by: John Ferlan Signed-off-by: Daniel P. Berrangé --- src/qemu/qemu_driver.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 26edbf799f..46b2f758ca 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -5177,13 +5177,6 @@ qemuDomainPinVcpuFlags(virDomainPtr dom, if (virDomainObjGetDefs(vm, flags, &def, &persistentDef) < 0) goto endjob; - if ((def && def->virtType == VIR_DOMAIN_VIRT_QEMU) || - (persistentDef && persistentDef->virtType == VIR_DOMAIN_VIRT_QEMU)) { - virReportError(VIR_ERR_OPERATION_FAILED, "%s", - _("Virt type 'qemu' does not support vCPU pinning")); - goto endjob; - } - if (persistentDef && !(vcpuinfo = virDomainDefGetVcpu(persistentDef, vcpu))) { virReportError(VIR_ERR_INVALID_ARG,