OSDN Git Service

RISC-V: KVM: Provide UAPI for Zicboz block size
authorAndrew Jones <ajones@ventanamicro.com>
Fri, 24 Feb 2023 16:26:30 +0000 (17:26 +0100)
committerPalmer Dabbelt <palmer@rivosinc.com>
Wed, 15 Mar 2023 04:26:07 +0000 (21:26 -0700)
commit665fd8862413f21cd924fc121eadcd32ea122c52
tree8a92b32d96f95261cf5b9d871d0d7df4cbd8745b
parentab0f77465e3e4ec2d2583cd770b157b16cc22844
RISC-V: KVM: Provide UAPI for Zicboz block size

We're about to allow guests to use the Zicboz extension. KVM
userspace needs to know the cache block size in order to
properly advertise it to the guest. Provide a virtual config
register for userspace to get it with the GET_ONE_REG API, but
setting it cannot be supported, so disallow SET_ONE_REG.

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-8-ajones@ventanamicro.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/include/uapi/asm/kvm.h
arch/riscv/kvm/vcpu.c