From: Juergen Gross Date: Tue, 14 Jun 2016 04:30:58 +0000 (+0200) Subject: xl: correct xl cpupool-numa-split with vcpu limited dom0 X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~917 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=c256d2afc1cad0cca912492e338d6ff97e477c4f;p=xen.git xl: correct xl cpupool-numa-split with vcpu limited dom0 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 Signed-off-by: Juergen Gross Reviewed-by: Dario Faggioli Acked-by: Wei Liu --- diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index 70d3fd9fc7..6459eec053 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -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);