[PATCH RESEND v7 3/6] arm64: Kconfig: add LSUI Kconfig

Yeoreum Yun posted 6 patches 1 month, 2 weeks ago
There is a newer version of this series
[PATCH RESEND v7 3/6] arm64: Kconfig: add LSUI Kconfig
Posted by Yeoreum Yun 1 month, 2 weeks ago
Since Armv9.6, FEAT_LSUI supplies the load/store instructions for
previleged level to access to access user memory without clearing
PSTATE.PAN bit.
It's enough to add CONFIG_AS_HAS_LSUI only because the code for LSUI uses
individual `.arch_extension` entries.

Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
---
 arch/arm64/Kconfig | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index e9bbfacc35a6..c474de3dce02 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -2239,6 +2239,11 @@ config ARM64_GCS

 endmenu # "v9.4 architectural features"

+config AS_HAS_LSUI
+	def_bool $(as-instr,.arch_extension lsui)
+	help
+	 Supported by LLVM 20 and later, not yet supported by GNU AS.
+
 config ARM64_SVE
 	bool "ARM Scalable Vector Extension support"
 	default y
--
LEVI:{C3F47F37-75D8-414A-A8BA-3980EC8A46D7}
Re: [PATCH RESEND v7 3/6] arm64: Kconfig: add LSUI Kconfig
Posted by Catalin Marinas 3 weeks ago
On Sat, Aug 16, 2025 at 04:19:26PM +0100, Yeoreum Yun wrote:
> Since Armv9.6, FEAT_LSUI supplies the load/store instructions for
> previleged level to access to access user memory without clearing
> PSTATE.PAN bit.
> It's enough to add CONFIG_AS_HAS_LSUI only because the code for LSUI uses
> individual `.arch_extension` entries.

The subject could be improved slightly: Detect toolchain support for
LSUI.

> 
> Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
> ---
>  arch/arm64/Kconfig | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index e9bbfacc35a6..c474de3dce02 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -2239,6 +2239,11 @@ config ARM64_GCS
> 
>  endmenu # "v9.4 architectural features"
> 
> +config AS_HAS_LSUI
> +	def_bool $(as-instr,.arch_extension lsui)
> +	help
> +	 Supported by LLVM 20 and later, not yet supported by GNU AS.

binutils 2.45 added support for LSUI.

Nitpick: we tend to add a two-space indentation from "help".

Otherwise it looks fine:

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Re: [PATCH RESEND v7 3/6] arm64: Kconfig: add LSUI Kconfig
Posted by Yeoreum Yun 2 weeks, 5 days ago
Hi Catalin,

> On Sat, Aug 16, 2025 at 04:19:26PM +0100, Yeoreum Yun wrote:
> > Since Armv9.6, FEAT_LSUI supplies the load/store instructions for
> > previleged level to access to access user memory without clearing
> > PSTATE.PAN bit.
> > It's enough to add CONFIG_AS_HAS_LSUI only because the code for LSUI uses
> > individual `.arch_extension` entries.
>
> The subject could be improved slightly: Detect toolchain support for
> LSUI.
>
> >
> > Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
> > ---
> >  arch/arm64/Kconfig | 5 +++++
> >  1 file changed, 5 insertions(+)
> >
> > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> > index e9bbfacc35a6..c474de3dce02 100644
> > --- a/arch/arm64/Kconfig
> > +++ b/arch/arm64/Kconfig
> > @@ -2239,6 +2239,11 @@ config ARM64_GCS
> >
> >  endmenu # "v9.4 architectural features"
> >
> > +config AS_HAS_LSUI
> > +	def_bool $(as-instr,.arch_extension lsui)
> > +	help
> > +	 Supported by LLVM 20 and later, not yet supported by GNU AS.
>
> binutils 2.45 added support for LSUI.
>
> Nitpick: we tend to add a two-space indentation from "help".
>
> Otherwise it looks fine:
>
> Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>

Thanks! I'll change the Nitpick and send again.

--
Sincerely,
Yeoreum Yun
Re: [PATCH RESEND v7 3/6] arm64: Kconfig: add LSUI Kconfig
Posted by Will Deacon 2 weeks, 5 days ago
On Mon, Sep 15, 2025 at 11:42:12AM +0100, Yeoreum Yun wrote:
> > On Sat, Aug 16, 2025 at 04:19:26PM +0100, Yeoreum Yun wrote:
> > > Since Armv9.6, FEAT_LSUI supplies the load/store instructions for
> > > previleged level to access to access user memory without clearing
> > > PSTATE.PAN bit.
> > > It's enough to add CONFIG_AS_HAS_LSUI only because the code for LSUI uses
> > > individual `.arch_extension` entries.
> >
> > The subject could be improved slightly: Detect toolchain support for
> > LSUI.
> >
> > >
> > > Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
> > > ---
> > >  arch/arm64/Kconfig | 5 +++++
> > >  1 file changed, 5 insertions(+)
> > >
> > > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> > > index e9bbfacc35a6..c474de3dce02 100644
> > > --- a/arch/arm64/Kconfig
> > > +++ b/arch/arm64/Kconfig
> > > @@ -2239,6 +2239,11 @@ config ARM64_GCS
> > >
> > >  endmenu # "v9.4 architectural features"
> > >
> > > +config AS_HAS_LSUI
> > > +	def_bool $(as-instr,.arch_extension lsui)
> > > +	help
> > > +	 Supported by LLVM 20 and later, not yet supported by GNU AS.
> >
> > binutils 2.45 added support for LSUI.
> >
> > Nitpick: we tend to add a two-space indentation from "help".
> >
> > Otherwise it looks fine:
> >
> > Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
> 
> Thanks! I'll change the Nitpick and send again.

Please don't resend until we've concluded on the CAS discussion.

Will
Re: [PATCH RESEND v7 3/6] arm64: Kconfig: add LSUI Kconfig
Posted by Yeoreum Yun 2 weeks, 5 days ago
Hi Will,

> On Mon, Sep 15, 2025 at 11:42:12AM +0100, Yeoreum Yun wrote:
> > > On Sat, Aug 16, 2025 at 04:19:26PM +0100, Yeoreum Yun wrote:
> > > > Since Armv9.6, FEAT_LSUI supplies the load/store instructions for
> > > > previleged level to access to access user memory without clearing
> > > > PSTATE.PAN bit.
> > > > It's enough to add CONFIG_AS_HAS_LSUI only because the code for LSUI uses
> > > > individual `.arch_extension` entries.
> > >
> > > The subject could be improved slightly: Detect toolchain support for
> > > LSUI.
> > >
> > > >
> > > > Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
> > > > ---
> > > >  arch/arm64/Kconfig | 5 +++++
> > > >  1 file changed, 5 insertions(+)
> > > >
> > > > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> > > > index e9bbfacc35a6..c474de3dce02 100644
> > > > --- a/arch/arm64/Kconfig
> > > > +++ b/arch/arm64/Kconfig
> > > > @@ -2239,6 +2239,11 @@ config ARM64_GCS
> > > >
> > > >  endmenu # "v9.4 architectural features"
> > > >
> > > > +config AS_HAS_LSUI
> > > > +	def_bool $(as-instr,.arch_extension lsui)
> > > > +	help
> > > > +	 Supported by LLVM 20 and later, not yet supported by GNU AS.
> > >
> > > binutils 2.45 added support for LSUI.
> > >
> > > Nitpick: we tend to add a two-space indentation from "help".
> > >
> > > Otherwise it looks fine:
> > >
> > > Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
> >
> > Thanks! I'll change the Nitpick and send again.
>
> Please don't resend until we've concluded on the CAS discussion.

Yes. so I'm waiting for your comment for:
  - https://lore.kernel.org/all/aMfZI2VVV5zEsTna@e129823.arm.com/
  - https://lore.kernel.org/all/aMfrR0vserl%2FhfZ3@e129823.arm.com/

Thanks.

--
Sincerely,
Yeoreum Yun