From: Samuel Holland <samuel.holland@sifive.com>
To: Paul Walmsley <pjw@kernel.org>, Anup Patel <anup@brainfault.org>,
Atish Patra <atish.patra@linux.dev>
Cc: Palmer Dabbelt <palmer@dabbelt.com>,
linux-kernel@vger.kernel.org, kvm-riscv@lists.infradead.org,
linux-riscv@lists.infradead.org,
Andy Chiu <tchiu@tenstorrent.com>,
Samuel Holland <samuel.holland@sifive.com>
Subject: [PATCH 1/3] riscv: Drop CONFIG_RISCV_ISA_V_DEFAULT_ENABLE
Date: Wed, 7 Oct 2026 01:51:16 -0700 [thread overview]
Message-ID: <20261007085126.222688-2-samuel.holland@sifive.com> (raw)
In-Reply-To: <20261007085126.222688-1-samuel.holland@sifive.com>
The ability to prevent userspace from executing vector instructions was
provided as a escape hatch for software that was broken by adding vector
state to the signal context. This appears to be unused in practice, and
creates confusion in the extension support returned by hwprobe(), as in
this one special case an extension reported as present by hwprobe() is
unusable.
Since we believe it is safe to always allow vector usage, start removing
this functionality by dropping the Kconfig option. It is possible to get
equivalent behavior by setting the sysctl at boot via the kernel command
line, but that method will also soon be deprecated.
Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
---
arch/riscv/Kconfig | 11 -----------
arch/riscv/kernel/vector.c | 2 +-
2 files changed, 1 insertion(+), 12 deletions(-)
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index d6c2dbf8455ce..e26450f0d38fb 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -650,17 +650,6 @@ config RISCV_ISA_V
If you don't know what to do here, say Y.
-config RISCV_ISA_V_DEFAULT_ENABLE
- bool "Enable userspace Vector by default"
- depends on RISCV_ISA_V
- default y
- help
- Say Y here if you want to enable Vector in userspace by default.
- Otherwise, userspace has to make explicit prctl() call to enable
- Vector, or enable it via the sysctl interface.
-
- If you don't know what to do here, say Y.
-
config RISCV_ISA_V_UCOPY_THRESHOLD
int "Threshold size for vectorized user copies"
depends on RISCV_ISA_V
diff --git a/arch/riscv/kernel/vector.c b/arch/riscv/kernel/vector.c
index b112166d51e9f..9641343732782 100644
--- a/arch/riscv/kernel/vector.c
+++ b/arch/riscv/kernel/vector.c
@@ -20,7 +20,7 @@
#include <asm/ptrace.h>
#include <asm/bug.h>
-static bool riscv_v_implicit_uacc = IS_ENABLED(CONFIG_RISCV_ISA_V_DEFAULT_ENABLE);
+static bool riscv_v_implicit_uacc = true;
static struct kmem_cache *riscv_v_user_cachep;
#ifdef CONFIG_RISCV_ISA_V_PREEMPTIVE
static struct kmem_cache *riscv_v_kernel_cachep;
--
2.52.0
next prev parent reply other threads:[~2026-10-07 8:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-07 8:51 [PATCH 0/3] riscv: Deprecate userspace vector control interfaces Samuel Holland
2026-10-07 8:51 ` Samuel Holland [this message]
2026-10-13 16:59 ` [PATCH 1/3] riscv: Drop CONFIG_RISCV_ISA_V_DEFAULT_ENABLE Andy Chiu
2026-10-07 8:51 ` [PATCH 2/3] riscv: Deprecate vector state prctl/sysctl Samuel Holland
2026-10-13 16:57 ` Andy Chiu
2026-10-20 18:08 ` Radim Krcmar
2026-10-30 18:36 ` Andy Chiu
2026-10-07 8:51 ` [PATCH 3/3] RISC-V: KVM: Decouple vector prctl state from VM ISA Samuel Holland
2026-10-13 16:58 ` Andy Chiu
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=20261007085126.222688-2-samuel.holland@sifive.com \
--to=samuel.holland@sifive.com \
--cc=anup@brainfault.org \
--cc=atish.patra@linux.dev \
--cc=kvm-riscv@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=pjw@kernel.org \
--cc=tchiu@tenstorrent.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®