]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: riscv: Support guest wrs.nto
authorAndrew Jones <ajones@ventanamicro.com>
Fri, 26 Apr 2024 10:08:25 +0000 (12:08 +0200)
committerPalmer Dabbelt <palmer@rivosinc.com>
Fri, 12 Jul 2024 15:54:51 +0000 (08:54 -0700)
commit86d6a86e59e3aa425d829a935c0d92388e4fe55b
tree41c83542a81bb1faf07cc033c68baa705fc9129c
parent244c18fbf64a33d152645766a033b2935ab0acb5
KVM: riscv: Support guest wrs.nto

When a guest traps on wrs.nto, call kvm_vcpu_on_spin() to attempt
to yield to the lock holding VCPU. Also extend the KVM ISA extension
ONE_REG interface to allow KVM userspace to detect and enable the
Zawrs extension for the Guest/VM.

Signed-off-by: Andrew Jones <ajones@ventanamicro.com>
Acked-by: Anup Patel <anup@brainfault.org>
Link: https://lore.kernel.org/r/20240426100820.14762-13-ajones@ventanamicro.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/include/asm/kvm_host.h
arch/riscv/include/uapi/asm/kvm.h
arch/riscv/kvm/vcpu.c
arch/riscv/kvm/vcpu_insn.c
arch/riscv/kvm/vcpu_onereg.c