Skip to content

Commit 4032715

Browse files
committed
RISC-V: KVM: Fix SBI implementation version
The SBI implementation version returned by KVM RISC-V should be the Host Linux version code. Fixes: c62a768 ("RISC-V: KVM: Add SBI v0.2 base extension") Signed-off-by: Anup Patel <apatel@ventanamicro.com> Reviewed-by: Atish Patra <atishp@rivosinc.com> Signed-off-by: Anup Patel <anup@brainfault.org>
1 parent de1d7b6 commit 4032715

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/riscv/kvm/vcpu_sbi_base.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <linux/errno.h>
1010
#include <linux/err.h>
1111
#include <linux/kvm_host.h>
12+
#include <linux/version.h>
1213
#include <asm/csr.h>
1314
#include <asm/sbi.h>
1415
#include <asm/kvm_vcpu_timer.h>
@@ -32,7 +33,7 @@ static int kvm_sbi_ext_base_handler(struct kvm_vcpu *vcpu, struct kvm_run *run,
3233
*out_val = KVM_SBI_IMPID;
3334
break;
3435
case SBI_EXT_BASE_GET_IMP_VERSION:
35-
*out_val = 0;
36+
*out_val = LINUX_VERSION_CODE;
3637
break;
3738
case SBI_EXT_BASE_PROBE_EXT:
3839
if ((cp->a0 >= SBI_EXT_EXPERIMENTAL_START &&

0 commit comments

Comments
 (0)