[PATCH v3] arm64: Add override for MPAM

Marc Zyngier maz at kernel.org
Thu May 29 03:10:50 PDT 2025


On Thu, 29 May 2025 11:01:54 +0100,
Marc Zyngier <maz at kernel.org> wrote:
> 
> So you would need to:
> 
> - nuke both MPAM and MPAM_frac in their respective ID registers,
>   ensuring that we effectively advertise the absence of MPAM
> 
> - either check for both fields wherever we currently refer only to
>   MPAM, as what we have today looks fragile, or unconditionally
>   override both ID fields if the HW actually implements MPAMv0.1.
> 
>   I personally think the former is easier to implement.
> 
> Note that these would be two separate changes, and that you only need
> to implement the first one to achieve what you're after for the
> current level of MPAM support.

To be completely clear, the change for this patch could be as simple
as this:

diff --git a/arch/arm64/kernel/pi/idreg-override.c b/arch/arm64/kernel/pi/idreg-override.c
index 836e5a9b98d03..bc57b290e5e7b 100644
--- a/arch/arm64/kernel/pi/idreg-override.c
+++ b/arch/arm64/kernel/pi/idreg-override.c
@@ -155,6 +155,7 @@ static const struct ftr_set_desc pfr1 __prel64_initconst = {
 		FIELD("gcs", ID_AA64PFR1_EL1_GCS_SHIFT, NULL),
 		FIELD("mte", ID_AA64PFR1_EL1_MTE_SHIFT, NULL),
 		FIELD("sme", ID_AA64PFR1_EL1_SME_SHIFT, pfr1_sme_filter),
+		FIELD("mpam_frac", ID_AA64PFR1_EL1_MPAM_frac_SHIFT, NULL),
 		{}
 	},
 };
@@ -247,7 +248,7 @@ static const struct {
 	{ "rodata=off",			"arm64_sw.rodataoff=1" },
 	{ "arm64.nolva",		"id_aa64mmfr2.varange=0" },
 	{ "arm64.no32bit_el0",		"id_aa64pfr0.el0=1" },
-	{ "arm64.nompam",		"id_aa64pfr0.mpam=0" },
+	{ "arm64.nompam",		"id_aa64pfr0.mpam=0 id_aa64pfr1.mpam_frac=0" },
 };
 
 static int __init parse_hexdigit(const char *p, u64 *v)


HTH,

	M.

-- 
Without deviation from the norm, progress is not possible.



More information about the linux-arm-kernel mailing list