* [PATCH] RISC-V: KVM: Fix SBI implementation version
@ 2022-01-31 16:42 Anup Patel
2022-02-02 11:21 ` Anup Patel
0 siblings, 1 reply; 2+ messages in thread
From: Anup Patel @ 2022-01-31 16:42 UTC (permalink / raw)
To: Paolo Bonzini, Atish Patra
Cc: Palmer Dabbelt, Paul Walmsley, Albert Ou, Alistair Francis,
Anup Patel, kvm, kvm-riscv, linux-riscv, linux-kernel,
Anup Patel
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>
---
arch/riscv/kvm/vcpu_sbi_base.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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 &&
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] RISC-V: KVM: Fix SBI implementation version
2022-01-31 16:42 [PATCH] RISC-V: KVM: Fix SBI implementation version Anup Patel
@ 2022-02-02 11:21 ` Anup Patel
0 siblings, 0 replies; 2+ messages in thread
From: Anup Patel @ 2022-02-02 11:21 UTC (permalink / raw)
To: Anup Patel
Cc: Paolo Bonzini, Atish Patra, Palmer Dabbelt, Paul Walmsley,
Albert Ou, Alistair Francis, KVM General, kvm-riscv, linux-riscv,
linux-kernel@vger.kernel.org List
On Mon, Jan 31, 2022 at 10:13 PM Anup Patel <apatel@ventanamicro.com> wrote:
>
> 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>
Thanks, I have queued this for fixes.
Regards,
Anup
> ---
> arch/riscv/kvm/vcpu_sbi_base.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> 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 &&
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-02-02 11:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-31 16:42 [PATCH] RISC-V: KVM: Fix SBI implementation version Anup Patel
2022-02-02 11:21 ` Anup Patel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).