From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chao Peng Subject: Re: [PATCH v5 03/13] x86: detect and initialize Intel CAT feature Date: Tue, 21 Apr 2015 17:39:33 +0800 Message-ID: <20150421093933.GA4453@pengc-linux.bj.intel.com> References: <1429281230-4352-1-git-send-email-chao.p.peng@linux.intel.com> <1429281230-4352-4-git-send-email-chao.p.peng@linux.intel.com> <1429546392.18810.17.camel@citrix.com> Reply-To: Chao Peng Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1429546392.18810.17.camel@citrix.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: Dario Faggioli Cc: keir@xen.org, Ian.Campbell@citrix.com, 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, dgdegra@tycho.nsa.gov List-Id: xen-devel@lists.xenproject.org On Mon, Apr 20, 2015 at 06:13:12PM +0200, Dario Faggioli wrote: > On Fri, 2015-04-17 at 22:33 +0800, Chao Peng wrote: > > > --- a/xen/arch/x86/psr.c > > +++ b/xen/arch/x86/psr.c > > @@ -19,14 +19,25 @@ > > #include > > > > #define PSR_CMT (1<<0) > > +#define PSR_CAT (1<<1) > > + > > +struct psr_cat_socket_info { > > + bool_t initialized; > > + bool_t enabled; > > + unsigned int cbm_len; > > + unsigned int cos_max; > > +}; > > > Can't we ditch 'initialized' from within the struct and have a (global) > bitmap, with one bit for each socket, expressing the same? And that also > for 'enabled'. > > It's probably, at least up to a certain extent, a matter of taste (and I > personally think it will look better), but it also should produce > tighter code... NP, thanks. Chao