[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aBT9CA7vnlfszTDw@arm.com>
Date: Fri, 2 May 2025 18:12:40 +0100
From: Catalin Marinas <catalin.marinas@....com>
To: Yeoreum Yun <yeoreum.yun@....com>
Cc: will@...nel.org, broonie@...nel.org, anshuman.khandual@....com,
joey.gouly@....com, yury.khrustalev@....com, maz@...nel.org,
oliver.upton@...ux.dev, frederic@...nel.org,
shmeerali.kolothum.thodi@...wei.com, james.morse@....com,
mark.rutland@....com, huangxiaojia2@...wei.com,
akpm@...ux-foundation.org, surenb@...gle.com, robin.murphy@....com,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-doc@...r.kernel.org, nd@....com,
Peter Collingbourne <pcc@...gle.com>
Subject: Re: [PATCH v3 1/3] arm64: add FEAT_MTE_TAGGED_FAR feature
On Thu, Apr 10, 2025 at 08:47:19AM +0100, Yeoreum Yun wrote:
> Add FEAT_MTE_TAGGED_FAR cpucap which makes FAR_ELx report
> all non-address bits on a synchronous MTE tag check fault since Armv8.9
>
> Signed-off-by: Yeoreum Yun <yeoreum.yun@....com>
> Acked-by: Yury Khrustalev <yury.khrustalev@....com>
[...]
> @@ -3191,6 +3199,7 @@ static const struct arm64_cpu_capabilities arm64_elf_hwcaps[] = {
> #ifdef CONFIG_ARM64_MTE
> HWCAP_CAP(ID_AA64PFR1_EL1, MTE, MTE2, CAP_HWCAP, KERNEL_HWCAP_MTE),
> HWCAP_CAP(ID_AA64PFR1_EL1, MTE, MTE3, CAP_HWCAP, KERNEL_HWCAP_MTE3),
> + HWCAP_CAP(ID_AA64PFR2_EL1, MTEFAR, IMP, CAP_HWCAP, KERNEL_HWCAP_MTE_FAR),
Nitpick: from a theoretical bisectability perspective, I'd move the
hwcap exposing to the following patch. The rest, feature detection etc
can stay in this file. Otherwise, one can apply this patch, see the
hwcap but not get the actual behaviour.
> #endif /* CONFIG_ARM64_MTE */
> HWCAP_CAP(ID_AA64MMFR0_EL1, ECV, IMP, CAP_HWCAP, KERNEL_HWCAP_ECV),
> HWCAP_CAP(ID_AA64MMFR1_EL1, AFP, IMP, CAP_HWCAP, KERNEL_HWCAP_AFP),
> diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c
> index 285d7d538342..e2b13454e38a 100644
> --- a/arch/arm64/kernel/cpuinfo.c
> +++ b/arch/arm64/kernel/cpuinfo.c
> @@ -160,6 +160,7 @@ static const char *const hwcap_str[] = {
> [KERNEL_HWCAP_SME_SFEXPA] = "smesfexpa",
> [KERNEL_HWCAP_SME_STMOP] = "smestmop",
> [KERNEL_HWCAP_SME_SMOP4] = "smesmop4",
> + [KERNEL_HWCAP_MTE_FAR] = "mte_far",
Personal preference: "mtefar" (no underscore), mostly because there's no
other underscore in the hwcap strings yet ;).
--
Catalin
Powered by blists - more mailing lists