From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chao Peng Subject: Re: [PATCH v3 3/4] tools: add tools support for Intel CDP Date: Mon, 14 Sep 2015 17:11:30 +0800 Message-ID: <20150914091130.GC4475@pengc-linux.bj.intel.com> References: <1442201227-8610-1-git-send-email-he.chen@linux.intel.com> <1442201227-8610-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.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZbPr0-0006xZ-Hb for xen-devel@lists.xenproject.org; Mon, 14 Sep 2015 09:15:14 +0000 Content-Disposition: inline In-Reply-To: <1442201227-8610-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 On Mon, Sep 14, 2015 at 11:27:06AM +0800, He Chen wrote: > This is the xl/xc changes to support Intel Code/Data Prioritization. > CAT xl commands to set/get CBMs are extended to support CDP. > > Signed-off-by: He Chen > --- > #define LIBXL_HAVE_PSR_CAT 1 > + ? And you still need to broadcast the feature, just like what you have done in v2 (e.g. to define LIBXL_HAVE_PSR_CDP). > #endif > > /* > diff --git a/tools/libxl/libxl_psr.c b/tools/libxl/libxl_psr.c > index 3378239..140af4d 100644 > --- a/tools/libxl/libxl_psr.c > +++ b/tools/libxl/libxl_psr.c > @@ -297,6 +297,7 @@ int libxl_psr_cat_set_cbm(libxl_ctx *ctx, uint32_t domid, > GC_INIT(ctx); > int rc; > int socketid, nr_sockets; > + libxl_psr_cat_info *info; > > rc = libxl__count_physical_sockets(gc, &nr_sockets); > if (rc) { > @@ -304,6 +305,22 @@ int libxl_psr_cat_set_cbm(libxl_ctx *ctx, uint32_t domid, > goto out; > } > > + rc = libxl_psr_cat_get_l3_info(ctx, &info, &nr_sockets); > + if (rc) { > + LOGE(ERROR, "Failed to get cat info"); > + goto out; > + } > + > + if (!info->cdp_enabled && > + (type == LIBXL_PSR_CBM_TYPE_L3_CODE || Does this align up correctly? Chao