tools/libxl: correct vcpu affinity output with sparse physical cpu map

With not all physical cpus online (e.g. with smt=0) the output of hte
vcpu affinities is wrong, as the affinity bitmaps are capped after
nr_cpus bits, instead of using max_cpu_id.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
This commit is contained in:
Juergen Gross authored and Wei Liu committed 2018-09-05 11:21:26 +01:00
1 parent 30a9709060
commit 2ec5339ec9
1 file changed
+2 -2
+2 -2
View File
@@ -144,13 +144,13 @@ static void vcpulist(int argc, char **argv)
}
for (i = 0; i<nb_domain; i++)
print_domain_vcpuinfo(dominfo[i].domid, physinfo.nr_cpus);
print_domain_vcpuinfo(dominfo[i].domid, physinfo.max_cpu_id + 1);
libxl_dominfo_list_free(dominfo, nb_domain);
} else {
for (; argc > 0; ++argv, --argc) {
uint32_t domid = find_domain(*argv);
print_domain_vcpuinfo(domid, physinfo.nr_cpus);
print_domain_vcpuinfo(domid, physinfo.max_cpu_id + 1);
}
}
vcpulist_out:
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.