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

zhouquan@iscas.ac.cn posted 6 patches 4 months, 1 week ago
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(-)
[PATCH v2 0/6] RISC-V: KVM: Allow zicbop/bfloat16 exts for guests
Posted by zhouquan@iscas.ac.cn 4 months, 1 week ago
From: Quan Zhou <zhouquan@iscas.ac.cn>

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@iscas.ac.cn/

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
Re: [PATCH v2 0/6] RISC-V: KVM: Allow zicbop/bfloat16 exts for guests
Posted by Anup Patel 3 months, 3 weeks ago
On Fri, Aug 8, 2025 at 4:00 PM <zhouquan@iscas.ac.cn> wrote:
>
> From: Quan Zhou <zhouquan@iscas.ac.cn>
>
> 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@iscas.ac.cn/
>
> 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

Queued this series for Linux-6.18

Thanks,
Anup

>
>  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
>