From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 606C31CAA90; Fri, 21 Feb 2025 18:05:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740161131; cv=none; b=B85xRf/QpUYUopDvMQDAERX2I+q1Hoc88buTRvo/dQmNzPljGU1JpT14/ilJ+dRNjnzPh2Me5Ur1WWDUdD1q1xkdoB8lN+zMUfWKkPAIhhxYqUC30gzHPlBin1A4I7FLYUQbg0x16x4ENNhgvUFVkRMBSB/BMG3qpOrBPS2SruQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740161131; c=relaxed/simple; bh=axA6tnd1XCiBHxILTIvjnho1a8aiw4DtSi//aa0JOLg=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=WiShggcoNELonM4dnxMLzN3Qh9XM6YyyImIH7yxVFEbUh5ml2bz0qUx7Ns0o8ZxNnzjOwwe+fzEG7IEAsBdR8wmjR9NzMpnaQj4HVfMNF98ia9z43zW+I3TJvVpcEs17MN5RAqAyx8SOHE9nZGL5lZIDVCfsDNO3Uz6mKzoNfyY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A6559169C; Fri, 21 Feb 2025 10:05:39 -0800 (PST) Received: from [10.1.197.49] (eglon.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7D4063F59E; Fri, 21 Feb 2025 10:05:17 -0800 (PST) Message-ID: <797bb878-8049-47dc-b1c9-193158b9ba45@arm.com> Date: Fri, 21 Feb 2025 18:05:15 +0000 Precedence: bulk X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v11 06/23] x86/resctrl: Add support to enable/disable AMD ABMC feature To: Babu Moger , corbet@lwn.net, reinette.chatre@intel.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, tony.luck@intel.com, peternewman@google.com Cc: fenghua.yu@intel.com, x86@kernel.org, hpa@zytor.com, paulmck@kernel.org, akpm@linux-foundation.org, thuth@redhat.com, rostedt@goodmis.org, xiongwei.song@windriver.com, pawan.kumar.gupta@linux.intel.com, daniel.sneddon@linux.intel.com, jpoimboe@kernel.org, perry.yuan@amd.com, sandipan.das@amd.com, kai.huang@intel.com, xiaoyao.li@intel.com, seanjc@google.com, xin3.li@intel.com, andrew.cooper3@citrix.com, ebiggers@google.com, mario.limonciello@amd.com, tan.shaopeng@fujitsu.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, maciej.wieczor-retman@intel.com, eranian@google.com References: <920cafec1920358ad0c8af2e78a8f8bbd8c0b77d.1737577229.git.babu.moger@amd.com> Content-Language: en-GB From: James Morse In-Reply-To: <920cafec1920358ad0c8af2e78a8f8bbd8c0b77d.1737577229.git.babu.moger@amd.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi Babu, On 22/01/2025 20:20, Babu Moger wrote: > Add the functionality to enable/disable AMD ABMC feature. > > AMD ABMC feature is enabled by setting enabled bit(0) in MSR > L3_QOS_EXT_CFG. When the state of ABMC is changed, the MSR needs > to be updated on all the logical processors in the QOS Domain. > > Hardware counters will reset when ABMC state is changed. > > The ABMC feature details are documented in APM listed below [1]. > [1] AMD64 Architecture Programmer's Manual Volume 2: System Programming > Publication # 24593 Revision 3.41 section 19.3.3.3 Assignable Bandwidth > Monitoring (ABMC). > diff --git a/arch/x86/kernel/cpu/resctrl/internal.h b/arch/x86/kernel/cpu/resctrl/internal.h > index 05358e78147b..ca69f2e0909f 100644 > --- a/arch/x86/kernel/cpu/resctrl/internal.h > +++ b/arch/x86/kernel/cpu/resctrl/internal.h > @@ -658,4 +663,6 @@ void resctrl_file_fflags_init(const char *config, unsigned long fflags); > void rdt_staged_configs_clear(void); > bool closid_allocated(unsigned int closid); > int resctrl_find_cleanest_closid(void); > +int resctrl_arch_mbm_cntr_assign_set(struct rdt_resource *r, bool enable); > +bool resctrl_arch_mbm_cntr_assign_enabled(struct rdt_resource *r); > #endif /* _ASM_X86_RESCTRL_INTERNAL_H */ A minor nit - but could these be added to include/linux/resctrl.h instead? This is where they need to end up after the arch/fs split, and its harmless to do it from the beginning. Thanks, James