Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7797397rdb; Thu, 4 Jan 2024 08:02:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IHDMMSooDs6hpqzI/u72rjrXYdXhzSZKdwvS2Kvku5USPERdFDRtuP89ketolbgK33N1VnW X-Received: by 2002:a05:6830:169a:b0:6d8:74e2:8a64 with SMTP id k26-20020a056830169a00b006d874e28a64mr877502otr.67.1704384159553; Thu, 04 Jan 2024 08:02:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704384159; cv=none; d=google.com; s=arc-20160816; b=Uis+uRnbgfuFYT6DbO6V3nxw6l2PHawyYz6s75zzC5+wMm85BkhH7qL1wc+CVY9PcU IPpI4BQ9+HJWgvdGDtxF2ayH3N+nf7JZ+ctKaVyTp9cN4spniNBW9Nu6jllRWCMyccAt GjcLkUqo3U+0sArOMFGs9TCguMCBy4PjPIHtwTV5QBsM8NTlis0++dFXuElFSPRaIsdq lI5V9id9qSONEFyYSJH3tjsuyHudI0XisYQh36UTZMm8C3+8pMBxZ28DHvEskOGGPbYg 2lKe+ViLRV/YEiXttEfgbBgJ1LUlihsxVJznykMS3kJemuWWCHdpu3659pJBgXPveqG4 dbug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=azJ/J7vywXkqTQ9Hi2IirR6RPgqAfj1yxhz8MRLS2x0=; fh=rwjkyIpbYfYfbR+JTYA5Jg23MJkMbcYRDORx1EzQmQs=; b=LIIHCe7+HCXo8PEN1+J6xzXVZMUIq7HCsviDVATVokkoZ36ZJK9ebFpMLC7ab7KOFj BDK4Mx3GhYyOTMm1Wq9OhkHQlZUPUJcX/c94+xEcl3Pd7VKCD4rYS8/ccKp3fzpI5zTt GiKLUHbX3OoHGxoJrGi80crSyQeWItvzTPGGDxHfhcp0SvJ9nl/GYJOAbtqCtd3PbvEl Umj7Qx1Ts59cUEYwEdAFAHhgK79bPWuYtThrf564VS0fkkszQ6hZDPcyEXDbhmy0+ZhE XTqv4kk0y+xmlXVULBbWKgt3ihOBrZaLi4vZuA65uGSZGiWYDZfBU5+oPIkIBFZJPSbU SVqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=q4PD0cGd; spf=pass (google.com: domain of linux-kernel+bounces-16900-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16900-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id m15-20020ab073cf000000b007cd72acc605si1234625uaq.128.2024.01.04.08.02.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 08:02:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-16900-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=q4PD0cGd; spf=pass (google.com: domain of linux-kernel+bounces-16900-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16900-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 4716C1C2225F for ; Thu, 4 Jan 2024 16:02:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7E1D2249F8; Thu, 4 Jan 2024 16:02:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="q4PD0cGd" X-Original-To: linux-kernel@vger.kernel.org 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 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