From patchwork Thu Jan 4 12:37:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jones X-Patchwork-Id: 1882419 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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=pFFpFNAn; 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=XZLNM2D+; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4T5R1x5wrfz1ydb for ; Thu, 4 Jan 2024 23:37:41 +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=RGuDxwQHf1qjechvTenJm05PWQGIDxCwp7gzHQti8DY=; b=pFFpFNAnGU0eWy W+injUvjqjAAY1dr5OGPSS+KVikUnUbItTjoOL0abqJTZ4anAcRbIQqXYiuoS2AuYbhMt/R5zoL3b Uv5u1epq0ZvYo+uIkfZ+seKA8LK0YBefpt3ulClSMo9owvErphiH1ixfQoBMPfCJ9gMYbF52RB/Gw u7WH3R5IlBo+1F9FK/UdFB8Ol1cio3rDrnWSzHGWTYBd8cFEdwdQKXt5E2SwrJawOYDR6o39xDOBf GQNO7aIECV2o3e8DOkn0GYavaNQLOB4RDVuc7VOHC0Uiz4+Vf365Nt7yQmXZpGUu6wnX/og2zwCcG O1dx7QDP1C1Q/1zprEnA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rLMyh-00DzOK-05; Thu, 04 Jan 2024 12:37:39 +0000 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rLMyd-00DzKT-0l for kvm-riscv@lists.infradead.org; Thu, 04 Jan 2024 12:37:36 +0000 Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-a275b3a1167so54693966b.3 for ; Thu, 04 Jan 2024 04:37:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1704371848; x=1704976648; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=b0YjTQ6DAdt/2c3mL0l6eIgN8OTkE75G1dsO8pPOomQ=; b=XZLNM2D+ZN10KUrM1JgAfYK1x4Rd39Igjuwnxq9elxxR6nTxBNw/LGBlHR2NLF/kAh 2BPUo7L6zUsiwCzIsjXK5v8yf0L1Uih8HbuDuyxHdPCixldT9tasz1GpYB+eRtjnPpEl wD1cm1qljnCszx5Tw6TcXnoVtu8+VEIoQwX1135p49J0nc8cZXEKzbgcs5poX7MUeS5C G6xh+uHV10p166lmn4BFEYeEUBGJhKB5ma2GFKBx1PLCmjmjIO3jFGAnLnFjsvfY+n7A qpKFRqVeEL++zMxZ2cQyd+7nuYW4WsDuEjosAQkFmAo94SzKmgGrS3jdRSCmNCP8W45r +4vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704371848; x=1704976648; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=b0YjTQ6DAdt/2c3mL0l6eIgN8OTkE75G1dsO8pPOomQ=; b=VsvSGOCfHIGH/NGq0kBfEesTqUe/iLEWAwMNhTCPP2nbzE7P8KtgTkrBLA7zHwB0IU sMsAT7LK1lJYqrhBVZhPbS4N6XPCsDD9al7U8OzmnXvqC1WXgrnmiAS0EVaIrGEf+JFc NHdQJf7OZb+BN21Dzo9v7eISGDpPwSbN45bI68PfzFMF2aa2bDqZkatAbLCqAKdB89x8 MrEVRnx7e3nBUkAM2a5afiBow1pPUTL0N7z27y/HWD5qjBNlSgX+HuncMpxaF69VXc6d DxxlrEaElklA6z44K6xVNLOnCGHhyJ2yllpG/IP2T4WPUe3NjG+WrbZZeqd1UxLIy3+n RNFQ== X-Gm-Message-State: AOJu0YxaFs7mhDCB+A1AwS7klk5yH9sUQvn242iQvPrCzvs1SyqiM1il kD5OV8XZH5jCXjVQC5OT5GcUgC4XKN7Bdw== X-Google-Smtp-Source: AGHT+IGuKrfQ1OvlUk+ZEceVcHij9CYGgADtdAxpjxUb2xwkyYhUHJZIQ7mR+ZBuQE0/8F7kowQcIw== X-Received: by 2002:a17:906:fa90:b0:a26:b71e:f75 with SMTP id lt16-20020a170906fa9000b00a26b71e0f75mr299486ejb.5.1704371848691; Thu, 04 Jan 2024 04:37:28 -0800 (PST) Received: from localhost (2001-1ae9-1c2-4c00-20f-c6b4-1e57-7965.ip6.tmcz.cz. [2001:1ae9:1c2:4c00:20f:c6b4:1e57:7965]) by smtp.gmail.com with ESMTPSA id gh33-20020a1709073c2100b00a26b3f29f3dsm12649478ejc.43.2024.01.04.04.37.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 04:37:28 -0800 (PST) From: Andrew Jones To: linux-riscv@lists.infradead.org, linux-next@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, kvm-riscv@lists.infradead.org Cc: paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, anup@brainfault.org, atishp@atishpatra.org, rdunlap@infradead.org, sfr@canb.auug.org.au, alex@ghiti.fr, mpe@ellerman.id.au, npiggin@gmail.com, linuxppc-dev@lists.ozlabs.org, pbonzini@redhat.com Subject: [PATCH -fixes v2] RISC-V: KVM: Require HAVE_KVM Date: Thu, 4 Jan 2024 13:37:28 +0100 Message-ID: <20240104123727.76987-2-ajones@ventanamicro.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240104_043735_278927_2AC251F0 X-CRM114-Status: UNSURE ( 9.72 ) X-CRM114-Notice: Please train this message. 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: KVM requires EVENTFD, which is selected by HAVE_KVM. Other KVM supporting architectures select HAVE_KVM and then their KVM Kconfigs ensure its there with a depends on HAVE_KVM. Make RISCV consistent w [...] 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:62b 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 KVM requires EVENTFD, which is selected by HAVE_KVM. Other KVM supporting architectures select HAVE_KVM and then their KVM Kconfigs ensure its there with a depends on HAVE_KVM. Make RISCV consistent with that approach which fixes configs which have KVM but not EVENTFD, as was discovered with a randconfig test. Fixes: 99cdc6c18c2d ("RISC-V: Add initial skeletal KVM support") Reported-by: Randy Dunlap Closes: https://lore.kernel.org/all/44907c6b-c5bd-4e4a-a921-e4d3825539d8@infradead.org/ Signed-off-by: Andrew Jones Reviewed-by: Randy Dunlap Tested-by: Randy Dunlap # build-tested --- v2: - Added Fixes tag and -fixes prefix [Alexandre/Anup] arch/riscv/Kconfig | 1 + arch/riscv/kvm/Kconfig | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index a935a5f736b9..daba06a3b76f 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -128,6 +128,7 @@ config RISCV select HAVE_KPROBES if !XIP_KERNEL select HAVE_KPROBES_ON_FTRACE if !XIP_KERNEL select HAVE_KRETPROBES if !XIP_KERNEL + select HAVE_KVM # https://github.com/ClangBuiltLinux/linux/issues/1881 select HAVE_LD_DEAD_CODE_DATA_ELIMINATION if !LD_IS_LLD select HAVE_MOVE_PMD diff --git a/arch/riscv/kvm/Kconfig b/arch/riscv/kvm/Kconfig index 1fd76aee3b71..36fa8ec9e5ba 100644 --- a/arch/riscv/kvm/Kconfig +++ b/arch/riscv/kvm/Kconfig @@ -19,7 +19,7 @@ if VIRTUALIZATION config KVM tristate "Kernel-based Virtual Machine (KVM) support (EXPERIMENTAL)" - depends on RISCV_SBI && MMU + depends on HAVE_KVM && RISCV_SBI && MMU select HAVE_KVM_IRQCHIP select HAVE_KVM_IRQ_ROUTING select HAVE_KVM_MSI