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 <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>
(cherry picked from commit c256d2afc1)
(cherry picked from commit 78a3010381)
(cherry picked from commit f8972b4223)
This commit is contained in:
Juergen Gross authored and Ian Jackson committed 2016-08-15 11:50:46 +01:00
1 parent e86a6fb6cd
commit 9eb11dcf46
1 file changed
+6 -2
+6 -2
View File
@@ -7542,7 +7542,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;
}
@@ -7551,7 +7555,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);
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.