From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH v8 2/5] tools: add routine to get CMT L3 event mask Date: Wed, 28 Jan 2015 13:40:25 +0000 Message-ID: <1422452425.14124.48.camel@citrix.com> References: <1422432286-7276-1-git-send-email-chao.p.peng@linux.intel.com> <1422432286-7276-3-git-send-email-chao.p.peng@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1422432286-7276-3-git-send-email-chao.p.peng@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: Chao Peng Cc: keir@xen.org, stefano.stabellini@eu.citrix.com, andrew.cooper3@citrix.com, Ian.Jackson@eu.citrix.com, xen-devel@lists.xen.org, will.auld@intel.com, JBeulich@suse.com, wei.liu2@citrix.com List-Id: xen-devel@lists.xenproject.org On Wed, 2015-01-28 at 16:04 +0800, Chao Peng wrote: > This is the tools side wrapper for XEN_SYSCTL_PSR_CMT_get_l3_event_mask > of XEN_SYSCTL_psr_cmt_op. > > Signed-off-by: Chao Peng > --- > tools/libxc/include/xenctrl.h | 1 + > tools/libxc/xc_psr.c | 17 +++++++++++++++++ > tools/libxl/libxl.h | 1 + This needs a LIBXL_HAVE #define in libxl.h to advertise the new functionality. > +int xc_psr_cmt_get_l3_event_mask(xc_interface *xch, uint32_t *event_mask); What are the possible values of the event mask? Is there a guarantee from somewhere that 32-bits is always sufficient? How can the libxl caller decode the meaning of the bits since they are not defined in the libxl.h header? Perhaps a struct of booleans would be a better interface at the libxl level? Or perhaps the interface should be more along the lines of "is psr feature X available", like libxl_psr_..._feature_enabled(ctx, SOME_SYMBOL)? Or perhaps the function to actual access the info should have an ERROR_PSR_FUNCTION NOT_SUPPORTED return? Ian.