From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chao Peng Subject: Re: [PATCH for Xen 4.6 2/5] tools/libxl: fix socket display error for CMT Date: Tue, 29 Sep 2015 10:53:10 +0800 Message-ID: <20150929025310.GE5813@pengc-linux.bj.intel.com> References: <1443441293-4287-1-git-send-email-chao.p.peng@linux.intel.com> <1443441293-4287-3-git-send-email-chao.p.peng@linux.intel.com> <1443452791.3276.81.camel@citrix.com> <20150928153653.GN13821@zion.uk.xensource.com> Reply-To: Chao Peng Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20150928153653.GN13821@zion.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Wei Liu Cc: Dario Faggioli , xen-devel@lists.xen.org, Ian.Jackson@eu.citrix.com, Ian.Campbell@citrix.com, stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org On Mon, Sep 28, 2015 at 04:36:54PM +0100, Wei Liu wrote: > On Mon, Sep 28, 2015 at 05:06:31PM +0200, Dario Faggioli wrote: > > On Mon, 2015-09-28 at 19:54 +0800, Chao Peng wrote: > > > > > diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c > > > index 2706759..c72d3df 100644 > > > > > @@ -8228,9 +8228,9 @@ static void > > > psr_cmt_print_domain_info(libxl_dominfo *dominfo, > > > > > > static int psr_cmt_show(libxl_psr_cmt_type type, uint32_t domid) > > > { > > > - uint32_t i, socketid, nr_sockets, total_rmid; > > > + uint32_t i, socketid, total_rmid; > > > uint32_t l3_cache_size; > > > - libxl_physinfo info; > > > + libxl_bitmap socketmap; > > > int rc, nr_domains; > > > > > > if (!libxl_psr_cmt_enabled(ctx)) { > > > @@ -8244,41 +8244,38 @@ static int psr_cmt_show(libxl_psr_cmt_type > > > type, uint32_t domid) > > > return -1; > > > } > > > > > > - libxl_physinfo_init(&info); > > > - rc = libxl_get_physinfo(ctx, &info); > > > + libxl_socket_bitmap_alloc(ctx, &socketmap, 0); > > > + rc = libxl_socket_bitmap_fill(ctx, &socketmap); > > > > > Shouldn't socketmap be initied with libxl_bitmap_init() before being > > allocated and used? > > > > Yes. > > > Not doing so is certainly not an issue, in this case, but AFAIR, we > > That's my thought when I first saw this patch. > > > always require that for libxl types, don't we? > > > > But let's stick with convention. Sure, let's stick with it. Chao