[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d09bd17c80b6ab72202bf31a503b6a2fa0d9344d.1769029977.git.babu.moger@amd.com>
Date: Wed, 21 Jan 2026 15:12:50 -0600
From: Babu Moger <babu.moger@....com>
To: <corbet@....net>, <tony.luck@...el.com>, <reinette.chatre@...el.com>,
<Dave.Martin@....com>, <james.morse@....com>, <babu.moger@....com>,
<tglx@...nel.org>, <mingo@...hat.com>, <bp@...en8.de>,
<dave.hansen@...ux.intel.com>
CC: <x86@...nel.org>, <hpa@...or.com>, <peterz@...radead.org>,
<juri.lelli@...hat.com>, <vincent.guittot@...aro.org>,
<dietmar.eggemann@....com>, <rostedt@...dmis.org>, <bsegall@...gle.com>,
<mgorman@...e.de>, <vschneid@...hat.com>, <akpm@...ux-foundation.org>,
<pawan.kumar.gupta@...ux.intel.com>, <pmladek@...e.com>,
<feng.tang@...ux.alibaba.com>, <kees@...nel.org>, <arnd@...db.de>,
<fvdl@...gle.com>, <lirongqing@...du.com>, <bhelgaas@...gle.com>,
<seanjc@...gle.com>, <xin@...or.com>, <manali.shukla@....com>,
<dapeng1.mi@...ux.intel.com>, <chang.seok.bae@...el.com>,
<mario.limonciello@....com>, <naveen@...nel.org>,
<elena.reshetova@...el.com>, <thomas.lendacky@....com>,
<linux-doc@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<kvm@...r.kernel.org>, <peternewman@...gle.com>, <eranian@...gle.com>,
<gautham.shenoy@....com>
Subject: [RFC PATCH 12/19] x86/resctrl: Add data structures and definitions for PLZA configuration
Privilege Level Zero Association (PLZA) is configured with a Per Logical
Processor MSR: MSR_IA32_PQR_PLZA_ASSOC (0xc00003fc).
Add the necessary data structures and definitions to support PLZA
configuration.
Signed-off-by: Babu Moger <babu.moger@....com>
---
arch/x86/include/asm/msr-index.h | 7 +++++++
arch/x86/kernel/cpu/resctrl/internal.h | 26 ++++++++++++++++++++++++++
2 files changed, 33 insertions(+)
diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h
index 0ef1f6a8f4bc..d42d31beaf3a 100644
--- a/arch/x86/include/asm/msr-index.h
+++ b/arch/x86/include/asm/msr-index.h
@@ -1271,12 +1271,19 @@
/* - AMD: */
#define MSR_IA32_MBA_BW_BASE 0xc0000200
#define MSR_IA32_SMBA_BW_BASE 0xc0000280
+#define MSR_IA32_PQR_PLZA_ASSOC 0xc00003fc
#define MSR_IA32_L3_QOS_ABMC_CFG 0xc00003fd
#define MSR_IA32_L3_QOS_EXT_CFG 0xc00003ff
#define MSR_IA32_EVT_CFG_BASE 0xc0000400
#define MSR_IA32_GMBA_BW_BASE 0xc0000600
#define MSR_IA32_GSMBA_BW_BASE 0xc0000680
+/* Lower 32 bits of MSR_IA32_PQR_PLZA_ASSOC */
+#define RMID_EN BIT(31)
+/* Uppper 32 bits of MSR_IA32_PQR_PLZA_ASSOC */
+#define CLOSID_EN BIT(15)
+#define PLZA_EN BIT(31)
+
/* AMD-V MSRs */
#define MSR_VM_CR 0xc0010114
#define MSR_VM_IGNNE 0xc0010115
diff --git a/arch/x86/kernel/cpu/resctrl/internal.h b/arch/x86/kernel/cpu/resctrl/internal.h
index 61a283652d39..4ea1ba659a01 100644
--- a/arch/x86/kernel/cpu/resctrl/internal.h
+++ b/arch/x86/kernel/cpu/resctrl/internal.h
@@ -219,6 +219,32 @@ union l3_qos_abmc_cfg {
unsigned long full;
};
+/*
+ * PLZA can be configured on a CPU by writing to MSR_IA32_PQR_PLZA_ASSOC.
+ *
+ * @rmid : The RMID to be configured for PLZA.
+ * @reserved1 : Reserved.
+ * @rmidid_en : Asociate RMID or not.
+ * @closid : The CLOSID to be configured for PLZA.
+ * @reserved2 : Reserved.
+ * @closid_en : Asociate CLOSID or not.
+ * @reserved3 : Reserved.
+ * @plza_en : configure PLZA or not
+ */
+union qos_pqr_plza_assoc {
+ struct {
+ unsigned long rmid :12,
+ reserved1 :19,
+ rmid_en : 1,
+ closid : 4,
+ reserved2 :11,
+ closid_en : 1,
+ reserved3 :15,
+ plza_en : 1;
+ } split;
+ unsigned long full;
+};
+
void rdt_ctrl_update(void *arg);
int rdt_get_l3_mon_config(struct rdt_resource *r);
--
2.34.1
Powered by blists - more mailing lists