From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chao Peng Subject: Re: [PATCH v7 3/3] tools & docs: add tools and docs support for Intel CDP Date: Wed, 14 Oct 2015 10:38:31 +0800 Message-ID: <20151014023831.GC4427@pengc-linux.bj.intel.com> References: <1444726426-10567-1-git-send-email-he.chen@linux.intel.com> <1444726426-10567-4-git-send-email-he.chen@linux.intel.com> Reply-To: Chao Peng Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZmC1S-0007us-Nw for xen-devel@lists.xenproject.org; Wed, 14 Oct 2015 02:42:34 +0000 Content-Disposition: inline In-Reply-To: <1444726426-10567-4-git-send-email-he.chen@linux.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: He Chen Cc: wei.liu2@citrix.com, ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com, andrew.cooper3@citrix.com, ian.jackson@eu.citrix.com, jbeulich@suse.com, xen-devel@lists.xenproject.org, keir@xen.org List-Id: xen-devel@lists.xenproject.org > 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. 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; > }