]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
RISC-V: KVM: Zicbo[m|z|p] block sizes should be always present in ONE_REG
authorAnup Patel <anup.patel@oss.qualcomm.com>
Mon, 6 Jul 2026 18:15:22 +0000 (23:45 +0530)
committerAnup Patel <anup@brainfault.org>
Mon, 13 Jul 2026 12:50:54 +0000 (18:20 +0530)
commit298276da73cafd837ca9f762b3f9868216124eeb
treebb0d97cf5c50e9a607a8f273458902dce6937855
parent1cc935ec2d87673e3c52ba04f943ab1276c0635b
RISC-V: KVM: Zicbo[m|z|p] block sizes should be always present in ONE_REG

All config and core registers of the KVM RISC-V ONE_REG interface are
expected to be always available to the KVM user-space and the KVM
get-reg-list selftest assumes these registers to be as base registers.

Currently, the Zicbo[m|z|p] block size config registers are only
available when corresponding ISA extension is present on the host
which breaks the above expectation. In fact, KVM get-reg-list selftest
fails when any of the Zicbo[m|z|p] ISA extension is not present on
host. To address this issue, drop the ISA extension checks from
kvm_riscv_vcpu_get/set_reg_config() and copy_config_reg_indices()
functions.

Fixes: 031f9efafc08 ("KVM: riscv: Add KVM_GET_REG_LIST API support")
Fixes: a044ef71043e ("RISC-V: KVM: use ENOENT in *_one_reg() when extension is unavailable")
Fixes: 48e2febcda74 ("RISC-V: KVM: Provide UAPI for Zicbop block size")
Fixes: cf05b059d59f ("RISC-V: KVM: Introduce common kvm_riscv_isa_check_host()")
Signed-off-by: Anup Patel <anup.patel@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20260706181522.2003922-1-anup.patel@oss.qualcomm.com
Signed-off-by: Anup Patel <anup@brainfault.org>
arch/riscv/kvm/vcpu_onereg.c