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

Re: [Xen-devel] [PATCH for Xen 4.6 2/5] tools/libxl: fix socket display error for CMT



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?

Not doing so is certainly not an issue, in this case, but AFAIR, we
always require that for libxl types, don't we?

Regards,
Dario
-- 
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

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