diff options
author | Anup Patel <apatel@ventanamicro.com> | 2022-01-31 22:12:32 +0530 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2022-02-02 18:58:06 +0530 |
commit | 403271548a840dd4f884088d6333e09f899be5ff (patch) | |
tree | 710d21fa7e57a55c57b68ba0dfb91f71b97960dc /arch/riscv | |
parent | de1d7b6a51dab546160d252e47baa54adf104d4a (diff) | |
download | linux-403271548a840dd4f884088d6333e09f899be5ff.tar.bz2 |
RISC-V: KVM: Fix SBI implementation version
The SBI implementation version returned by KVM RISC-V should be the
Host Linux version code.
Fixes: c62a76859723 ("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>
Diffstat (limited to 'arch/riscv')
-rw-r--r-- | arch/riscv/kvm/vcpu_sbi_base.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/riscv/kvm/vcpu_sbi_base.c b/arch/riscv/kvm/vcpu_sbi_base.c index 4ecf377f483b..48f431091cdb 100644 --- a/arch/riscv/kvm/vcpu_sbi_base.c +++ b/arch/riscv/kvm/vcpu_sbi_base.c @@ -9,6 +9,7 @@ #include <linux/errno.h> #include <linux/err.h> #include <linux/kvm_host.h> +#include <linux/version.h> #include <asm/csr.h> #include <asm/sbi.h> #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, *out_val = KVM_SBI_IMPID; break; case SBI_EXT_BASE_GET_IMP_VERSION: - *out_val = 0; + *out_val = LINUX_VERSION_CODE; break; case SBI_EXT_BASE_PROBE_EXT: if ((cp->a0 >= SBI_EXT_EXPERIMENTAL_START && |