Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp900045pxb; Tue, 1 Feb 2022 12:45:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJw61Du03ll9adPtaljGPruBt02wfk50D5DeeN858HuK0sNU0L+YHEK/8RRC+ASiCdyTmTjA X-Received: by 2002:a17:90a:df06:: with SMTP id gp6mr4357631pjb.92.1643748349433; Tue, 01 Feb 2022 12:45:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643748349; cv=none; d=google.com; s=arc-20160816; b=UusN7iSRl4aDGFevioR94OARyJEYROcpetsU7/aAfISUA0SVFuVn6iHgAbUkT7ni/c 6z2lbMdsCRlvyiaPHVS+JTanpXSfdVx87CJSPYhxHB9cCEed0Z2jf/SjU2tkLMPLDpC/ PGhFQIXOxKhv3txjb0FQYH6B4A3BSPNID0cpXRSay2mDDdRLImskGKe8x2oKKIV6RqgK esgv9FN9lORYZdBaUn9LmgwcacTfjrZ1Nu6iGIwImW+1ydK/ieKEIjC4ug7zPwYTZTcO 4kB9yTrzo5pw6/PgRrpS7Uk3cFYDXeIao0jDOVPpyVXPvKWXpMHdNWttfr6kLyXf7yeJ s5Cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=dGzXd4bmmboGJFGFy1MxKhj8GszZ6zAjTI5/EJrHl7M=; b=v5UApP2AqfTrf3QLe3ABkspRlNAHhNpi8X268HGmQanuPweolzmgdmHhQpGCXDjU5N lSWoLwdTDVQmZk1BsW1BASav9qVIzzWbmEBJRWpPSEyk73KkxbV93tlouh6EHvWUJKN5 3x8wpqtFRT3tDLGOGkXsZTWWWNjnkqFpEzCN+O2OY//LdmpXTrMOczkvnC/sWx/IPZ8i Zm59u71GPFS/tZ7iq50D/ggJauLl0jNo6taktTG/BuQgYjcghd5/Bh6Mp6dZcnRmjqbK AtfJewPuBaK6edwA/TTItSxRzRBPVjwejVG03t/lJzGBguIeG4+6+TAkWe09NwiEteMs hNNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=V7VkJnSd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n4si20566860plh.396.2022.02.01.12.45.37; Tue, 01 Feb 2022 12:45:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=V7VkJnSd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238432AbiAaQnd (ORCPT + 99 others); Mon, 31 Jan 2022 11:43:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233656AbiAaQnb (ORCPT ); Mon, 31 Jan 2022 11:43:31 -0500 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60495C061714 for ; Mon, 31 Jan 2022 08:43:31 -0800 (PST) Received: by mail-ed1-x52a.google.com with SMTP id p7so27842025edc.12 for ; Mon, 31 Jan 2022 08:43:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=dGzXd4bmmboGJFGFy1MxKhj8GszZ6zAjTI5/EJrHl7M=; b=V7VkJnSdtCA2MSqwQCV/OgUVKpPJJFVLpHLlpmCGdeCMGYOIfxLW+xSh99gc1AW31g L97vfeoAznwYGzM9xYm8DKUVpJnZjJNSwnKM810XANbRvsNvQ3MbLadhVjeDbhx+LbaF vSR0A5p1b5BKr6So34AxFuEsnyFY1azY0f3ai54quZgCEhuOvFRdYd/NT5PEsV+ctn41 FZPMLTQiHzrHKtBKu2WrAegFHg6I6AxYJSx3Kz0bV5IKu+ZI5SbziI96d4ny+IbR19jK L4Fkrj7GnuQUoPukYryJcBYZ7LvjyhLGLqdG84frOYb8AJxIDBTq74h+tIHjxSsUr6s/ GiEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=dGzXd4bmmboGJFGFy1MxKhj8GszZ6zAjTI5/EJrHl7M=; b=C2hpPKX5Jcp7NSp/+tlGg2g5QZfuP4lZEgL3XW5EAYmeyIXeVfJBs5PYAcbFZdOAm/ 1n5nlq7r5j9aUAyJEzcVRmrlA1jewUDp8FaZzqW5ylbKVnUl3FJZif51q4bcMMsq2Frk ZiFSvxEzHc5XHSPUpAGntx1RPyqUNnsTONIZ2kYgwVTHlcX6nSgQdBlKfbaYUId51xJs t46OdOPEgvEb1qw4l5pioUInjloD9BbECDQfpAG22TP/TcW5qP/aqCqO2vQLWdF1TVWy DUkfTSEaZLdscLklKB7OAMNEphoXkpneF00JuXUGNZfdJTyngr2P+jwfCyW1q9tJ5iHZ G0FA== X-Gm-Message-State: AOAM530looDH302XXuI/pZcBzoZOaBqD7vhv3747mYVZvjQv+hO4eFaz YQRwhI+pFXvSvgrT+SlP7BmPrA== X-Received: by 2002:aa7:d0d1:: with SMTP id u17mr20901972edo.179.1643647409952; Mon, 31 Jan 2022 08:43:29 -0800 (PST) Received: from localhost.localdomain ([122.167.49.110]) by smtp.gmail.com with ESMTPSA id m12sm17833138edq.40.2022.01.31.08.43.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Jan 2022 08:43:29 -0800 (PST) From: Anup Patel To: Paolo Bonzini , Atish Patra Cc: Palmer Dabbelt , Paul Walmsley , Albert Ou , Alistair Francis , Anup Patel , kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Anup Patel Subject: [PATCH] RISC-V: KVM: Fix SBI implementation version Date: Mon, 31 Jan 2022 22:12:32 +0530 Message-Id: <20220131164232.295585-1-apatel@ventanamicro.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 #include #include +#include #include #include #include @@ -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