[PATCH v2 0/6] RISC-V: KVM: Allow zicbop/bfloat16 exts for guests

From: zhouquan
Date: Fri Aug 08 2025 - 06:30:58 EST


From: Quan Zhou <zhouquan@xxxxxxxxxxx>

Advertise zicbop/bfloat16 extensions to KVM guest when underlying
host supports it, and add them to get-reg-list test.

---
Change since v1:
- update zicbom/zicboz/zicbop block size registers to depend on the host isa.
- update the reg list filtering in copy_config_reg_indices() to use the host isa.
- add reg list filtering for zicbop.
v1: https://lore.kernel.org/all/cover.1750164414.git.zhouquan@xxxxxxxxxxx/

Quan Zhou (6):
RISC-V: KVM: Change zicbom/zicboz block size to depend on the host isa
RISC-V: KVM: Provide UAPI for Zicbop block size
RISC-V: KVM: Allow Zicbop extension for Guest/VM
RISC-V: KVM: Allow bfloat16 extension for Guest/VM
KVM: riscv: selftests: Add Zicbop extension to get-reg-list test
KVM: riscv: selftests: Add bfloat16 extension to get-reg-list test

arch/riscv/include/uapi/asm/kvm.h | 5 +++
arch/riscv/kvm/vcpu_onereg.c | 34 +++++++++++++++----
.../selftests/kvm/riscv/get-reg-list.c | 25 ++++++++++++++
3 files changed, 58 insertions(+), 6 deletions(-)

--
2.34.1