]> git.baikalelectronics.ru Git - kernel.git/commit
RISC-V: KVM: Expose Zicbom to the guest
authorAndrew Jones <ajones@ventanamicro.com>
Sun, 2 Oct 2022 04:49:05 +0000 (10:19 +0530)
committerAnup Patel <anup@brainfault.org>
Sun, 2 Oct 2022 04:49:05 +0000 (10:19 +0530)
commit6d2053f1b3eeded7093ab1c9fda587afc6a7be98
tree631a9fc4677d51f62689adf8c2b95beca7ae9d56
parent29cddc182b1296d7e78d6ed80f6a98f86ab119ba
RISC-V: KVM: Expose Zicbom to the guest

Guests may use the cbo.inval,clean,flush instructions when the
CPU has the Zicbom extension and the hypervisor sets henvcfg.CBIE
(for cbo.inval) and henvcfg.CBCFE (for cbo.clean,flush).

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

Also opportunistically switch the other isa extension checks in
kvm_riscv_vcpu_update_config() to riscv_isa_extension_available().

Signed-off-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Atish Patra <atishp@rivosinc.com>
Signed-off-by: Anup Patel <anup@brainfault.org>
arch/riscv/include/uapi/asm/kvm.h
arch/riscv/kvm/vcpu.c