Message ID | 20240104104307.16019-2-ajones@ventanamicro.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-16520-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp5530239dyb; Thu, 4 Jan 2024 02:43:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IHag/naQI39d9VWgknglXdMtzio2qSsJm2PlaNld6WXPeufZPUxSn9QXz7c4ofR0JuT/+Cu X-Received: by 2002:a05:620a:8523:b0:77f:7f49:5e4e with SMTP id pe35-20020a05620a852300b0077f7f495e4emr351324qkn.10.1704365023788; Thu, 04 Jan 2024 02:43:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704365023; cv=none; d=google.com; s=arc-20160816; b=ncsFYfen2V7/lSCxkpNJU/qV4w6B87qllYhZ+Ke7onwM5B9Iy0zHWG4p3x5p07xRMb cWa+/u7JqjmApD4hP2NdLwG43woN8PbY2oslp/YxYCrU+TY8bJL1buaYyzlEFpVpOB2N EG0V6NyzFhw5RFBqhesyzfbRXnaOA73xk4muawpvetOXE5pMeojprJQh1VNtjAZc2osO 2c7pHKGGRvnUQ+Jn61d1A0oayNpXFJFBdDk6tlzuA2TtEEgWhSlNiLgPWBjsJG1iUIyL Nw0zV5uF6wH2qL58XFi1j6mH/LwEa/rYa1m2Il/WN+1pqY06+O7ID41y12ggPhHUpbTT yIbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=dtLgJ10JUGu29gifzEIMC137KNsEgAPpefsYRRnI/LY=; fh=FQEBWr4rqomj0KsNZgM5wENuBEwpOLwjxlwo4Pa0MpU=; b=ZyiWhqY0OX4auYUkDd3v0BUD1oqwWKAdsFghHaGKtFnVsJkiJI04XTqG3t4baPPjDA MnhbKDtcapCobpYRVJ/sXuJv9UYZ9sTm9KQjX8GW3O/7QrXZqkzKLmMh/D+l1uge6V+v w/FdFhA3QtqV4PjvFPtGCioZwRLWVFNeayDgwabsSDwMjVloBLKYMdXkozNtqv9oWbcM wHYkVVTt530FhgGRUC56CtajvSFsXd5gsSBOs9mFOQm+CA7rChEsWoo5aZv2TgeGNsHU dMJJD9ZsxZD4M61Gt8j+IkWO/l2Rrk1WQm35+ruBNy2oJjK92YTbo/Bw05xMO1TStJGs 4aZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=es4DCxXv; spf=pass (google.com: domain of linux-kernel+bounces-16520-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16520-ouuuleilei=gmail.com@vger.kernel.org" Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d13-20020ac85d8d000000b0042520be2533si31127594qtx.574.2024.01.04.02.43.43 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 02:43:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-16520-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=es4DCxXv; spf=pass (google.com: domain of linux-kernel+bounces-16520-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16520-ouuuleilei=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 84EAB1C23909 for <ouuuleilei@gmail.com>; Thu, 4 Jan 2024 10:43:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B25572111F; Thu, 4 Jan 2024 10:43:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ventanamicro.com header.i=@ventanamicro.com header.b="es4DCxXv" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-ej1-f49.google.com (mail-ej1-f49.google.com [209.85.218.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9B33A210F1 for <linux-kernel@vger.kernel.org>; Thu, 4 Jan 2024 10:43:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ventanamicro.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ventanamicro.com Received: by mail-ej1-f49.google.com with SMTP id a640c23a62f3a-a28005f9b9cso39835966b.3 for <linux-kernel@vger.kernel.org>; Thu, 04 Jan 2024 02:43:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1704364989; x=1704969789; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=dtLgJ10JUGu29gifzEIMC137KNsEgAPpefsYRRnI/LY=; b=es4DCxXvVPYB3dHQECua89GgLM8w2mW57R8Q198PAS3MgJoouY1YqyJxsNN/H02Atn YbKrns68FWuMw+U3WyPkw5ROXYJcymivI+JzVt2ObROmsKTyyxdBclbglrRvBR/kXMj1 46PjkuRvSzUo2FJBFOOC4ncoH0vyzEBfDOe3sWQykw+v53lgtO7V5iMhGC75M4rJIs6m gG74tIOgkT9FytxQE4jBwrbDMkW2mUSeAJYXl8G9SWBPMoehSuEXjeq5esNJF7zp2RD8 jn/aB3qqhO4cjOjS+qdPrrUwyJMN0cH7de8QDsLFR3rPfiIJd4gMt8Y7NtqCmwyf2111 2gpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704364989; x=1704969789; 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=dtLgJ10JUGu29gifzEIMC137KNsEgAPpefsYRRnI/LY=; b=uz5W9wkM0xDmXZrbUC84ic198jMszR/rJMg6+/7bmvVSRjOcOp7qFsxb0zG5rVjYkb p9dQz8bS81jtQuOMj7EO9cynu0zZ2PFqPeoRc+6u9HXzuGf8aqt56UE6BvoRWy/ytXXO +EHTbozEkogokcYPvj5PZSjPC6vBRF5Xgw/Hq/KF/adbrOVc2N4sbN3JRJ56aHhW7jFM 432Z+D4UgWRHE9eLmRZuWispDJ2SeQD03T4XMGLK6/u5fXx4AWhb1F/XDOEkjtd3iy1I 8ynTUaMF6nkQWMLGtg+6bZtLd2QiPTM+PVOtEC85B2rLtNOlYDz2Z4t2njC/rfa5zZaI JAag== X-Gm-Message-State: AOJu0YwspV2d7XWUVM1aL127o4xx1k7CABJHa0EHW7Vgs6efuT7rtwDt YIoVn2mj54jiunesrymkwx2uYOdXhDH+1w== X-Received: by 2002:a17:906:db05:b0:a28:dba3:3fd2 with SMTP id xj5-20020a170906db0500b00a28dba33fd2mr229850ejb.142.1704364988823; Thu, 04 Jan 2024 02:43:08 -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 h5-20020a1709060f4500b00a1cf3fce937sm13664229ejj.162.2024.01.04.02.43.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 02:43:08 -0800 (PST) From: Andrew Jones <ajones@ventanamicro.com> 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 Subject: [PATCH] RISC-V: KVM: Require HAVE_KVM Date: Thu, 4 Jan 2024 11:43:08 +0100 Message-ID: <20240104104307.16019-2-ajones@ventanamicro.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-type: text/plain Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787156259376199469 X-GMAIL-MSGID: 1787156259376199469 |
Series |
RISC-V: KVM: Require HAVE_KVM
|
|
Commit Message
Andrew Jones
Jan. 4, 2024, 10:43 a.m. UTC
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.
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Closes: https://lore.kernel.org/all/44907c6b-c5bd-4e4a-a921-e4d3825539d8@infradead.org/
Signed-off-by: Andrew Jones <ajones@ventanamicro.com>
---
arch/riscv/Kconfig | 1 +
arch/riscv/kvm/Kconfig | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
Comments
This applies to linux-next, but I forgot to append -next to the PATCH prefix. On Thu, Jan 04, 2024 at 11:43:08AM +0100, 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. > > Reported-by: Randy Dunlap <rdunlap@infradead.org> > Closes: https://lore.kernel.org/all/44907c6b-c5bd-4e4a-a921-e4d3825539d8@infradead.org/ I think powerpc may need a patch like this as well, since I don't see anything ensuring EVENTFD is selected for it anymore either. Thanks, drew > Signed-off-by: Andrew Jones <ajones@ventanamicro.com> > --- > 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 > -- > 2.43.0 >
On 04/01/2024 11:52, Andrew Jones wrote: > This applies to linux-next, but I forgot to append -next to the PATCH > prefix. Shoudn't this go to -fixes instead? With a Fixes tag? > > On Thu, Jan 04, 2024 at 11:43:08AM +0100, 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. >> >> Reported-by: Randy Dunlap <rdunlap@infradead.org> >> Closes: https://lore.kernel.org/all/44907c6b-c5bd-4e4a-a921-e4d3825539d8@infradead.org/ > I think powerpc may need a patch like this as well, since I don't see > anything ensuring EVENTFD is selected for it anymore either. > > Thanks, > drew > >> Signed-off-by: Andrew Jones <ajones@ventanamicro.com> >> --- >> 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 >> -- >> 2.43.0 >> > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv
On Thu, Jan 04, 2024 at 12:07:51PM +0100, Alexandre Ghiti wrote: > On 04/01/2024 11:52, Andrew Jones wrote: > > This applies to linux-next, but I forgot to append -next to the PATCH > > prefix. > > > Shoudn't this go to -fixes instead? With a Fixes tag? I'm not sure how urgent it is since it's a randconfig thing, but if we think it deserves the -fixes track then I can do that. The Fixes tag isn't super easy to select since, while it seems like it should be 8132d887a702 ("KVM: remove CONFIG_HAVE_KVM_EVENTFD"), it could also be 99cdc6c18c2d ("RISC-V: Add initial skeletal KVM support"). I'll leave both the urgency decision and the Fixes tag selection up to the maintainers. Anup? Paolo? Thanks, drew
On Thu, Jan 4, 2024 at 4:51 PM Andrew Jones <ajones@ventanamicro.com> wrote: > > On Thu, Jan 04, 2024 at 12:07:51PM +0100, Alexandre Ghiti wrote: > > On 04/01/2024 11:52, Andrew Jones wrote: > > > This applies to linux-next, but I forgot to append -next to the PATCH > > > prefix. > > > > > > Shoudn't this go to -fixes instead? With a Fixes tag? > > I'm not sure how urgent it is since it's a randconfig thing, but if we > think it deserves the -fixes track then I can do that. The Fixes tag isn't > super easy to select since, while it seems like it should be 8132d887a702 > ("KVM: remove CONFIG_HAVE_KVM_EVENTFD"), it could also be 99cdc6c18c2d > ("RISC-V: Add initial skeletal KVM support"). > > I'll leave both the urgency decision and the Fixes tag selection up to > the maintainers. Anup? Paolo? Lets add Fixes: 99cdc6c18c2d ("RISC-V: Add initial skeletal KVM support") Regards, Anup
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