RISC-V: KVM: Expose Zicboz to the guest
authorAndrew Jones <ajones@ventanamicro.com>
Fri, 24 Feb 2023 16:26:31 +0000 (17:26 +0100)
committerPalmer Dabbelt <palmer@rivosinc.com>
Wed, 15 Mar 2023 04:26:08 +0000 (21:26 -0700)
commitb20f67994f35d75758ff671cd5095ec0cfab6ff9
tree83cce5611cc218f9fe96a92b078d1b5cb3fc72a1
parent665fd8862413f21cd924fc121eadcd32ea122c52
RISC-V: KVM: Expose Zicboz to the guest

Guests may use the cbo.zero instruction when the CPU has the Zicboz
extension and the hypervisor sets henvcfg.CBZE.

Add Zicboz support for KVM guests which may be enabled and
disabled from KVM userspace using the ISA extension ONE_REG API.

Signed-off-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link: https://lore.kernel.org/r/20230224162631.405473-9-ajones@ventanamicro.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/include/uapi/asm/kvm.h
arch/riscv/kvm/vcpu.c