* [PATCH v2 0/1] Add option to disable mte support
@ 2021-07-29 2:07 yee.lee
2021-07-29 2:07 ` [PATCH v2 1/1] arm64/cpufeature: Add arm64.nomte to override id-reg yee.lee
0 siblings, 1 reply; 3+ messages in thread
From: yee.lee @ 2021-07-29 2:07 UTC (permalink / raw)
To: linux-kernel
Cc: nicholas.Tang, Kuan-Ying.lee, chinwen.chang, Yee Lee,
Matthias Brugger, moderated list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support
From: Yee Lee <yee.lee@mediatek.com>
For some case of low-end devices with limited resources,
an option to disable mte support is necessary.
This patch Adds an alias in id-reg override mechanism
to suppress the mte feature via passing a param.
=== Test ===
QEMU5.2 + mte
passed "arm64.nomte" in cmdline
boot log:
..(skip)
[ 0.000000] CPU features: SYS_ID_AA64PFR1_EL1[11:8]: forced to 0
Changed since v2:
- Use id-reg override machanism to suppress feature.
Yee Lee (1):
arm64/cpufeature: Add arm64.nomte to override id-reg
arch/arm64/kernel/idreg-override.c | 2 ++
1 file changed, 2 insertions(+)
--
2.18.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v2 1/1] arm64/cpufeature: Add arm64.nomte to override id-reg
2021-07-29 2:07 [PATCH v2 0/1] Add option to disable mte support yee.lee
@ 2021-07-29 2:07 ` yee.lee
2021-07-29 8:47 ` Marc Zyngier
0 siblings, 1 reply; 3+ messages in thread
From: yee.lee @ 2021-07-29 2:07 UTC (permalink / raw)
To: linux-kernel
Cc: nicholas.Tang, Kuan-Ying.lee, chinwen.chang, Yee Lee,
Catalin Marinas, Will Deacon, Matthias Brugger, Marc Zyngier,
David Brazdil, Ard Biesheuvel, Fuad Tabba,
moderated list:ARM64 PORT (AARCH64 ARCHITECTURE),
moderated list:ARM/Mediatek SoC support
From: Yee Lee <yee.lee@mediatek.com>
Add an alias, "arm64.nomte", to override id-reg and
suppress mte feature.
Suggested-by: Marc Zyngier <maz@kernel.org>
Suggested-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Yee Lee <yee.lee@mediatek.com>
---
arch/arm64/kernel/idreg-override.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm64/kernel/idreg-override.c b/arch/arm64/kernel/idreg-override.c
index 53a381a7f65d..d8e606fe3c21 100644
--- a/arch/arm64/kernel/idreg-override.c
+++ b/arch/arm64/kernel/idreg-override.c
@@ -54,6 +54,7 @@ static const struct ftr_set_desc pfr1 __initconst = {
.override = &id_aa64pfr1_override,
.fields = {
{ "bt", ID_AA64PFR1_BT_SHIFT },
+ { "mte", ID_AA64PFR1_MTE_SHIFT},
{}
},
};
@@ -100,6 +101,7 @@ static const struct {
{ "arm64.nopauth",
"id_aa64isar1.gpi=0 id_aa64isar1.gpa=0 "
"id_aa64isar1.api=0 id_aa64isar1.apa=0" },
+ { "arm64.nomte", "id_aa64pfr1.mte=0" },
{ "nokaslr", "kaslr.disabled=1" },
};
--
2.18.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2 1/1] arm64/cpufeature: Add arm64.nomte to override id-reg
2021-07-29 2:07 ` [PATCH v2 1/1] arm64/cpufeature: Add arm64.nomte to override id-reg yee.lee
@ 2021-07-29 8:47 ` Marc Zyngier
0 siblings, 0 replies; 3+ messages in thread
From: Marc Zyngier @ 2021-07-29 8:47 UTC (permalink / raw)
To: yee.lee
Cc: linux-kernel, nicholas.Tang, Kuan-Ying.lee, chinwen.chang,
Catalin Marinas, Will Deacon, Matthias Brugger, David Brazdil,
Ard Biesheuvel, Fuad Tabba,
moderated list:ARM64 PORT (AARCH64 ARCHITECTURE),
moderated list:ARM/Mediatek SoC support
On Thu, 29 Jul 2021 03:07:12 +0100,
<yee.lee@mediatek.com> wrote:
>
> From: Yee Lee <yee.lee@mediatek.com>
>
> Add an alias, "arm64.nomte", to override id-reg and
This isn't just an alias. This patch does two things:
- it allows the ID_AA64PFR1_EL1.MTE shadow capability to be set from
the command line,
- it provides the arm64.nomte alias that sets the above to 0 to
disable the MTE feature.
> suppress mte feature.
s/mte/MTE/
Maybe also worth indicating *why* this is needed. Possible
justifications include errata workarounds, performance issues... Pick
your own.
>
> Suggested-by: Marc Zyngier <maz@kernel.org>
> Suggested-by: Suzuki K Poulose <suzuki.poulose@arm.com>
> Signed-off-by: Yee Lee <yee.lee@mediatek.com>
> ---
> arch/arm64/kernel/idreg-override.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/arm64/kernel/idreg-override.c b/arch/arm64/kernel/idreg-override.c
> index 53a381a7f65d..d8e606fe3c21 100644
> --- a/arch/arm64/kernel/idreg-override.c
> +++ b/arch/arm64/kernel/idreg-override.c
> @@ -54,6 +54,7 @@ static const struct ftr_set_desc pfr1 __initconst = {
> .override = &id_aa64pfr1_override,
> .fields = {
> { "bt", ID_AA64PFR1_BT_SHIFT },
> + { "mte", ID_AA64PFR1_MTE_SHIFT},
> {}
> },
> };
> @@ -100,6 +101,7 @@ static const struct {
> { "arm64.nopauth",
> "id_aa64isar1.gpi=0 id_aa64isar1.gpa=0 "
> "id_aa64isar1.api=0 id_aa64isar1.apa=0" },
> + { "arm64.nomte", "id_aa64pfr1.mte=0" },
> { "nokaslr", "kaslr.disabled=1" },
> };
>
This needs to be documented in kernel-parameters.txt. See the nobti
and nopauth options for guidance.
Thanks,
M.
--
Without deviation from the norm, progress is not possible.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-07-29 8:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-29 2:07 [PATCH v2 0/1] Add option to disable mte support yee.lee
2021-07-29 2:07 ` [PATCH v2 1/1] arm64/cpufeature: Add arm64.nomte to override id-reg yee.lee
2021-07-29 8:47 ` Marc Zyngier
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).