Message ID | 202301301655039458241@zte.com.cn |
---|---|
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 s9csp2080096wrn; Mon, 30 Jan 2023 01:09:38 -0800 (PST) X-Google-Smtp-Source: AMrXdXsELeR+2Q/M1kja4ZNBrQA3PIvwRCY/Ow+5mcb2I2dDqz9fJErhQUvmIcyDaJHNym5a+pTF X-Received: by 2002:a17:902:e891:b0:194:de51:9ad with SMTP id w17-20020a170902e89100b00194de5109admr45777622plg.22.1675069778503; Mon, 30 Jan 2023 01:09:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675069778; cv=none; d=google.com; s=arc-20160816; b=f9RGb+wloqyaGe6DWesZRWHL+goH18ipu7xvUHyJ2RG/LvBHW/Uj6udhBBrgr39CER vAi89N6/bKpoNjhdTW9oX6xQsn849Fj/GDSO4Kh5zIjMobDxUFTrCZCpNjkBPokYOLpO b4hMajcc90QsRjS0RQ+Gy7fiIONNobtmPeJUjMbw8tpYZ142PbYR1ZZsjoMz6Aj0Ol9C zWb1ln8Tbz5uhPXhopFkZe7Wm2Rw7BzK5m/1/A4Gm7l1YGMCQT5iWijzWt70fYYV+pJ0 FmfmC4qjs0CzT/XI+GXUfPEUvS/nVWf+B8qdLesUSCg/5+q7mHexGjxhSLRXPlMM0rLr 1ZEw== 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:mime-version:message-id:date; bh=xY0iV51nWmGn62PbPfyna2S70TRet+5soXp5rG6NDqs=; b=OSDoQIPgcQlBVQnjKiKV911uyVraKkvkik3eh0/IJctSkM1E9BteIj/wa6El5VNPlF jCvIvkvXVl5bOBGXod94RXtdtO8ZB/O29kbUyPBZG1F5DdaP66hwe7u7TTa0lwmKlCmD msZOV0j857EvfV9rZsOX5VblgD4R/4YKzRwLAn85wSI31P+MIuMMdrF0Vgqu1r+pDrYR zLdFwGyWZ/yGILJd4/sD2V3Gqqh5lvj3UKMQFNzbI4pdzNdcS8JB+xzeae96bB9RpxHn HVYuvOUv5pjWf1qJv6FOV3mIB8Y5u6LLJ0O8sKh0SkBPgw6QtWoI1kg1Dy5twjWchjU0 bG7Q== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q15-20020a170902dacf00b00192a69cd30dsi14091142plx.567.2023.01.30.01.09.22; Mon, 30 Jan 2023 01:09:38 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235958AbjA3IzV (ORCPT <rfc822;n2h9z4@gmail.com> + 99 others); Mon, 30 Jan 2023 03:55:21 -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 <rfc822;linux-kernel@vger.kernel.org>); 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 <linux-kernel@vger.kernel.org>; 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: <ye.xingchen@zte.com.cn> To: <jgg@ziepe.ca> Cc: <rostedt@goodmis.org>, <akrowiak@linux.ibm.com>, <alex.williamson@redhat.com>, <alex.gaynor@gmail.com>, <ojeda@kernel.org>, <mhiramat@kernel.org>, <linux-kernel@vger.kernel.org> Subject: =?utf-8?q?=5BPATCH=5D_samples=3A_fix_the_compile_error_about_SAMPLE?= =?utf-8?q?=5FVFIO=5FMDEV=5F_series?= Content-Type: text/plain; charset="UTF-8" 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/<ye.xingchen@zte.com.cn> X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 63D785F0.000/4P527h2Djcz6FK2X X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY 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?1756437968292724881?= X-GMAIL-MSGID: =?utf-8?q?1756437968292724881?= |
Series |
samples: fix the compile error about SAMPLE_VFIO_MDEV_ series
|
|
Commit Message
ye.xingchen@zte.com.cn
Jan. 30, 2023, 8:55 a.m. UTC
From: ye xingchen <ye.xingchen@zte.com.cn> When CONFIG_VFIO = m, SAMPLE_VFIO_MDEV_MTTY, SAMPLE_VFIO_MDEV_MTTY and SAMPLE_VFIO_MDEV_MBOCHS can be selected as: CONFIG_SAMPLE_VFIO_MDEV_MTTY = y; CONFIG_SAMPLE_VFIO_MDEV_MTTY = y; CONFIG_SAMPLE_VFIO_MDEV_MBOCHS = 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 = m. Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn> --- samples/Kconfig | 3 +++ 1 file changed, 3 insertions(+)
Comments
On Mon, 30 Jan 2023 16:55:03 +0800 (CST) <ye.xingchen@zte.com.cn> wrote: > From: ye xingchen <ye.xingchen@zte.com.cn> > > When CONFIG_VFIO = m, SAMPLE_VFIO_MDEV_MTTY, SAMPLE_VFIO_MDEV_MTTY and > SAMPLE_VFIO_MDEV_MBOCHS can be selected as: > CONFIG_SAMPLE_VFIO_MDEV_MTTY = y; > CONFIG_SAMPLE_VFIO_MDEV_MTTY = y; > CONFIG_SAMPLE_VFIO_MDEV_MBOCHS = 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 = m. > > Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn> > --- > samples/Kconfig | 3 +++ > 1 file changed, 3 insertions(+) Thanks for the fix! Another version[1] was sent last week that includes a more complete fix and has been merged into the vfio next branch. Thanks, Alex [1]https://lore.kernel.org/all/20230126211211.1762319-1-arnd@kernel.org/ > 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
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