]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Prohibit chaning affinity of domain process if placement is 'auto'
authorOsier Yang <jyang@redhat.com>
Wed, 24 Oct 2012 09:46:00 +0000 (17:46 +0800)
committerOsier Yang <jyang@redhat.com>
Wed, 24 Oct 2012 14:26:11 +0000 (22:26 +0800)
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.

src/qemu/qemu_driver.c

index 8af316fd714ead5cc0e3800f807db88d811f4902..254f191d690589b77a8e75b9bc0748e2eca0d12d 100644 (file)
@@ -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;