All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Laight <david.laight.linux@gmail.com>
To: Nylon Chen <nylon.chen@sifive.com>
Cc: 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>,
	linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org,
	Yeting Kuo <yeting.kuo@sifive.com>
Subject: Re: [PATCH 0/2] riscv: Add support for vector misaligned load/store
Date: Tue, 17 Nov 2026 13:12:27 +0000	[thread overview]
Message-ID: <20261117131227.3919c5bd@pumpkin> (raw)
In-Reply-To: <20261116-riscv-vector-misaligned-v1-0-6c4d0ca905b7@sifive.com>

On Mon, 16 Nov 2026 23:38:36 -0800
Nylon Chen <nylon.chen@sifive.com> wrote:

> 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.

I'd have thought that the cost of emulation would so high that you
really don't want to be doing it at all.
I guess you can't stop userspace (they'll just wonder why their optimised
vector functions perform so badly), but I cant see any reason for fixing
up faults in kernel space.

David

> 
> Patch 2 adds a kselftest exercising these code paths across the
> various vector instruction forms and element widths.

WARNING: multiple messages have this Message-ID (diff)
From: David Laight <david.laight.linux@gmail.com>
To: Nylon Chen <nylon.chen@sifive.com>
Cc: 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>,
	linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org,
	Yeting Kuo <yeting.kuo@sifive.com>
Subject: Re: [PATCH 0/2] riscv: Add support for vector misaligned load/store
Date: Tue, 17 Nov 2026 13:12:27 +0000	[thread overview]
Message-ID: <20261117131227.3919c5bd@pumpkin> (raw)
In-Reply-To: <20261116-riscv-vector-misaligned-v1-0-6c4d0ca905b7@sifive.com>

On Mon, 16 Nov 2026 23:38:36 -0800
Nylon Chen <nylon.chen@sifive.com> wrote:

> 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.

I'd have thought that the cost of emulation would so high that you
really don't want to be doing it at all.
I guess you can't stop userspace (they'll just wonder why their optimised
vector functions perform so badly), but I cant see any reason for fixing
up faults in kernel space.

David

> 
> Patch 2 adds a kselftest exercising these code paths across the
> various vector instruction forms and element widths.

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  parent reply	other threads:[~2026-11-17 13:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17  7:38 [PATCH 0/2] riscv: Add support for vector misaligned load/store Nylon Chen
2026-11-17  7:38 ` Nylon Chen
2026-11-17  7:38 ` [PATCH 1/2] riscv: traps: Add support for vector misalignment handler Nylon Chen
2026-11-17  7:38   ` Nylon Chen
2026-11-17 15:51   ` kernel test robot
2026-11-17 15:51     ` kernel test robot
2026-11-17  7:38 ` [PATCH 2/2] selftests/riscv: Add vector misaligned load/store tests Nylon Chen
2026-11-17  7:38   ` Nylon Chen
2026-11-17 13:12 ` David Laight [this message]
2026-11-17 13:12   ` [PATCH 0/2] riscv: Add support for vector misaligned load/store David Laight

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=20261117131227.3919c5bd@pumpkin \
    --to=david.laight.linux@gmail.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=nylon.chen@sifive.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.