Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit c66f3b4

Browse files
zcxGGmuavpatel
authored andcommitted
RISC-V: KVM: Fix incorrect reg_subtype labels in kvm_riscv_vcpu_set_reg_isa_ext function
In the function kvm_riscv_vcpu_set_reg_isa_ext, the original code used incorrect reg_subtype labels KVM_REG_RISCV_SBI_MULTI_EN/DIS. These have been corrected to KVM_REG_RISCV_ISA_MULTI_EN/DIS respectively. Although they are numerically equivalent, the actual processing will not result in errors, but it may lead to ambiguous code semantics. Fixes: 6130294 ("RISC-V: KVM: Extend ONE_REG to enable/disable multiple ISA extensions") Signed-off-by: Quan Zhou <zhouquan@iscas.ac.cn> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Link: https://lore.kernel.org/r/ff1c6771a67d660db94372ac9aaa40f51e5e0090.1716429371.git.zhouquan@iscas.ac.cn Signed-off-by: Anup Patel <anup@brainfault.org>
1 parent 2d707b4 commit c66f3b4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/riscv/kvm/vcpu_onereg.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -724,9 +724,9 @@ static int kvm_riscv_vcpu_set_reg_isa_ext(struct kvm_vcpu *vcpu,
724724
switch (reg_subtype) {
725725
case KVM_REG_RISCV_ISA_SINGLE:
726726
return riscv_vcpu_set_isa_ext_single(vcpu, reg_num, reg_val);
727-
case KVM_REG_RISCV_SBI_MULTI_EN:
727+
case KVM_REG_RISCV_ISA_MULTI_EN:
728728
return riscv_vcpu_set_isa_ext_multi(vcpu, reg_num, reg_val, true);
729-
case KVM_REG_RISCV_SBI_MULTI_DIS:
729+
case KVM_REG_RISCV_ISA_MULTI_DIS:
730730
return riscv_vcpu_set_isa_ext_multi(vcpu, reg_num, reg_val, false);
731731
default:
732732
return -ENOENT;

0 commit comments

Comments
 (0)