From: Nylon Chen <nylon.chen@sifive.com>
To: Paul Walmsley <pjw@kernel.org>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Alexandre Ghiti <alex@ghiti.fr>, Shuah Khan <shuah@kernel.org>
Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org,
Nylon Chen <nylon.chen@sifive.com>,
Yeting Kuo <yeting.kuo@sifive.com>
Subject: [PATCH 0/2] riscv: Add support for vector misaligned load/store
Date: Mon, 16 Nov 2026 23:38:36 -0800 [thread overview]
Message-ID: <20261116-riscv-vector-misaligned-v1-0-6c4d0ca905b7@sifive.com> (raw)
This series adds emulation support for misaligned RISC-V vector
load/store instructions, which may currently fault/trap without being
handled on hardware that does not provide misaligned vector memory
access support.
Patch 1 implements the trap handler, with emulators for vector
load/store covering unit-stride, strided, indexed (ordered and
unordered), segment, whole-register, and fault-only-first forms, for
both user and kernel mode traps.
Patch 2 adds a kselftest exercising these code paths across the
various vector instruction forms and element widths.
Signed-off-by: Nylon Chen <nylon.chen@sifive.com>
---
Nylon Chen (2):
riscv: traps: Add support for vector misalignment handler
selftests/riscv: Add vector misaligned load/store tests
arch/riscv/include/asm/vector.h | 4 +
arch/riscv/kernel/Makefile | 1 +
arch/riscv/kernel/traps_misaligned.c | 39 +-
arch/riscv/kernel/traps_v_misaligned.c | 902 +++++++++++++++++++++
tools/testing/selftests/riscv/vector/Makefile | 5 +-
.../testing/selftests/riscv/vector/v_misaligned.c | 169 ++++
.../testing/selftests/riscv/vector/v_misaligned.h | 530 ++++++++++++
7 files changed, 1647 insertions(+), 3 deletions(-)
---
base-commit: 05441d697f7f9a927264f4058cbbc6a03dfcac9d
change-id: 20261109-riscv-vector-misaligned-54773f80ca6b
Best regards,
--
Nylon Chen <nylon.chen@sifive.com>
next reply other threads:[~2026-11-17 7:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-17 7:38 Nylon Chen [this message]
2026-11-17 7:38 ` [PATCH 1/2] riscv: traps: Add support for vector misalignment handler Nylon Chen
2026-11-17 7:38 ` [PATCH 2/2] selftests/riscv: Add vector misaligned load/store tests Nylon Chen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261116-riscv-vector-misaligned-v1-0-6c4d0ca905b7@sifive.com \
--to=nylon.chen@sifive.com \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=pjw@kernel.org \
--cc=shuah@kernel.org \
--cc=yeting.kuo@sifive.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®