[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cf9e47bbd66dbbdb76f0124620fad2f1b06e977e.1723824984.git.babu.moger@amd.com>
Date: Fri, 16 Aug 2024 11:16:20 -0500
From: Babu Moger <babu.moger@....com>
To: <corbet@....net>, <reinette.chatre@...el.com>, <tglx@...utronix.de>,
<mingo@...hat.com>, <bp@...en8.de>, <dave.hansen@...ux.intel.com>,
<x86@...nel.org>
CC: <fenghua.yu@...el.com>, <hpa@...or.com>, <paulmck@...nel.org>,
<thuth@...hat.com>, <xiongwei.song@...driver.com>, <ardb@...nel.org>,
<pawan.kumar.gupta@...ux.intel.com>, <daniel.sneddon@...ux.intel.com>,
<sandipan.das@....com>, <kai.huang@...el.com>, <peterz@...radead.org>,
<kan.liang@...ux.intel.com>, <pbonzini@...hat.com>, <xin3.li@...el.com>,
<babu.moger@....com>, <ebiggers@...gle.com>, <alexandre.chartre@...cle.com>,
<perry.yuan@....com>, <tan.shaopeng@...itsu.com>, <james.morse@....com>,
<tony.luck@...el.com>, <maciej.wieczor-retman@...el.com>,
<linux-doc@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<peternewman@...gle.com>, <eranian@...gle.com>
Subject: [PATCH 3/7] x86/resctrl: Introduce sdciae_capable in rdt_resource
Detect SDCIAE`(L3 Smart Data Cache Injection Allocation Enforcement)
feature and initialize sdciae_capable.
Signed-off-by: Babu Moger <babu.moger@....com>
---
arch/x86/kernel/cpu/resctrl/core.c | 7 +++++++
include/linux/resctrl.h | 2 ++
2 files changed, 9 insertions(+)
diff --git a/arch/x86/kernel/cpu/resctrl/core.c b/arch/x86/kernel/cpu/resctrl/core.c
index c4dfc768ddf5..e4381e3feb75 100644
--- a/arch/x86/kernel/cpu/resctrl/core.c
+++ b/arch/x86/kernel/cpu/resctrl/core.c
@@ -296,6 +296,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->sdciae_capable = true;
+}
+
static void rdt_get_cdp_l3_config(void)
{
rdt_get_cdp_config(RDT_RESOURCE_L3);
@@ -921,6 +926,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 b0875b99e811..281ba4fb8972 100644
--- a/include/linux/resctrl.h
+++ b/include/linux/resctrl.h
@@ -202,6 +202,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;
@@ -224,6 +225,7 @@ struct rdt_resource {
struct list_head evt_list;
unsigned long fflags;
bool cdp_capable;
+ bool sdciae_capable;
};
/**
--
2.34.1
Powered by blists - more mailing lists