xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: xen-devel@lists.xenproject.org
Cc: Juergen Gross <jgross@suse.com>,
	sstabellini@kernel.org, wei.liu2@citrix.com,
	George.Dunlap@eu.citrix.com, andrew.cooper3@citrix.com,
	ian.jackson@eu.citrix.com, tim@xen.org, jbeulich@suse.com
Subject: [PATCH 1/2] tools/libxl: correct vcpu affinity output with sparse physical cpu map
Date: Wed, 29 Aug 2018 20:23:01 +0200	[thread overview]
Message-ID: <20180829182302.9977-2-jgross@suse.com> (raw)
In-Reply-To: <20180829182302.9977-1-jgross@suse.com>

With not all physical cpus online (i.e. 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>
---
 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..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<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:
-- 
2.16.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2018-08-29 18:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-29 18:23 [PATCH 0/2] fix smt=0 fallout Juergen Gross
2018-08-29 18:23 ` Juergen Gross [this message]
2018-08-30  7:47   ` [PATCH 1/2] tools/libxl: correct vcpu affinity output with sparse physical cpu map Wei Liu
2018-08-30  8:07   ` Jan Beulich
     [not found]   ` <5B87A5B402000078001E361E@suse.com>
2018-08-30  8:11     ` Juergen Gross
2018-08-30  8:42       ` Jan Beulich
2018-08-29 18:23 ` [PATCH 2/2] xen: fill topology info for online cpus only Juergen Gross
2018-08-30  7:48   ` Wei Liu
2018-08-30  7:51     ` Wei Liu
2018-08-30  8:16   ` Jan Beulich
     [not found]   ` <5B87A7E502000078001E364A@suse.com>
2018-08-30  8:31     ` Juergen Gross
2018-08-30  8:37       ` Wei Liu
2018-08-30  8:44         ` Jan Beulich
     [not found]         ` <5B87AE7402000078001E36DE@suse.com>
2018-08-30  8:46           ` Juergen Gross
2018-08-30  8:43       ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180829182302.9977-2-jgross@suse.com \
    --to=jgross@suse.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=sstabellini@kernel.org \
    --cc=tim@xen.org \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).