From: Tim Deegan Subject: Re: [PATCH v2 3/7] x86: detect and initialize Intel CAT feature Date: Thu, 19 Mar 2015 11:38:24 +0000 Message-ID: <20150319113824.GC55989@deinos.phlegethon.org> References: <1426761695-12545-1-git-send-email-chao.p.peng@linux.intel.com> <1426761695-12545-4-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: Content-Disposition: inline In-Reply-To: <1426761695-12545-4-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, 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 Hi, At 18:41 +0800 on 19 Mar (1426790491), Chao Peng wrote: > @@ -62,8 +84,15 @@ static void __init parse_psr_param(char *s) > *val_str++ = '\0'; > > parse_psr_bool(s, val_str, "cmt", PSR_CMT); > - if ( val_str && !strcmp(s, "rmid_max") ) > - opt_rmid_max = simple_strtoul(val_str, NULL, 0); > + parse_psr_bool(s, val_str, "cat", PSR_CAT); > + > + if ( val_str ) > + { > + if ( !strcmp(s, "rmid_max") ) > + opt_rmid_max = simple_strtoul(val_str, NULL, 0); > + else if ( !strcmp(s, "num_sockets") ) > + opt_num_sockets = simple_strtoul(val_str, NULL, 0); This is an unfortunate interface for the user. Can Xen not find out how many sockets there are without needing to be told? Also, per-socket data seems like a more generally useful thing that other features will want to use. Do you think future Intel cache features will also have per-socket state? If so, I think it would be better to extend the per-cpu data system to handle per-socket areas. Cheers, Tim.