Message ID | 20230126163719.3585002-1-arnd@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp367738wrn; Thu, 26 Jan 2023 08:38:53 -0800 (PST) X-Google-Smtp-Source: AMrXdXvMOf9MryHBVS8iQQ1OvoNTE9A/KgDGfJ3HkuHeDMNsqzSAHonJf5XewSIEcJ3uBffIkpHe X-Received: by 2002:a17:906:b009:b0:877:8ae7:2e44 with SMTP id v9-20020a170906b00900b008778ae72e44mr27440666ejy.5.1674751132939; Thu, 26 Jan 2023 08:38:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674751132; cv=none; d=google.com; s=arc-20160816; b=PQ+Ft7n853eL3+Wi+9OeWtCgmH0BBKZvXpWRLj0WduKF0LD0cRrjXgHqMqA9UZl0dj yrdOYSVb7Ck21Jv4GvfUhQZgDDW2yolfziUGhDgePwLIxj0DFtGZ5UREEJxXsVK6qhHK wNrX7lsW62wjZW2bXXi92wSZZnF33387F65asLNH1sfUApRdCQ0cCQp297DsvJICMivn 8XXUnGCTTYNQBsehBg2vmkb0ww3gVxX+Rl8pvxvMkmJh8hbRpGWl36YBSsVBNgXN4Cff XtDLWgvvD9eOu3hyvLekFGSLkl3xSOCehT17gNtq22UUWNlrsHWkv3/zZQvnkQZKcA/8 H70A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Mwr9OWjOQ9eK29s6m643uDd8Sd7ChXPqidEdOtONqaY=; b=eD8Zyb/akjHALS7bU9/3RDfzUN8z1aNudhiiTEzSKJ6713Fq65hVSfMsKRxwMH9DX0 L0CFFA+rdwfKZu48qpgyg027i3oGBj4n4qjoIFmhX+d5eYYBmtv2Yzrpl0J824rsfniz TynKYnoHr7Ue82AIXgTDodfyQRz6oGvk7lg79pl3NbFICpCNplJag2EBGCMvKOH3/6d1 wqSdNhX0SqxIVT5lH3lYsxupHmrP5ypDK810hcYvDT/9lDmJj7rDPVWMIgdxQGUwdMEa Jdc3EY2GFw06srS3l+oqF2dLbzVjPI6MeHBR2G3cnBqQCKlO88rY0VvaCrb+PCEj2+3D dCYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=a61HN6Pf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hw19-20020a170907a0d300b0087859e7b509si1553128ejc.664.2023.01.26.08.38.30; Thu, 26 Jan 2023 08:38:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=a61HN6Pf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231764AbjAZQhh (ORCPT <rfc822;lekhanya01809@gmail.com> + 99 others); Thu, 26 Jan 2023 11:37:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229533AbjAZQhe (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 26 Jan 2023 11:37:34 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C61D2582B5 for <linux-kernel@vger.kernel.org>; Thu, 26 Jan 2023 08:37:23 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5E7F6618CF for <linux-kernel@vger.kernel.org>; Thu, 26 Jan 2023 16:37:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B27F6C433D2; Thu, 26 Jan 2023 16:37:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674751042; bh=ryGPUF32nKHhyabeNtGfSAa4/G/lqURWY+WbhlGb5d4=; h=From:To:Cc:Subject:Date:From; b=a61HN6PfIq8jZ5UL1z9LnrQxD+UAyZesy8pbARYvfoRvKhEvXkNmw73mH4GZ+Gbzu kMhoTCgaYwFbrrVbBQ8ntHLbEW1UcnvipjIHH76OfLBHwDxcDd6Qf3xY3URYICuplx HfOuzanT95nZX2Kv3vBXguOsb+tEj9oN2uO+zSTN0YVqjCHWcMmPuiiv3Z8s57E6lQ CwbkWfxxSuqmvUG3j3TKHop3fXj2uFUgaBrNlOp7SQdM/Ed4Zeb4xUIoqq4XyxxvR+ KkgfO9SUgRP7Abf45QWf9UuyZwb0b2c2/V95adL15dw7Id7MVn5QiWMkt09dh3fTol zElob/Nx4NGYQ== From: Arnd Bergmann <arnd@kernel.org> To: Tony Krowiak <akrowiak@linux.ibm.com>, Alex Williamson <alex.williamson@redhat.com>, Jason Gunthorpe <jgg@ziepe.ca> Cc: Arnd Bergmann <arnd@arndb.de>, "Steven Rostedt (Google)" <rostedt@goodmis.org>, Finn Behrens <me@kloenk.de>, Miguel Ojeda <ojeda@kernel.org>, Masami Hiramatsu <mhiramat@kernel.org>, linux-kernel@vger.kernel.org Subject: [PATCH] vfio-mdev: add back CONFIG_VFIO dependency Date: Thu, 26 Jan 2023 17:37:06 +0100 Message-Id: <20230126163719.3585002-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756103843957212548?= X-GMAIL-MSGID: =?utf-8?q?1756103843957212548?= |
Series |
vfio-mdev: add back CONFIG_VFIO dependency
|
|
Commit Message
Arnd Bergmann
Jan. 26, 2023, 4:37 p.m. UTC
From: Arnd Bergmann <arnd@arndb.de> CONFIG_VFIO_MDEV cannot be selected when VFIO itself is disabled, otherwise we get a link failure: WARNING: unmet direct dependencies detected for VFIO_MDEV Depends on [n]: VFIO [=n] Selected by [y]: - SAMPLE_VFIO_MDEV_MTTY [=y] && SAMPLES [=y] - SAMPLE_VFIO_MDEV_MDPY [=y] && SAMPLES [=y] - SAMPLE_VFIO_MDEV_MBOCHS [=y] && SAMPLES [=y] /home/arnd/cross/arm64/gcc-13.0.1-nolibc/x86_64-linux/bin/x86_64-linux-ld: samples/vfio-mdev/mdpy.o: in function `mdpy_remove': mdpy.c:(.text+0x1e1): undefined reference to `vfio_unregister_group_dev' /home/arnd/cross/arm64/gcc-13.0.1-nolibc/x86_64-linux/bin/x86_64-linux-ld: samples/vfio-mdev/mdpy.o: in function `mdpy_probe': mdpy.c:(.text+0x149e): undefined reference to `_vfio_alloc_device' Fixes: 8bf8c5ee1f38 ("vfio-mdev: turn VFIO_MDEV into a selectable symbol") Signed-off-by: Arnd Bergmann <arnd@arndb.de> --- samples/Kconfig | 3 +++ 1 file changed, 3 insertions(+)
Comments
On Thu, 26 Jan 2023 17:37:06 +0100 Arnd Bergmann <arnd@kernel.org> wrote: > From: Arnd Bergmann <arnd@arndb.de> > > CONFIG_VFIO_MDEV cannot be selected when VFIO itself is > disabled, otherwise we get a link failure: > > WARNING: unmet direct dependencies detected for VFIO_MDEV > Depends on [n]: VFIO [=n] > Selected by [y]: > - SAMPLE_VFIO_MDEV_MTTY [=y] && SAMPLES [=y] > - SAMPLE_VFIO_MDEV_MDPY [=y] && SAMPLES [=y] > - SAMPLE_VFIO_MDEV_MBOCHS [=y] && SAMPLES [=y] > /home/arnd/cross/arm64/gcc-13.0.1-nolibc/x86_64-linux/bin/x86_64-linux-ld: samples/vfio-mdev/mdpy.o: in function `mdpy_remove': > mdpy.c:(.text+0x1e1): undefined reference to `vfio_unregister_group_dev' > /home/arnd/cross/arm64/gcc-13.0.1-nolibc/x86_64-linux/bin/x86_64-linux-ld: samples/vfio-mdev/mdpy.o: in function `mdpy_probe': > mdpy.c:(.text+0x149e): undefined reference to `_vfio_alloc_device' > > Fixes: 8bf8c5ee1f38 ("vfio-mdev: turn VFIO_MDEV into a selectable symbol") > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > --- > samples/Kconfig | 3 +++ > 1 file changed, 3 insertions(+) Seems like it wouldn't just be the sample drivers with this issue, don't VFIO_CCW, VFIO_AP, and DRM_I915_GVT_KVMGT all have this problem? Thanks, Alex > > diff --git a/samples/Kconfig b/samples/Kconfig > index 56b191d128d8..44a09dfa8a0b 100644 > --- a/samples/Kconfig > +++ b/samples/Kconfig > @@ -185,6 +185,7 @@ config SAMPLE_UHID > > config SAMPLE_VFIO_MDEV_MTTY > tristate "Build VFIO mtty example mediated device sample code" > + depends on VFIO > select VFIO_MDEV > help > Build a virtual tty sample driver for use as a VFIO > @@ -192,6 +193,7 @@ config SAMPLE_VFIO_MDEV_MTTY > > config SAMPLE_VFIO_MDEV_MDPY > tristate "Build VFIO mdpy example mediated device sample code" > + depends on VFIO > select VFIO_MDEV > help > Build a virtual display sample driver for use as a VFIO > @@ -209,6 +211,7 @@ config SAMPLE_VFIO_MDEV_MDPY_FB > > config SAMPLE_VFIO_MDEV_MBOCHS > tristate "Build VFIO mdpy example mediated device sample code" > + depends on VFIO > select VFIO_MDEV > select DMA_SHARED_BUFFER > help
On Thu, Jan 26, 2023 at 10:38:11AM -0700, Alex Williamson wrote: > Seems like it wouldn't just be the sample drivers with this issue, > don't VFIO_CCW, VFIO_AP, and DRM_I915_GVT_KVMGT all have this problem? > Thanks, Yes, they all need to depend on VFIO. Should I resend the series with that fixed?
On Thu, 26 Jan 2023 18:40:44 +0100 Christoph Hellwig <hch@lst.de> wrote: > On Thu, Jan 26, 2023 at 10:38:11AM -0700, Alex Williamson wrote: > > Seems like it wouldn't just be the sample drivers with this issue, > > don't VFIO_CCW, VFIO_AP, and DRM_I915_GVT_KVMGT all have this problem? > > Thanks, > > Yes, they all need to depend on VFIO. > > Should I resend the series with that fixed? The culprit is already in my next branch, we just need a fix that includes all the cases. A respin of Arnd's patch would be preferable to keep the fixes in one place. Thanks, Alex
On Thu, Jan 26, 2023 at 10:45:15AM -0700, Alex Williamson wrote: > The culprit is already in my next branch, we just need a fix that > includes all the cases. A respin of Arnd's patch would be preferable > to keep the fixes in one place. Thanks, Arnd, do you plan to resend the patch, or should I take care of it?
On Mon, Jan 30, 2023, at 08:33, Christoph Hellwig wrote: > On Thu, Jan 26, 2023 at 10:45:15AM -0700, Alex Williamson wrote: >> The culprit is already in my next branch, we just need a fix that >> includes all the cases. A respin of Arnd's patch would be preferable >> to keep the fixes in one place. Thanks, > > Arnd, do you plan to resend the patch, or should I take care of it? I sent the v2 last week, it looks like I forgot to add you to Cc there: https://lore.kernel.org/all/20230126211211.1762319-1-arnd@kernel.org/ Arnd
On Mon, Jan 30, 2023, at 14:34, Arnd Bergmann wrote: > On Mon, Jan 30, 2023, at 08:33, Christoph Hellwig wrote: >> On Thu, Jan 26, 2023 at 10:45:15AM -0700, Alex Williamson wrote: >>> The culprit is already in my next branch, we just need a fix that >>> includes all the cases. A respin of Arnd's patch would be preferable >>> to keep the fixes in one place. Thanks, >> >> Arnd, do you plan to resend the patch, or should I take care of it? > > I sent the v2 last week, it looks like I forgot to add you to Cc there: > > https://lore.kernel.org/all/20230126211211.1762319-1-arnd@kernel.org/ I just tried again and see that neither my own script nor the normal scripts/get_maintainer.pl picks up the hch@lst.de address from the Signed-off-by line in the "Fixes" commit, though it does pick up the addresses from Jason, Tony and Alex. I have no idea what is going on there. arnd
On Mon, Jan 30, 2023 at 02:39:36PM +0100, Arnd Bergmann wrote: > On Mon, Jan 30, 2023, at 14:34, Arnd Bergmann wrote: > > On Mon, Jan 30, 2023, at 08:33, Christoph Hellwig wrote: > >> On Thu, Jan 26, 2023 at 10:45:15AM -0700, Alex Williamson wrote: > >>> The culprit is already in my next branch, we just need a fix that > >>> includes all the cases. A respin of Arnd's patch would be preferable > >>> to keep the fixes in one place. Thanks, > >> > >> Arnd, do you plan to resend the patch, or should I take care of it? > > > > I sent the v2 last week, it looks like I forgot to add you to Cc there: > > > > https://lore.kernel.org/all/20230126211211.1762319-1-arnd@kernel.org/ > > I just tried again and see that neither my own script nor the > normal scripts/get_maintainer.pl picks up the hch@lst.de address > from the Signed-off-by line in the "Fixes" commit, though it does > pick up the addresses from Jason, Tony and Alex. I have no idea > what is going on there. Christoph is in .get_maintainer.ignore Jason
On Mon, 30 Jan 2023 14:34:54 +0100 "Arnd Bergmann" <arnd@arndb.de> wrote: > On Mon, Jan 30, 2023, at 08:33, Christoph Hellwig wrote: > > On Thu, Jan 26, 2023 at 10:45:15AM -0700, Alex Williamson wrote: > >> The culprit is already in my next branch, we just need a fix that > >> includes all the cases. A respin of Arnd's patch would be preferable > >> to keep the fixes in one place. Thanks, > > > > Arnd, do you plan to resend the patch, or should I take care of it? > > I sent the v2 last week, it looks like I forgot to add you to Cc there: > > https://lore.kernel.org/all/20230126211211.1762319-1-arnd@kernel.org/ Thanks for the v2, Arnd. Last call for any acks on the above, this is setting off too many build failures. Thanks, Alex
diff --git a/samples/Kconfig b/samples/Kconfig index 56b191d128d8..44a09dfa8a0b 100644 --- a/samples/Kconfig +++ b/samples/Kconfig @@ -185,6 +185,7 @@ config SAMPLE_UHID config SAMPLE_VFIO_MDEV_MTTY tristate "Build VFIO mtty example mediated device sample code" + depends on VFIO select VFIO_MDEV help Build a virtual tty sample driver for use as a VFIO @@ -192,6 +193,7 @@ config SAMPLE_VFIO_MDEV_MTTY config SAMPLE_VFIO_MDEV_MDPY tristate "Build VFIO mdpy example mediated device sample code" + depends on VFIO select VFIO_MDEV help Build a virtual display sample driver for use as a VFIO @@ -209,6 +211,7 @@ config SAMPLE_VFIO_MDEV_MDPY_FB config SAMPLE_VFIO_MDEV_MBOCHS tristate "Build VFIO mdpy example mediated device sample code" + depends on VFIO select VFIO_MDEV select DMA_SHARED_BUFFER help