From: Ian Campbell Subject: Re: [PATCH v8 6/6] tools: enable Cache QoS Monitoring feature for libxl/libxc Date: Mon, 10 Feb 2014 10:15:56 +0000 Message-ID: <1392027356.5117.21.camel@kazak.uk.xensource.com> References: <1391836058-81430-1-git-send-email-dongxiao.xu@intel.com> <1391836058-81430-7-git-send-email-dongxiao.xu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1391836058-81430-7-git-send-email-dongxiao.xu@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: Dongxiao Xu Cc: keir@xen.org, stefano.stabellini@eu.citrix.com, andrew.cooper3@citrix.com, Ian.Jackson@eu.citrix.com, xen-devel@lists.xen.org, JBeulich@suse.com, dgdegra@tycho.nsa.gov List-Id: xen-devel@lists.xenproject.org On Sat, 2014-02-08 at 13:07 +0800, Dongxiao Xu wrote: > Introduced two new xl commands to attach/detach CQM service for a guest > $ xl pqos-attach cqm domid > $ xl pqos-detach cqm domid > > Introduce one new xl command to retrive guest CQM information "retrieve" > $ xl pqos-list cqm Please patch the xl manpages to describe all these new commands. I wonder though -- are these aimed at end users or are they really for developer use? I'm wondering if they should be exposed this way or whether they should be exposed by some lower level tool (similar to how xenpm is separate). I don't know what the correct answer is here. > +int xc_domain_getcqminfo(xc_interface *xch, xc_cqminfo_t *info) > +{ > + int ret = 0; > + DECLARE_SYSCTL; > + > + sysctl.cmd = XEN_SYSCTL_getcqminfo; > + if ( xc_sysctl(xch, &sysctl) < 0 ) > + ret = -1; xc_sysctl returns -1 on error AFAICT. So: ret = xc_sysctl(...); if (ret >= 0) { info->etc } return ret; > diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl > index 649ce50..43c0f48 100644 > --- a/tools/libxl/libxl_types.idl > +++ b/tools/libxl/libxl_types.idl > @@ -596,3 +596,10 @@ libxl_event = Struct("event",[ > ])), > ("domain_create_console_available", Struct(None, [])), > ]))]) > + > +libxl_cqminfo = Struct("cqminfo", [ You need to also patch libxl.h to add a suitable LIBXL_HAVE_FOO define, see the existing examples in that header. Ian.