From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH v7 3/3] tools & docs: add tools and docs support for Intel CDP Date: Wed, 14 Oct 2015 09:52:35 +0100 Message-ID: <1444812755.23192.125.camel@citrix.com> References: <1444726426-10567-1-git-send-email-he.chen@linux.intel.com> <1444726426-10567-4-git-send-email-he.chen@linux.intel.com> <20151014023831.GC4427@pengc-linux.bj.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZmHnb-0004hN-L5 for xen-devel@lists.xenproject.org; Wed, 14 Oct 2015 08:52:39 +0000 In-Reply-To: <20151014023831.GC4427@pengc-linux.bj.intel.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: Chao Peng , He Chen Cc: wei.liu2@citrix.com, keir@xen.org, stefano.stabellini@eu.citrix.com, andrew.cooper3@citrix.com, ian.jackson@eu.citrix.com, jbeulich@suse.com, xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On Wed, 2015-10-14 at 10:38 +0800, Chao Peng wrote: > > diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c > > index 365798b..8db0132 100644 > > --- a/tools/libxl/xl_cmdimpl.c > > +++ b/tools/libxl/xl_cmdimpl.c > > @@ -8434,6 +8434,8 @@ static int psr_cat_hwinfo(void) > > } > > printf("%-16s: %u\n", "Socket ID", info[i].id); > > printf("%-16s: %uKB\n", "L3 Cache", l3_cache_size); > > + printf("%-16s: %s\n", "CDP Status", > > + info->cdp_enabled ? "Enabled" : "Disabled"); > > Sorry I didn't notice this before but I guess 'info->cdp_enabled' here > really would be 'info[i].cdp_enabled' as CDP status is per-socket. > Current code will always print the data for the first socket in each > iteration, which is undesirable. I think you are correct, well spotted. > With this and the indention issue proposed by Ian being fixed: > > Reviewed-by: Chao Peng > > > printf("%-16s: %u\n", "Maximum COS", info[i].cos_max); > > printf("%-16s: %u\n", "CBM length", info[i].cbm_len); > > printf("%-16s: %#llx\n", "Default CBM", > > @@ -8445,29 +8447,46 @@ out: > > return rc; > > }