[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <38ce44c1-08cf-4e3f-8ade-20da224f529c@iscas.ac.cn>
Date: Thu, 25 Dec 2025 18:14:41 +0800
From: Vivian Wang <wangruikang@...as.ac.cn>
To: Clément Léger <cleger@...osinc.com>,
Paul Walmsley <paul.walmsley@...ive.com>, Palmer Dabbelt
<palmer@...belt.com>, Anup Patel <anup@...infault.org>,
Atish Patra <atishp@...shpatra.org>, Shuah Khan <shuah@...nel.org>,
Jonathan Corbet <corbet@....net>, linux-riscv@...ts.infradead.org,
linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
kvm@...r.kernel.org, kvm-riscv@...ts.infradead.org,
linux-kselftest@...r.kernel.org
Cc: Samuel Holland <samuel.holland@...ive.com>,
Andrew Jones <ajones@...tanamicro.com>, Deepak Gupta <debug@...osinc.com>,
Charlie Jenkins <charlie@...osinc.com>
Subject: Re: [PATCH v8 06/14] riscv: misaligned: request misaligned exception
from SBI
Hi Clément and riscv maintainers:
On 5/23/25 18:19, Clément Léger wrote:
> Now that the kernel can handle misaligned accesses in S-mode, request
> misaligned access exception delegation from SBI. This uses the FWFT SBI
> extension defined in SBI version 3.0.
>
> Signed-off-by: Clément Léger <cleger@...osinc.com>
> Reviewed-by: Andrew Jones <ajones@...tanamicro.com>
> ---
> arch/riscv/include/asm/cpufeature.h | 3 +-
> arch/riscv/kernel/traps_misaligned.c | 71 +++++++++++++++++++++-
> arch/riscv/kernel/unaligned_access_speed.c | 8 ++-
> 3 files changed, 77 insertions(+), 5 deletions(-)
This causes a regression on platforms where vector misaligned access can
be emulated with OpenSBI (since OpenSBI commit c2acc5e ("lib:
sbi_misaligned_ldst: Add handling of vector load/store"), because this
disables that with FWFT. This means that vector misaligned loads and
stores that were emulated instead get a SIGBUS.
This happens on Sophgo SG2044 and SpacemiT K1. Notably this causes these
platforms to fail Zicclsm which stipulates that misaligned vector memory
accesses succeed if vector instructions are available at all [1].
I'm not very certain why vector emulation support was omitted in this
series. Should we perhaps add the same emulation support to Linux as
well for the sake of these kind of platforms?
Thanks,
Vivian "dramforever" Wang
[1]: https://github.com/riscv/riscv-profiles/issues/58
Powered by blists - more mailing lists