]> xenbits.xensource.com Git - xen.git/commitdiff
xl: correct xl cpupool-numa-split with vcpu limited dom0
authorJuergen Gross <jgross@suse.com>
Tue, 14 Jun 2016 04:30:58 +0000 (06:30 +0200)
committerWei Liu <wei.liu2@citrix.com>
Fri, 17 Jun 2016 10:27:21 +0000 (11:27 +0100)
When trying to use xl cpupool-numa-split and dom0 is limited to less
vcpus than one numa node the operation will fail.

Correct this by allowing this configuration.

Reported-by: Glenn Enright <glenn@rimuhosting.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Dario Faggioli <dario.faggioli@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/libxl/xl_cmdimpl.c

index 70d3fd9fc77b322c1b33807e44d2d66ac5e1591a..6459eec0530a298ff63ff582a2c6bf331d5b2dc2 100644 (file)
@@ -8539,7 +8539,11 @@ int main_cpupoolnumasplit(int argc, char **argv)
             n++;
         }
     }
-    if (libxl_set_vcpuonline(ctx, 0, &cpumap)) {
+    if (libxl_domain_info(ctx, &info, 0)) {
+        fprintf(stderr, "error on getting info for Domain-0\n");
+        goto out;
+    }
+    if (info.vcpu_online > n && libxl_set_vcpuonline(ctx, 0, &cpumap)) {
         fprintf(stderr, "error on removing vcpus for Domain-0\n");
         goto out;
     }
@@ -8554,7 +8558,7 @@ int main_cpupoolnumasplit(int argc, char **argv)
             fprintf(stderr, "error on getting info for Domain-0\n");
             goto out;
         }
-        if (info.vcpu_online == n) {
+        if (info.vcpu_online <= n) {
             break;
         }
         sleep(1);