From nobody Sat Sep 13 22:07:48 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 00D9CC54EED for ; Mon, 30 Jan 2023 08:55:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229675AbjA3IzW (ORCPT ); Mon, 30 Jan 2023 03:55:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235950AbjA3IzT (ORCPT ); Mon, 30 Jan 2023 03:55:19 -0500 Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [63.216.63.35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F36325E02 for ; Mon, 30 Jan 2023 00:55:14 -0800 (PST) Received: from mse-fl2.zte.com.cn (unknown [10.5.228.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mxhk.zte.com.cn (FangMail) with ESMTPS id 4P527h2Djcz6FK2X; Mon, 30 Jan 2023 16:55:12 +0800 (CST) Received: from xaxapp01.zte.com.cn ([10.88.99.176]) by mse-fl2.zte.com.cn with SMTP id 30U8t1hB099803; Mon, 30 Jan 2023 16:55:01 +0800 (+08) (envelope-from ye.xingchen@zte.com.cn) Received: from mapi (xaxapp01[null]) by mapi (Zmail) with MAPI id mid31; Mon, 30 Jan 2023 16:55:03 +0800 (CST) Date: Mon, 30 Jan 2023 16:55:03 +0800 (CST) X-Zmail-TransId: 2af963d785e7fffffffff2d81aec X-Mailer: Zmail v1.0 Message-ID: <202301301655039458241@zte.com.cn> Mime-Version: 1.0 From: To: Cc: , , , , , , Subject: =?UTF-8?B?W1BBVENIXSBzYW1wbGVzOiBmaXggdGhlIGNvbXBpbGUgZXJyb3IgYWJvdXQgU0FNUExFX1ZGSU9fTURFVl8gc2VyaWVz?= X-MAIL: mse-fl2.zte.com.cn 30U8t1hB099803 X-Fangmail-Gw-Spam-Type: 0 X-FangMail-Miltered: at cgslv5.04-192.168.250.138.novalocal with ID 63D785F0.000 by FangMail milter! X-FangMail-Envelope: 1675068912/4P527h2Djcz6FK2X/63D785F0.000/10.5.228.133/[10.5.228.133]/mse-fl2.zte.com.cn/ X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 63D785F0.000/4P527h2Djcz6FK2X Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: ye xingchen When CONFIG_VFIO =3D m, SAMPLE_VFIO_MDEV_MTTY, SAMPLE_VFIO_MDEV_MTTY and SAMPLE_VFIO_MDEV_MBOCHS can be selected as: CONFIG_SAMPLE_VFIO_MDEV_MTTY =3D y; CONFIG_SAMPLE_VFIO_MDEV_MTTY =3D y; CONFIG_SAMPLE_VFIO_MDEV_MBOCHS =3D y; That will cause compile error such as: ld: samples/vfio-mdev/mdpy.o: in function 'mdpy_remove': samples/vfio-mdev/mdpy.c:294: undefined reference to 'vfio_unregister_group_dev' ld: samples/vfio-mdev/mtty.o: in function 'mtty_remove': samples/vfio-mdev/mtty.c:793: undefined reference to 'vfio_unregister_group_dev' ld: samples/vfio-mdev/mbochs.o: in function 'mbochs_remove': samples/vfio-mdev/mbochs.c:603: undefined reference to 'vfio_unregister_group_dev' Add dependency make SAMPLE_VFIO_MDEV_MTTY, SAMPLE_VFIO_MDEV_MTTY and SAMPLE_VFIO_MDEV_MBOCHS not allowed to set as y when CONFIG_VFIO =3D m. Signed-off-by: ye xingchen --- samples/Kconfig | 3 +++ 1 file changed, 3 insertions(+) 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 --=20 2.25.1