From: Juergen Gross Date: Fri, 31 Aug 2018 15:22:04 +0000 (+0200) Subject: tools/libxl: correct vcpu affinity output with sparse physical cpu map X-Git-Tag: archive/raspbian/4.11.3+24-g14b62ab3e5-1+rpi1~1^2~55^2~18 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=b55ff4c879ac202c5d53ad1985f86cc0865edb2f;p=xen.git 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 Acked-by: Wei Liu (cherry picked from commit 2ec5339ec9218fbf1583fa85b74d1d2f15f1b3b8) --- diff --git a/tools/xl/xl_vcpu.c b/tools/xl/xl_vcpu.c index 3384eeed06..c877f2595f 100644 --- a/tools/xl/xl_vcpu.c +++ b/tools/xl/xl_vcpu.c @@ -144,13 +144,13 @@ static void vcpulist(int argc, char **argv) } for (i = 0; i 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: