[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen staging] tools/libxl: correct vcpu affinity output with sparse physical cpu map



commit 2ec5339ec9218fbf1583fa85b74d1d2f15f1b3b8
Author:     Juergen Gross <jgross@xxxxxxxx>
AuthorDate: Fri Aug 31 17:22:04 2018 +0200
Commit:     Wei Liu <wei.liu2@xxxxxxxxxx>
CommitDate: Wed Sep 5 11:21:26 2018 +0100

    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@xxxxxxxx>
    Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 tools/xl/xl_vcpu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/xl/xl_vcpu.c b/tools/xl/xl_vcpu.c
index 7b7a93d716..aef486864c 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<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:
--
generated by git-patchbot for /home/xen/git/xen.git#staging

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.