[PATCH 3/3] RISC-V: KVM: Decouple vector prctl state from VM ISA
From: Samuel Holland
Date: Wed Oct 07 2026 - 04:55:49 EST
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 was hooked up to KVM so a process that
could not use V in userspace also could not create a KVM VM with V in
the ISA.
Remove this connection as it does not really help with any compatibility
concerns. A VMM that does not understand V will not include it in the
virtual machine's ISA.
Signed-off-by: Samuel Holland <samuel.holland@xxxxxxxxxx>
---
arch/riscv/kvm/isa.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/arch/riscv/kvm/isa.c b/arch/riscv/kvm/isa.c
index 971f44655100a..447c778bf850e 100644
--- a/arch/riscv/kvm/isa.c
+++ b/arch/riscv/kvm/isa.c
@@ -9,7 +9,6 @@
#include <linux/nospec.h>
#include <linux/pgtable.h>
#include <asm/kvm_isa.h>
-#include <asm/vector.h>
#define KVM_ISA_EXT_ARR(ext) \
[KVM_RISCV_ISA_EXT_##ext] = RISCV_ISA_EXT_##ext
@@ -159,8 +158,6 @@ bool kvm_riscv_isa_enable_allowed(unsigned long ext)
* Guest OS can use Svadu only when host OS enable Svadu.
*/
return arch_has_hw_pte_young();
- case KVM_RISCV_ISA_EXT_V:
- return riscv_v_vstate_ctrl_user_allowed();
default:
break;
}
--
2.52.0