@@ -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 <alex.williamson@redhat.com>
M: Kirti Wankhede <kwankhede@nvidia.com>
+R: Cornelia Huck <cohuck@redhat.com>
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/
@@ -228,4 +228,6 @@ source "drivers/interconnect/Kconfig"
source "drivers/counter/Kconfig"
+source "drivers/mdev/Kconfig"
+
endmenu
@@ -186,3 +186,4 @@ obj-$(CONFIG_SIOX) += siox/
obj-$(CONFIG_GNSS) += gnss/
obj-$(CONFIG_INTERCONNECT) += interconnect/
obj-$(CONFIG_COUNTER) += counter/
+obj-$(CONFIG_MDEV) += mdev/
new file mode 100644
@@ -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.
new file mode 100644
@@ -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
similarity index 100%
rename from drivers/vfio/mdev/mdev_core.c
rename to drivers/mdev/mdev_core.c
similarity index 100%
rename from drivers/vfio/mdev/mdev_driver.c
rename to drivers/mdev/mdev_driver.c
similarity index 100%
rename from drivers/vfio/mdev/mdev_private.h
rename to drivers/mdev/mdev_private.h
similarity index 100%
rename from drivers/vfio/mdev/mdev_sysfs.c
rename to drivers/mdev/mdev_sysfs.c
similarity index 100%
rename from drivers/vfio/mdev/mdev_vfio.c
rename to drivers/mdev/vfio.c
@@ -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
@@ -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
@@ -15,8 +15,6 @@
#include <linux/vfio.h>
#include <linux/mdev_vfio.h>
-#include "mdev_private.h"
-
#define DRIVER_VERSION "0.1"
#define DRIVER_AUTHOR "NVIDIA Corporation"
#define DRIVER_DESC "VFIO based driver for Mediated device"
Mdev now is nothing VFIO specific, let's move it to upper directory. Signed-off-by: Jason Wang <jasowang@redhat.com> --- 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%)