[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aYY2CyHWtplQ-fuS@arm.com>
Date: Fri, 6 Feb 2026 18:42:19 +0000
From: Catalin Marinas <catalin.marinas@....com>
To: Yeoreum Yun <yeoreum.yun@....com>
Cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
kvmarm@...ts.linux.dev, kvm@...r.kernel.org,
linux-kselftest@...r.kernel.org, will@...nel.org, maz@...nel.org,
broonie@...nel.org, oliver.upton@...ux.dev, miko.lenczewski@....com,
kevin.brodsky@....com, ardb@...nel.org, suzuki.poulose@....com,
lpieralisi@...nel.org, scott@...amperecomputing.com,
joey.gouly@....com, yuzenghui@...wei.com, pbonzini@...hat.com,
shuah@...nel.org, mark.rutland@....com, arnd@...db.de
Subject: Re: [PATCH v12 2/7] arm64: cpufeature: add FEAT_LSUI
On Wed, Jan 21, 2026 at 07:06:17PM +0000, Yeoreum Yun wrote:
> +#ifdef CONFIG_ARM64_LSUI
> +static bool has_lsui(const struct arm64_cpu_capabilities *entry, int scope)
> +{
> + if (!has_cpuid_feature(entry, scope))
> + return false;
> +
> + /*
> + * A CPU that supports LSUI should also support FEAT_PAN,
> + * so that SW_PAN handling is not required.
> + */
> + if (WARN_ON(!__system_matches_cap(ARM64_HAS_PAN)))
> + return false;
> +
> + return true;
> +}
> +#endif
I still find this artificial dependency a bit strange. Maybe one doesn't
want any PAN at all (software or hardware) and won't get LSUI either
(it's unlikely but possible).
We have the uaccess_ttbr0_*() calls already for !LSUI, so maybe
structuring the macros in a way that they also take effect with LSUI.
For futex, we could add some new functions like uaccess_enable_futex()
which wouldn't do anything if LSUI is enabled with hw PAN.
--
Catalin
Powered by blists - more mailing lists