Skip to contentSkip to conversation

Documentation: RISC-V: uabi: Only scalar misaligned loads are supported

PATCH Applied Palmer Dabbelt 3 participants 3 messages May 24, 2024 – May 30, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Documentation: RISC-V: uabi: Only scalar misaligned loads are supported

From: Palmer Dabbelt <[email protected]>

We're stuck supporting scalar misaligned loads in userspace because they were part of the ISA at the time we froze the uABI. That wasn't the case for vector misaligned accesses, so depending on them unconditionally is a userspace bug. All extant vector hardware traps on these misaligned accesses.

---
 Documentation/arch/riscv/uabi.rst | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Documentation/arch/riscv/uabi.rst +3 -1
index 54d199dce78b..2b420bab0527 100644
@@ -65,4 +65,6 @@ the extension, or may have deliberately removed it from the listing.
 Misaligned accesses
 -------------------
 
-Misaligned accesses are supported in userspace, but they may perform poorly.
+Misaligned scalar accesses are supported in userspace, but they may perform
+poorly.  Misaligned vector accesses are only supported if the Zicclsm extension
+is supported.
Signature · 1 line
2.45.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 18 lines · Palmer Dabbelt

From: Palmer Dabbelt <[email protected]>

We're stuck supporting scalar misaligned loads in userspace because they were part of the ISA at the time we froze the uABI. That wasn't the case for vector misaligned accesses, so depending on them unconditionally is a userspace bug. All extant vector hardware traps on these misaligned accesses.

---
 Documentation/arch/riscv/uabi.rst | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Documentation/arch/riscv/uabi.rst +0 -0
index 54d199dce78b..2b420bab0527 100644

Documentation/arch/riscv/uabi.rst the extension, or may have deliberately removed it from the listing. · line 70

Quoted 7 lines
Documentation/arch/riscv/uabi.rst +3 -1
@@ -65,4 +65,6 @@ the extension, or may have deliberately removed it from the listing.
 Misaligned accesses
 -------------------
 
-Misaligned accesses are supported in userspace, but they may perform poorly.
+Misaligned scalar accesses are supported in userspace, but they may perform
+poorly.  Misaligned vector accesses are only supported if the Zicclsm extension
+is supported.

Now we just need to find someone that cares sufficiently about Zicclsm to write the bindings, detection and hwprobe key for Zicclsm. Maybe I'll be the lucky fool, depending on what the x280 does...

Thanks,
Conor.

#2 lore raw
In reply to Palmer Dabbelt
This patch was applied to riscv/linux.git (fixes) by Palmer Dabbelt <[email protected]>:

Hello:

This patch was applied to riscv/linux.git (fixes)
by Palmer Dabbelt <[email protected]>:

Quoted 9 lines · On Fri, 24 May 2024 11:56:00 -0700 you wrote:

From: Palmer Dabbelt <[email protected]>

We're stuck supporting scalar misaligned loads in userspace because they were part of the ISA at the time we froze the uABI. That wasn't the case for vector misaligned accesses, so depending on them unconditionally is a userspace bug. All extant vector hardware traps on these misaligned accesses.

[...]

Here is the summary with links:
- Documentation: RISC-V: uabi: Only scalar misaligned loads are supported

    https://git.kernel.org/riscv/c/982a7eb97be6

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html