From: Marc Zyngier <maz@kernel.org>
To: Xi Ruoyao <xry111@xry111.site>
Cc: James Morse <james.morse@arm.com>,
Anshuman Khandual <anshuman.khandual@arm.com>,
Ben Horgan <ben.horgan@arm.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>,
Mingcong Bai <jeffbai@aosc.io>,
Shaopeng Tan <tan.shaopeng@fujitsu.com>
Subject: Re: [PATCH v3] arm64: Add override for MPAM
Date: Thu, 29 May 2025 11:10:50 +0100 [thread overview]
Message-ID: <86bjrbenh1.wl-maz@kernel.org> (raw)
In-Reply-To: <86cybrenvx.wl-maz@kernel.org>
On Thu, 29 May 2025 11:01:54 +0100,
Marc Zyngier <maz@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.
prev parent reply other threads:[~2025-05-29 10:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-16 10:25 [PATCH v3] arm64: Add override for MPAM Xi Ruoyao
2025-05-29 9:45 ` Will Deacon
2025-05-29 10:01 ` Marc Zyngier
2025-05-29 10:10 ` Marc Zyngier [this message]
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=86bjrbenh1.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=anshuman.khandual@arm.com \
--cc=ben.horgan@arm.com \
--cc=james.morse@arm.com \
--cc=jeffbai@aosc.io \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=shameerali.kolothum.thodi@huawei.com \
--cc=tan.shaopeng@fujitsu.com \
--cc=xry111@xry111.site \
/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;
as well as URLs for NNTP newsgroup(s).