RISC-V: KVM: Forward SEED CSR access to user space
authorAnup Patel <apatel@ventanamicro.com>
Tue, 13 Feb 2024 13:34:00 +0000 (19:04 +0530)
committerAnup Patel <anup@brainfault.org>
Wed, 6 Mar 2024 15:23:32 +0000 (20:53 +0530)
commitd808f0b1be4888a87524164bc7dad2242734de38
treeaf81b59f1c491397e593924b53965081f17b2ab1
parentd0b94bcbb04262b9ffe6e172223e8cbb663a2c9d
RISC-V: KVM: Forward SEED CSR access to user space

The SEED CSR access from VS/VU mode (guest) will always trap to
HS-mode (KVM) when Zkr extension is available to the Guest/VM.

Forward this CSR access to KVM user space so that it can be
emulated based on the method chosen by VMM.

Fixes: f370b4e668f0 ("RISC-V: KVM: Allow scalar crypto extensions for Guest/VM")
Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Signed-off-by: Anup Patel <anup@brainfault.org>
arch/riscv/kvm/vcpu_insn.c