RISC-V: KVM: Add support for Svpbmt inside Guest/VM
authorAnup Patel <apatel@ventanamicro.com>
Fri, 29 Jul 2022 11:45:18 +0000 (17:15 +0530)
committerAnup Patel <anup@brainfault.org>
Fri, 29 Jul 2022 11:45:18 +0000 (17:15 +0530)
commit6bb2e00ea304ffc0446f345c46fe22713ce43cbf
tree054dbf5e54bdae60014a7b008dacb58757cbd202
parent659ad6d82c3121088daeaa38ba94d182b55bbb22
RISC-V: KVM: Add support for Svpbmt inside Guest/VM

The Guest/VM can use Svpbmt in VS-stage page tables when allowed by the
Hypervisor using the henvcfg.PBMTE bit.

We add Svpbmt support for the KVM Guest/VM which can be enabled/disabled
by the KVM user-space (QEMU/KVMTOOL) using the ISA extension ONE_REG
interface.

Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Reviewed-by: Atish Patra <atishp@rivosinc.com>
Signed-off-by: Anup Patel <anup@brainfault.org>
arch/riscv/include/asm/csr.h
arch/riscv/include/uapi/asm/kvm.h
arch/riscv/kvm/vcpu.c