[xen staging] tools/xl: fix output of xl vcpu-pin dry run with smt=0

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[xen staging] tools/xl: fix output of xl vcpu-pin dry run with smt=0

patchbot
commit 6de6c8d306c091eb7381575d250beaf2eeaf02df
Author:     Juergen Gross <[hidden email]>
AuthorDate: Mon Sep 3 13:26:30 2018 +0200
Commit:     Wei Liu <[hidden email]>
CommitDate: Wed Sep 5 11:00:51 2018 +0100

    tools/xl: fix output of xl vcpu-pin dry run with smt=0
   
    Fix another smt=0 fallout: xl -N vcpu-pin prints only parts of the
    affinities as it is using the number of online cpus instead of the
    maximum cpu number.
   
    Signed-off-by: Juergen Gross <[hidden email]>
    Acked-by: Wei Liu <[hidden email]>
---
 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 3384eeed06..7b7a93d716 100644
--- a/tools/xl/xl_vcpu.c
+++ b/tools/xl/xl_vcpu.c
@@ -255,9 +255,9 @@ int main_vcpupin(int argc, char **argv)
         goto out;
 
     if (dryrun_only) {
-        nb_cpu = libxl_get_online_cpus(ctx);
+        nb_cpu = libxl_get_max_cpus(ctx);
         if (nb_cpu < 0) {
-            fprintf(stderr, "libxl_get_online_cpus failed.\n");
+            fprintf(stderr, "libxl_get_max_cpus failed.\n");
             goto out;
         }
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging

_______________________________________________
Xen-changelog mailing list
[hidden email]
https://lists.xenproject.org/xen-changelog