Skip to content

Commit ef4d483

Browse files
committed
RISC-V: KVM: Fix KVM_GET_REG_LIST API for ISA_EXT registers
The ISA_EXT registers to enabled/disable ISA extensions for VCPU are always available when underlying host has the corresponding ISA extension. The copy_isa_ext_reg_indices() called by the KVM_GET_REG_LIST API does not align with this expectation so let's fix it. Fixes: 031f9ef ("KVM: riscv: Add KVM_GET_REG_LIST API support") Signed-off-by: Anup Patel <apatel@ventanamicro.com> Reviewed-by: Atish Patra <atishp@rivosinc.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Signed-off-by: Anup Patel <anup@brainfault.org>
1 parent ce9ecca commit ef4d483

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/riscv/kvm/vcpu_onereg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,7 @@ static int copy_isa_ext_reg_indices(const struct kvm_vcpu *vcpu,
842842
u64 reg = KVM_REG_RISCV | size | KVM_REG_RISCV_ISA_EXT | i;
843843

844844
isa_ext = kvm_isa_ext_arr[i];
845-
if (!__riscv_isa_extension_available(vcpu->arch.isa, isa_ext))
845+
if (!__riscv_isa_extension_available(NULL, isa_ext))
846846
continue;
847847

848848
if (uindices) {

0 commit comments

Comments
 (0)