From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5C672249F5; Thu, 4 Jan 2024 16:02:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="q4PD0cGd" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Sender:Reply-To:Content-ID:Content-Description; bh=azJ/J7vywXkqTQ9Hi2IirR6RPgqAfj1yxhz8MRLS2x0=; b=q4PD0cGdukmiPEaNlMlJWJF+pT ZXVvbKF0lx8N6RKDbdA3XnJFCH57UNSdhZ/kO8Iz0hoRFVNagfGq3512N2nRWB7DjAXdStXkQIQWA ncOA4AZhdNj8GPB/A2qakkDxKh6kd0iDbs6UmdffT9uSFK6jyOMkzXooC/E6xuAvuKKbe7Rp3CQTz J1I841KAHRyzTq2XKmovhgML0YXdz5QY3zZHBV6z1JGo68+qVuCERlZ6TC/jEWjXTKRPozGsTHkOr 2gLYqGCPigeu8LwNiVrx9UwGlVUWFnDhAyslZYKq4eBvBb5hXDvGsvbI1KfC4At7taj8HX1V2qE8x 5swElK2g==; Received: from [50.53.46.231] (helo=[192.168.254.15]) by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1rLQAp-00EbY6-1D; Thu, 04 Jan 2024 16:02:23 +0000 Message-ID: <41cdcf9d-d726-4f4f-9616-d67e68a535cb@infradead.org> Date: Thu, 4 Jan 2024 08:02:21 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH -fixes v2] RISC-V: KVM: Require HAVE_KVM Content-Language: en-US To: Andrew Jones , 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, sfr@canb.auug.org.au, alex@ghiti.fr, mpe@ellerman.id.au, npiggin@gmail.com, linuxppc-dev@lists.ozlabs.org, pbonzini@redhat.com References: <20240104123727.76987-2-ajones@ventanamicro.com> From: Randy Dunlap In-Reply-To: <20240104123727.76987-2-ajones@ventanamicro.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 1/4/24 04:37, Andrew Jones wrote: > 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 Thanks. > --- > > 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 -- #Randy