From patchwork Mon Jan 31 16:42:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 1586883 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=Nc82lxgV; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ventanamicro.com header.i=@ventanamicro.com header.a=rsa-sha256 header.s=google header.b=V7VkJnSd; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JnYyD42MHz9s8q for ; Tue, 1 Feb 2022 03:52:20 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=uE17qgt9JW8DcfRnWdZ10Nvo+6/YdkMzG/cHj9yQuHM=; b=Nc82lxgVIEhNzw Vlh+a6isLL8JwRIi3Dk0jUw200kcUVrSyfclPn8IRgjT0CIC0QwhxKAvNv+LphZ7EHa5xTzMFjR96 jUxhPT2Qy7M19F0QOSoeo2QyEEULkJ9bFd27ZwoF62/gxNLghz3ntG1b2x6OgB+WM2zjfySGJdW8V TZImLPYxkrpz+h1Reo9PnwCqEuLCbWsCvdf9Cczzc1TV29hpKwFc1AyrbjI9wzftBXfq61xJjHN7A pKeoo2JRDSB9D/qEHM8WKgN4rFwLgwkFz983NBlFgbM7JubsaSYKI/XjNUz+v1+SfIqiRBaBtLyq/ cYLd/NwjeRrDRWpbGiDA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nEZub-009wAY-PK; Mon, 31 Jan 2022 16:52:17 +0000 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nEZmB-009uLB-QW for kvm-riscv@lists.infradead.org; Mon, 31 Jan 2022 16:43:37 +0000 Received: by mail-ed1-x536.google.com with SMTP id n10so27876041edv.2 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=1WXHn1NtjtXSMa8N60bb1lcT/zzbEBQjTIrTdhbHNJSS/myhJy3P1PhICOCIJIBTTd GFhgOG0fpFkCjzl9ddFc9BGdHXH5Gu6Vt3WJVVK4pnGqE2MyHWoSmeghsJT+gvx1vSnI w++8exlH8V0BNxUZm+anTZBQYS75kR7rHphhFlTjycFUoJ4YVATfPBsdVWgtp+HxxzvN xhvfu7c4Y/AMYHjyZVQZQICKrfT72PHxFCQ6x3xa2JaUy37xxUpzA12V3bfHPGiJ+EQQ ONuqEpUdgcCWZq5zCHseWbZwdebVs44dA9BWUmZcdHZJpS/wFVIx/tATJaNI9HtPL9Fv FHKQ== X-Gm-Message-State: AOAM530XQ+YTb7x6ImrdenmXbRWGENgafV9iTgaojdEZ57dT4w0oGPRv DLTXpMZJnp6O0qNVvIoTr7g7AA== X-Google-Smtp-Source: ABdhPJzYdWkwkSl+sy7pLa9G+31Uj79QOFKPDTW0KlbZ9luY+B9Wio5QZgqA+2A07MgpR+4hfI/TwQ== 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220131_084335_915089_27203D71 X-CRM114-Status: GOOD ( 10.15 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 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 delet [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:536 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: kvm-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "kvm-riscv" Errors-To: kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.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 &&