From patchwork Mon Nov 18 10:59:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Wang X-Patchwork-Id: 11249473 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A6BBF913 for ; Mon, 18 Nov 2019 11:01:52 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8F6E320730 for ; Mon, 18 Nov 2019 11:01:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8F6E320730 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3F4CE6E459; Mon, 18 Nov 2019 11:01:51 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by gabe.freedesktop.org (Postfix) with ESMTPS id 347C06E45F for ; Mon, 18 Nov 2019 11:01:50 +0000 (UTC) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-221-0CX0BA62PbaIYGk8xNVI1g-1; Mon, 18 Nov 2019 06:01:47 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CD906DC2C; Mon, 18 Nov 2019 11:01:41 +0000 (UTC) Received: from jason-ThinkPad-X1-Carbon-6th.redhat.com (ovpn-12-65.pek2.redhat.com [10.72.12.65]) by smtp.corp.redhat.com (Postfix) with ESMTP id B8A2F60BE1; Mon, 18 Nov 2019 11:01:14 +0000 (UTC) From: Jason Wang To: kvm@vger.kernel.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, intel-gvt-dev@lists.freedesktop.org, kwankhede@nvidia.com, alex.williamson@redhat.com, mst@redhat.com, tiwei.bie@intel.com, gregkh@linuxfoundation.org, jgg@mellanox.com Subject: [PATCH V13 3/6] mdev: move to drivers/ Date: Mon, 18 Nov 2019 18:59:20 +0800 Message-Id: <20191118105923.7991-4-jasowang@redhat.com> In-Reply-To: <20191118105923.7991-1-jasowang@redhat.com> References: <20191118105923.7991-1-jasowang@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-MC-Unique: 0CX0BA62PbaIYGk8xNVI1g-1 X-Mimecast-Spam-Score: 0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574074909; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=X/3PwIk/sML4/M2qR5d3vYfe3Ix+bVOZ8xFjoa9yN+k=; b=Als8s8pDP0W0j/ffCtqenCo2SR2MN+hXMxpVD7dPKilb2MRVDpF2EfKgYobNFJ2O300dal 6QkF/L8wfdleyNsHLn9DP0kx+cOUsqyneBYMpfb6XeQ0eQ6HhPA+EXe8mMtiFo/F8EBjkf Pelma+LA5AeYYsY1uBJ9quYt9wNpq+Q= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: rdunlap@infradead.org, jakub.kicinski@netronome.com, christophe.de.dinechin@gmail.com, sebott@linux.ibm.com, airlied@linux.ie, Jason Wang , heiko.carstens@de.ibm.com, kevin.tian@intel.com, rob.miller@broadcom.com, hch@infradead.org, lulu@redhat.com, eperezma@redhat.com, pasic@linux.ibm.com, borntraeger@de.ibm.com, haotian.wang@sifive.com, jeffrey.t.kirsher@intel.com, zhi.a.wang@intel.com, farman@linux.ibm.com, parav@mellanox.com, gor@linux.ibm.com, cunming.liang@intel.com, rodrigo.vivi@intel.com, xiao.w.wang@intel.com, freude@linux.ibm.com, stefanha@redhat.com, zhihong.wang@intel.com, akrowiak@linux.ibm.com, jiri@mellanox.com, netdev@vger.kernel.org, cohuck@redhat.com, oberpar@linux.ibm.com, maxime.coquelin@redhat.com, aadam@redhat.com, lingshan.zhu@intel.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Mdev now is nothing VFIO specific, let's move it to upper directory. Signed-off-by: Jason Wang --- MAINTAINERS | 7 +++++-- drivers/Kconfig | 2 ++ drivers/Makefile | 1 + drivers/mdev/Kconfig | 19 ++++++++++++++++++ drivers/mdev/Makefile | 5 +++++ drivers/{vfio => }/mdev/mdev_core.c | 0 drivers/{vfio => }/mdev/mdev_driver.c | 0 drivers/{vfio => }/mdev/mdev_private.h | 0 drivers/{vfio => }/mdev/mdev_sysfs.c | 0 .../{vfio/mdev/mdev_vfio.c => mdev/vfio.c} | 0 drivers/vfio/mdev/Kconfig | 20 ------------------- drivers/vfio/mdev/Makefile | 4 ---- drivers/vfio/mdev/vfio_mdev.c | 2 -- 13 files changed, 32 insertions(+), 28 deletions(-) create mode 100644 drivers/mdev/Kconfig create mode 100644 drivers/mdev/Makefile rename drivers/{vfio => }/mdev/mdev_core.c (100%) rename drivers/{vfio => }/mdev/mdev_driver.c (100%) rename drivers/{vfio => }/mdev/mdev_private.h (100%) rename drivers/{vfio => }/mdev/mdev_sysfs.c (100%) rename drivers/{vfio/mdev/mdev_vfio.c => mdev/vfio.c} (100%) diff --git a/MAINTAINERS b/MAINTAINERS index 6d590afb62c3..5d7e8badf58c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -17129,15 +17129,18 @@ T: git git://github.com/awilliam/linux-vfio.git S: Maintained F: Documentation/driver-api/vfio.rst F: drivers/vfio/ +F: drivers/mdev/vfio.c F: include/linux/vfio.h F: include/uapi/linux/vfio.h -VFIO MEDIATED DEVICE DRIVERS +MEDIATED DEVICE DRIVERS +M: Alex Williamson M: Kirti Wankhede +R: Cornelia Huck L: kvm@vger.kernel.org S: Maintained F: Documentation/driver-api/vfio-mediated-device.rst -F: drivers/vfio/mdev/ +F: drivers/mdev F: include/linux/mdev.h F: include/linux/mdev_vfio.h F: samples/vfio-mdev/ diff --git a/drivers/Kconfig b/drivers/Kconfig index 8befa53f43be..3e2839048fe6 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig @@ -228,4 +228,6 @@ source "drivers/interconnect/Kconfig" source "drivers/counter/Kconfig" +source "drivers/mdev/Kconfig" + endmenu diff --git a/drivers/Makefile b/drivers/Makefile index aaef17cc6512..592e23f2e629 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -186,3 +186,4 @@ obj-$(CONFIG_SIOX) += siox/ obj-$(CONFIG_GNSS) += gnss/ obj-$(CONFIG_INTERCONNECT) += interconnect/ obj-$(CONFIG_COUNTER) += counter/ +obj-$(CONFIG_MDEV) += mdev/ diff --git a/drivers/mdev/Kconfig b/drivers/mdev/Kconfig new file mode 100644 index 000000000000..4561f2d4178f --- /dev/null +++ b/drivers/mdev/Kconfig @@ -0,0 +1,19 @@ + +config MDEV + tristate "Mediated device driver framework" + default n + help + Provides a framework to virtualize devices. + + If you don't know what do here, say N. + +config VFIO_MDEV + tristate "VFIO Mediated device driver" + depends on VFIO && MDEV + default n + help + Proivdes a mediated BUS for userspace driver through VFIO + framework. See Documentation/vfio-mediated-device.txt for + more details. + + If you don't know what do here, say N. diff --git a/drivers/mdev/Makefile b/drivers/mdev/Makefile new file mode 100644 index 000000000000..0b749e7f8ff4 --- /dev/null +++ b/drivers/mdev/Makefile @@ -0,0 +1,5 @@ + +mdev-y := mdev_core.o mdev_sysfs.o mdev_driver.o +mdev_vfio-y := vfio.o +obj-$(CONFIG_MDEV) += mdev.o +obj-$(CONFIG_VFIO_MDEV) += mdev_vfio.o diff --git a/drivers/vfio/mdev/mdev_core.c b/drivers/mdev/mdev_core.c similarity index 100% rename from drivers/vfio/mdev/mdev_core.c rename to drivers/mdev/mdev_core.c diff --git a/drivers/vfio/mdev/mdev_driver.c b/drivers/mdev/mdev_driver.c similarity index 100% rename from drivers/vfio/mdev/mdev_driver.c rename to drivers/mdev/mdev_driver.c diff --git a/drivers/vfio/mdev/mdev_private.h b/drivers/mdev/mdev_private.h similarity index 100% rename from drivers/vfio/mdev/mdev_private.h rename to drivers/mdev/mdev_private.h diff --git a/drivers/vfio/mdev/mdev_sysfs.c b/drivers/mdev/mdev_sysfs.c similarity index 100% rename from drivers/vfio/mdev/mdev_sysfs.c rename to drivers/mdev/mdev_sysfs.c diff --git a/drivers/vfio/mdev/mdev_vfio.c b/drivers/mdev/vfio.c similarity index 100% rename from drivers/vfio/mdev/mdev_vfio.c rename to drivers/mdev/vfio.c diff --git a/drivers/vfio/mdev/Kconfig b/drivers/vfio/mdev/Kconfig index 2e07ca915a96..9a9234c3e00e 100644 --- a/drivers/vfio/mdev/Kconfig +++ b/drivers/vfio/mdev/Kconfig @@ -1,24 +1,4 @@ -config MDEV - tristate "Mediated device driver framework" - default n - help - Provides a framework to virtualize devices. - - If you don't know what do here, say N. - -config VFIO_MDEV - tristate "VFIO Mediated device driver" - depends on VFIO && MDEV - default n - help - Proivdes a mediated BUS for userspace driver through VFIO - framework. See Documentation/vfio-mediated-device.txt for - more details. - - If you don't know what do here, say N. - - config VFIO_MDEV_DEVICE tristate "VFIO driver for Mediated devices" depends on VFIO && VFIO_MDEV diff --git a/drivers/vfio/mdev/Makefile b/drivers/vfio/mdev/Makefile index e9675501271a..e2a92df3089e 100644 --- a/drivers/vfio/mdev/Makefile +++ b/drivers/vfio/mdev/Makefile @@ -1,6 +1,2 @@ -mdev-y := mdev_core.o mdev_sysfs.o mdev_driver.o - -obj-$(CONFIG_MDEV) += mdev.o -obj-$(CONFIG_VFIO_MDEV) += mdev_vfio.o obj-$(CONFIG_VFIO_MDEV_DEVICE) += vfio_mdev.o diff --git a/drivers/vfio/mdev/vfio_mdev.c b/drivers/vfio/mdev/vfio_mdev.c index 8b42a4b3f161..4eada31e9287 100644 --- a/drivers/vfio/mdev/vfio_mdev.c +++ b/drivers/vfio/mdev/vfio_mdev.c @@ -15,8 +15,6 @@ #include #include -#include "mdev_private.h" - #define DRIVER_VERSION "0.1" #define DRIVER_AUTHOR "NVIDIA Corporation" #define DRIVER_DESC "VFIO based driver for Mediated device"