From: Osier Yang Date: Wed, 24 Oct 2012 09:46:00 +0000 (+0800) Subject: qemu: Prohibit chaning affinity of domain process if placement is 'auto' X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=a6bd7c22ea31af5db0251733ce1321addb9d27a4;p=libvirt.git qemu: Prohibit chaning affinity of domain process if placement is 'auto' On one hand, numad probably will manage the affinity of domain process dynamically in future. On the other hand, even numad won't manage it, it still could confusion. Let's make things simpler enough to avoid the lair for now. --- diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 8af316fd71..254f191d69 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -4204,6 +4204,13 @@ qemudDomainPinEmulator(virDomainPtr dom, goto cleanup; } + if (vm->def->placement_mode == VIR_DOMAIN_CPU_PLACEMENT_MODE_AUTO) { + virReportError(VIR_ERR_OPERATION_INVALID, "%s", + _("Changing affinity for emulator thread dynamically " + "is not allowed when CPU placement is 'auto'")); + goto cleanup; + } + if (virDomainLiveConfigHelperMethod(driver->caps, vm, &flags, &persistentDef) < 0) goto cleanup;