Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1413606rda; Mon, 23 Oct 2023 11:46:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG8mt7ZBMPXPR6D7A+WCvUcb36UufZQKKV4AIWNX1B8zFnDM1/RymEuB5fVd88us4TOi3Ee X-Received: by 2002:a05:6a20:9187:b0:17c:d4f0:87e0 with SMTP id v7-20020a056a20918700b0017cd4f087e0mr524413pzd.53.1698086802102; Mon, 23 Oct 2023 11:46:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698086802; cv=none; d=google.com; s=arc-20160816; b=duDbq2bkVr/td+dIzvVDo1DiD2jKYjGzM+nBBo9/2dJJD7nuiO0gVJhxgwGRTAn/RF A4VaNYnerj4hTvfVsyvIjSAIYljFZBeuROxMWVRSvjQzatawrFbDY1cbFOc2ycsQGii7 6AO4lXva/+tqooKgCl++qc0bGRSEgFcUfAgDRFJpAIEIBAkzmGCBXx0bmKXycuyDYYMf wc4+teyzoLtKZgY/1Ag7MPWDKr9zNoICqpMGBznTqAvf8KrbNA9MhA4WBwjA4G7gsbhI SLh8zOVYFKbHEgoN2TWHxvJFtifnTrn094GYHxbc1deQmVD8bUI8iFo5GL7bYTlisyNd QDUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:references:in-reply-to :message-id:mime-version:user-agent:feedback-id:dkim-signature :dkim-signature; bh=IEpCttuRg26CpesYQ8Q2lIBb5RtOOwPfreUJDn0eR5U=; fh=HfHfk1UToZMbkv29tw78vOofPvLDPy3u7SMOUsKLQ00=; b=XJtnmPkmfufM3TzCOgpHPDKktzU4jOc3GoCX2IAIIMgVGL4/f+VddqzF7M+blZp6ad 5mrS9DymG31Le+LgNCkTGznaY+xnXDf1HvZMYl3iNbZh3HaxF8r+z7Glr7HymATw0Yvh vyIiW3nTCik6tSI9llvor8I3ZjpW9jXEbq09SCuM9IdK5nj0JEYC99Z1tJWUszgyXcUD iDIKmCbuminL1r9xMn3GZdxlwDkyHhlG2TBRrw8RXnQM0j5hTqkD6TI8Q+nE5Gxdrpfw /ayTV0btIl/CKICgB4N9UAS8cvYXZXPw9inIB5XiK9Fp6akTe6Yn80LFs6UmNhAaqb4Z qxbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm2 header.b=E3FfjqY5; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=tF3BkOOx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id bx28-20020a056a02051c00b005b837c29d22si7475506pgb.177.2023.10.23.11.46.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 11:46:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm2 header.b=E3FfjqY5; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=tF3BkOOx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 567548097A5E; Mon, 23 Oct 2023 11:46:39 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232265AbjJWSqa (ORCPT + 99 others); Mon, 23 Oct 2023 14:46:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232418AbjJWSq3 (ORCPT ); Mon, 23 Oct 2023 14:46:29 -0400 Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 560F5FD; Mon, 23 Oct 2023 11:46:26 -0700 (PDT) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id A3F7F5C02CC; Mon, 23 Oct 2023 14:46:23 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute5.internal (MEProxy); Mon, 23 Oct 2023 14:46:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1698086783; x=1698173183; bh=IE pCttuRg26CpesYQ8Q2lIBb5RtOOwPfreUJDn0eR5U=; b=E3FfjqY5+1NLzibCBU IRS8GUDikz0zLmmP4NEKs4QPt6X1ggxk9uIdYC9p/K7HDYkExlB/XfkkB6klZE7Z ThMrp1kagXtoq+8ORR7UBqMq6LM+R2VhtnN0Tj1xDWKTtaxxBCKNr8PJwmksJMiQ sx5OOANb0QghGACzHzZWyKHzPOTc3H4bu5t5Nog5jhA9RpYwXQ1hdrh4713ltRgG NOtyZvbDqZRK9IAmE7LgLhc6YZFlCo7bK8evvvgdViX3LclFgLbD1ZD0pylbigKq 1kRyAjdAgIhKqBahqdRccJfna9okLyVCC5xvBLIlAjemN2RZ+jtVS1AbmCGGPmcz zRFQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1698086783; x=1698173183; bh=IEpCttuRg26Cp esYQ8Q2lIBb5RtOOwPfreUJDn0eR5U=; b=tF3BkOOxiLD4uKvMgp9bCJiIpOaD1 ARsK6u8ovwxhrhuHqou06K8x9ANzuDLCKs1SNKqKfL0WjaGQeEzUP/Nh8o5l/dg1 oXlZEcsN+qUOPkZsVNNSiE+bBs6/+TzCulGp5dqBw4L5dQGP7JuAy0Gh4u/kYmSL JAWxtgMCxHmclKRCYLFmGK5FgFLrF7ugQB3KM8XYhx+gV3OVcdAz4YQxQMvSvKVg NcIeLScOpcsmyrmFQh/8eYaCYnQ/cVZk94N8Skyw52LVEbA6RtiVnFr4YFYiAuWL DtNh1KqxoFs334FZ6Fa1RivgMQjoZ2vO0L+K8FGc7B7yQhpSdERWLoyFA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrkeeigdduvdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsehttdertderredtnecuhfhrohhmpedftehr nhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrth htvghrnhepffehueegteeihfegtefhjefgtdeugfegjeelheejueethfefgeeghfektdek teffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg hrnhgusegrrhhnuggsrdguvg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 1655AB60089; Mon, 23 Oct 2023 14:46:22 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-1048-g9229b632c5-fm-20231019.001-g9229b632 MIME-Version: 1.0 Message-Id: <1aeb7767-428f-4fbe-8531-c408e580764f@app.fastmail.com> In-Reply-To: <3b731349-38e4-43bd-9482-6fe43871b679@oracle.com> References: <20231023115520.3530120-1-arnd@kernel.org> <20231023120418.GH691768@ziepe.ca> <20231023131229.GR3952@nvidia.com> <3b731349-38e4-43bd-9482-6fe43871b679@oracle.com> Date: Mon, 23 Oct 2023 20:46:01 +0200 From: "Arnd Bergmann" To: "Joao Martins" , "Jason Gunthorpe" Cc: "Arnd Bergmann" , "Kevin Tian" , "Yishai Hadas" , "Shameerali Kolothum Thodi" , "Alex Williamson" , "Brett Creeley" , oushixiong , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] vfio: mlx5, pds: add IOMMU_SUPPORT dependency Content-Type: text/plain X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Mon, 23 Oct 2023 11:46:39 -0700 (PDT) On Mon, Oct 23, 2023, at 19:50, Joao Martins wrote: > On 23/10/2023 14:12, Jason Gunthorpe wrote: >> On Mon, Oct 23, 2023 at 01:37:28PM +0100, Joao Martins wrote: > > To be specific what I meant to move is the IOMMUFD_DRIVER kconfig part, not the > whole iommufd Kconfig [in the patch introducing the problem] e.g. > > diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig > index 2b12b583ef4b..5cc869db1b79 100644 > --- a/drivers/iommu/Kconfig > +++ b/drivers/iommu/Kconfig > @@ -7,6 +7,10 @@ config IOMMU_IOVA > config IOMMU_API > bool > > +config IOMMUFD_DRIVER > + bool > + default n > + > menuconfig IOMMU_SUPPORT > bool "IOMMU Hardware Support" > depends on MMU > diff --git a/drivers/iommu/iommufd/Kconfig b/drivers/iommu/iommufd/Kconfig > index 1fa543204e89..99d4b075df49 100644 > --- a/drivers/iommu/iommufd/Kconfig > +++ b/drivers/iommu/iommufd/Kconfig > @@ -11,10 +11,6 @@ config IOMMUFD > > If you don't know what to do here, say N. > > -config IOMMUFD_DRIVER > - bool > - default n > - > if IOMMUFD > config IOMMUFD_VFIO_CONTAINER > bool "IOMMUFD provides the VFIO container /dev/vfio/vfio" > > (...) or in alternative, do similar to this patch except that it's: > > select IOMMUFD_DRIVER if IOMMU_SUPPORT > > In the mlx5/pds vfio drivers. If I understand it right, we have two providers (AMD and Intel iommu) and two consumers (mlx5 and pds) for this interface, so we probably don't want to use 'select' for both sides here. As with CONFIG_IOMMU_API, two two logical options are to either have a hidden symbol selected by the providers that the consumers depend on, or have a user-visible symbol and use 'depends on IOMMUFD_DRIVER' for both the providers and the consumers. Either way, I think the problem with the warning goes away. > Perhaps the merging of IOMMU_API with IOMMU_SUPPORT should > be best done separately? Right, that part should be improved as well, but it's not causing other problems at the moment. Arnd