From: Babu Moger <babu.moger@amd.com>
To: <reinette.chatre@intel.com>, <tglx@linutronix.de>,
<mingo@redhat.com>, <bp@alien8.de>, <dave.hansen@linux.intel.com>
Cc: <babu.moger@amd.com>, <fenghua.yu@intel.com>, <x86@kernel.org>,
<hpa@zytor.com>, <akpm@linux-foundation.org>,
<paulmck@kernel.org>, <thuth@redhat.com>, <rostedt@goodmis.org>,
<xiongwei.song@windriver.com>,
<pawan.kumar.gupta@linux.intel.com>, <jpoimboe@kernel.org>,
<daniel.sneddon@linux.intel.com>, <thomas.lendacky@amd.com>,
<perry.yuan@amd.com>, <sandipan.das@amd.com>,
<kai.huang@intel.com>, <seanjc@google.com>, <xin3.li@intel.com>,
<ebiggers@google.com>, <andrew.cooper3@citrix.com>,
<mario.limonciello@amd.com>, <tan.shaopeng@fujitsu.com>,
<james.morse@arm.com>, <tony.luck@intel.com>,
<peternewman@google.com>, <linux-doc@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <eranian@google.com>,
<corbet@lwn.net>
Subject: [PATCH v2 3/7] x86/resctrl: Detect Smart Data Cache Injection Allocation Enforcement
Date: Wed, 18 Dec 2024 15:37:59 -0600 [thread overview]
Message-ID: <ffcbf189201c4b79b91a2f94cfe219acdab807d5.1734556832.git.babu.moger@amd.com> (raw)
In-Reply-To: <cover.1734556832.git.babu.moger@amd.com>
Introduce io_alloc_capable in struct resctrl_cache to detect SDCIAE
(L3 Smart Data Cache Injection Allocation Enforcement) feature.
Signed-off-by: Babu Moger <babu.moger@amd.com>
---
v2: Changed sdciae_capable to io_alloc_capable to make it generic feature.
Also moved the io_alloc_capable in struct resctrl_cache.
---
arch/x86/kernel/cpu/resctrl/core.c | 7 +++++++
include/linux/resctrl.h | 4 ++++
2 files changed, 11 insertions(+)
diff --git a/arch/x86/kernel/cpu/resctrl/core.c b/arch/x86/kernel/cpu/resctrl/core.c
index c2450cd52511..39e110033d96 100644
--- a/arch/x86/kernel/cpu/resctrl/core.c
+++ b/arch/x86/kernel/cpu/resctrl/core.c
@@ -306,6 +306,11 @@ static void rdt_get_cdp_config(int level)
rdt_resources_all[level].r_resctrl.cdp_capable = true;
}
+static void rdt_get_sdciae_alloc_cfg(struct rdt_resource *r)
+{
+ r->cache.io_alloc_capable = true;
+}
+
static void rdt_get_cdp_l3_config(void)
{
rdt_get_cdp_config(RDT_RESOURCE_L3);
@@ -931,6 +936,8 @@ static __init bool get_rdt_alloc_resources(void)
rdt_get_cache_alloc_cfg(1, r);
if (rdt_cpu_has(X86_FEATURE_CDP_L3))
rdt_get_cdp_l3_config();
+ if (rdt_cpu_has(X86_FEATURE_SDCIAE))
+ rdt_get_sdciae_alloc_cfg(r);
ret = true;
}
if (rdt_cpu_has(X86_FEATURE_CAT_L2)) {
diff --git a/include/linux/resctrl.h b/include/linux/resctrl.h
index d94abba1c716..5837acff7442 100644
--- a/include/linux/resctrl.h
+++ b/include/linux/resctrl.h
@@ -129,6 +129,8 @@ struct rdt_mon_domain {
* @arch_has_sparse_bitmasks: True if a bitmask like f00f is valid.
* @arch_has_per_cpu_cfg: True if QOS_CFG register for this cache
* level has CPU scope.
+ * @io_alloc_capable: Smart Data Cache Injection Allocation Enforcement
+ * capable (SDCIAE).
*/
struct resctrl_cache {
unsigned int cbm_len;
@@ -136,6 +138,7 @@ struct resctrl_cache {
unsigned int shareable_bits;
bool arch_has_sparse_bitmasks;
bool arch_has_per_cpu_cfg;
+ bool io_alloc_capable;
};
/**
@@ -202,6 +205,7 @@ enum resctrl_scope {
* @evt_list: List of monitoring events
* @fflags: flags to choose base and info files
* @cdp_capable: Is the CDP feature available on this resource
+ * @sdciae_capable: Is SDCIAE feature available on this resource
*/
struct rdt_resource {
int rid;
--
2.34.1
next prev parent reply other threads:[~2024-12-18 21:38 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-18 21:37 [PATCH v2 0/7] x86/resctrl : Support L3 Smart Data Cache Injection Allocation Enforcement (SDCIAE) Babu Moger
2024-12-18 21:37 ` [PATCH v2 1/7] x86/cpufeatures: Add support for L3 Smart Data Cache Injection Allocation Enforcement Babu Moger
2024-12-18 21:37 ` [PATCH v2 2/7] x86/resctrl: Add SDCIAE feature in the command line options Babu Moger
2024-12-18 21:37 ` Babu Moger [this message]
2024-12-23 21:13 ` [PATCH v2 3/7] x86/resctrl: Detect Smart Data Cache Injection Allocation Enforcement Reinette Chatre
2025-01-23 19:51 ` Moger, Babu
2024-12-18 21:38 ` [PATCH v2 4/7] x86/resctrl: Implement "io_alloc" enable/disable handlers Babu Moger
2024-12-23 21:14 ` Reinette Chatre
2025-01-23 19:51 ` Moger, Babu
2024-12-18 21:38 ` [PATCH v2 5/7] x86/resctrl: Add interface to enable/disable io_alloc feature Babu Moger
2024-12-18 23:34 ` Luck, Tony
2024-12-23 19:32 ` Reinette Chatre
2025-01-02 17:23 ` Luck, Tony
2024-12-23 21:37 ` Reinette Chatre
2025-01-23 19:53 ` Moger, Babu
2024-12-18 21:38 ` [PATCH v2 6/7] x86/resctrl: Introduce interface to display io_alloc CBMs Babu Moger
2024-12-18 21:38 ` [PATCH v2 7/7] x86/resctrl: Introduce interface to modify io_alloc Capacity Bit Masks Babu Moger
2024-12-18 23:27 ` [PATCH v2 0/7] x86/resctrl : Support L3 Smart Data Cache Injection Allocation Enforcement (SDCIAE) Luck, Tony
2025-01-27 18:25 ` Moger, Babu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ffcbf189201c4b79b91a2f94cfe219acdab807d5.1734556832.git.babu.moger@amd.com \
--to=babu.moger@amd.com \
--cc=akpm@linux-foundation.org \
--cc=andrew.cooper3@citrix.com \
--cc=bp@alien8.de \
--cc=corbet@lwn.net \
--cc=daniel.sneddon@linux.intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=ebiggers@google.com \
--cc=eranian@google.com \
--cc=fenghua.yu@intel.com \
--cc=hpa@zytor.com \
--cc=james.morse@arm.com \
--cc=jpoimboe@kernel.org \
--cc=kai.huang@intel.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=mingo@redhat.com \
--cc=paulmck@kernel.org \
--cc=pawan.kumar.gupta@linux.intel.com \
--cc=perry.yuan@amd.com \
--cc=peternewman@google.com \
--cc=reinette.chatre@intel.com \
--cc=rostedt@goodmis.org \
--cc=sandipan.das@amd.com \
--cc=seanjc@google.com \
--cc=tan.shaopeng@fujitsu.com \
--cc=tglx@linutronix.de \
--cc=thomas.lendacky@amd.com \
--cc=thuth@redhat.com \
--cc=tony.luck@intel.com \
--cc=x86@kernel.org \
--cc=xin3.li@intel.com \
--cc=xiongwei.song@windriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®