Skip to content

Commit b901484

Browse files
jones-drewavpatel
authored andcommitted
riscv: KVM: Fix SBI TIME error generation
When an invalid function ID of an SBI extension is used we should return not-supported, not invalid-param. Fixes: 5f862df ("RISC-V: KVM: Add v0.1 replacement SBI extensions defined in v0.2") Signed-off-by: Andrew Jones <ajones@ventanamicro.com> Reviewed-by: Anup Patel <anup@brainfault.org> Link: https://lore.kernel.org/r/20250217084506.18763-11-ajones@ventanamicro.com Signed-off-by: Anup Patel <anup@brainfault.org>
1 parent 0611f78 commit b901484

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/riscv/kvm/vcpu_sbi_replace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ static int kvm_sbi_ext_time_handler(struct kvm_vcpu *vcpu, struct kvm_run *run,
2121
u64 next_cycle;
2222

2323
if (cp->a6 != SBI_EXT_TIME_SET_TIMER) {
24-
retdata->err_val = SBI_ERR_INVALID_PARAM;
24+
retdata->err_val = SBI_ERR_NOT_SUPPORTED;
2525
return 0;
2626
}
2727

0 commit comments

Comments
 (0)