From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chao Peng Subject: Re: [PATCH 1/6] x86: detect and initialize Intel CAT feature Date: Tue, 17 Mar 2015 16:11:33 +0800 Message-ID: <20150317081133.GA5371@pengc-linux.bj.intel.com> References: <1426241605-4114-1-git-send-email-chao.p.peng@linux.intel.com> <1426241605-4114-2-git-send-email-chao.p.peng@linux.intel.com> <20150313134013.GE5378@l.oracle.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: <20150313134013.GE5378@l.oracle.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: Konrad Rzeszutek Wilk 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 Fri, Mar 13, 2015 at 09:40:13AM -0400, Konrad Rzeszutek Wilk wrote: > On Fri, Mar 13, 2015 at 06:13:20PM +0800, Chao Peng wrote: > > Detect Intel Cache Allocation Technology(CAT) feature and store the > > cpuid information for later use. Currently only L3 cache allocation is > > supported. The L3 CAT features may vary among sockets so per-socket > > feature information is stored. The initialization can happen either at > > boot time or when CPU(s) is hot plugged after booting. > > > > Signed-off-by: Chao Peng > > --- > > docs/misc/xen-command-line.markdown | 15 +++- > > xen/arch/x86/psr.c | 151 +++++++++++++++++++++++++++++++++--- > > xen/include/asm-x86/cpufeature.h | 1 + > > 3 files changed, 155 insertions(+), 12 deletions(-) > > > > + cat_cpu_init(smp_processor_id()); > > Do 'if (!cat_cpu_init(..)).`' > > as the CPU might not support this. > > At which point you should also free the cat_socket_info and > not register the cpu notifier. Even the booting CPU does not support this, other CPUs may still support this. Generally the feature is a per-socket feature. So break here is not the intention. Except this, all other comments will be addressed by the next version. Thanks for your time. Chao > > > + register_cpu_notifier(&cpu_nfb); > > +} > > +