From: "Jan Beulich" Subject: Re: [PATCH v9 05/13] x86: expose CBM length and COS number information Date: Tue, 16 Jun 2015 07:58:29 +0100 Message-ID: <557FE53502000078000853A8@mail.emea.novell.com> References: <1433307190-6381-1-git-send-email-chao.p.peng@linux.intel.com> <1433307190-6381-6-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: <1433307190-6381-6-git-send-email-chao.p.peng@linux.intel.com> Content-Disposition: inline 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: wei.liu2@citrix.com, Ian.Campbell@citrix.com, stefano.stabellini@eu.citrix.com, andrew.cooper3@citrix.com, dario.faggioli@citrix.com, Ian.Jackson@eu.citrix.com, xen-devel@lists.xen.org, will.auld@intel.com, keir@xen.org, dgdegra@tycho.nsa.gov List-Id: xen-devel@lists.xenproject.org >>> On 03.06.15 at 06:53, wrote: > General CAT information such as maximum COS and CBM length are exposed to > user space by a SYSCTL hypercall, to help user space to construct the CBM. > > Signed-off-by: Chao Peng > Reviewed-by: Andrew Cooper > --- > Changes in v9: > * Initialize 'info' explictly so that compiler would not complain. This wouldn't be needed if ... > --- a/xen/arch/x86/psr.c > +++ b/xen/arch/x86/psr.c > @@ -216,6 +216,38 @@ void psr_ctxt_switch_to(struct domain *d) > } > } > > +static int get_cat_socket_info(unsigned int socket, > + struct psr_cat_socket_info **info) > +{ > + if ( !cat_socket_info ) > + return -ENODEV; > + > + if ( socket >= nr_sockets ) > + return -EBADSLT; > + > + if ( !test_bit(socket, cat_socket_enable) ) > + return -ENOENT; > + > + *info = cat_socket_info + socket; > + > + return 0; > +} ... you made this return struct psr_cat_socket_info *, using what xen/err.h provides. Jan