mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
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 commitc256d2afc1) (cherry picked from commit78a3010381) (cherry picked from commitf8972b4223)
This commit is contained in:
1 parent
e86a6fb6cd
commit
9eb11dcf46
1 file changed
+6
-2
@@ -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);
|
||||
|
||||