mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
vfio/mdev: Remove CONFIG_VFIO_MDEV_DEVICE
For some reason the vfio_mdev shim mdev_driver has its own module and kconfig. As the next patch requires access to it from mdev.ko merge the two modules together and remove VFIO_MDEV_DEVICE. A later patch deletes this driver entirely. Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: Kirti Wankhede <kwankhede@nvidia.com> Link: https://lore.kernel.org/r/20210617142218.1877096-7-hch@lst.de Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
This commit is contained in:
committed by
Alex Williamson
parent
0d9f837c69
commit
af3ab3f9b9
@@ -514,7 +514,6 @@ These are the steps:
|
|||||||
* S390_AP_IOMMU
|
* S390_AP_IOMMU
|
||||||
* VFIO
|
* VFIO
|
||||||
* VFIO_MDEV
|
* VFIO_MDEV
|
||||||
* VFIO_MDEV_DEVICE
|
|
||||||
* KVM
|
* KVM
|
||||||
|
|
||||||
If using make menuconfig select the following to build the vfio_ap module::
|
If using make menuconfig select the following to build the vfio_ap module::
|
||||||
|
@@ -768,7 +768,7 @@ config VFIO_CCW
|
|||||||
config VFIO_AP
|
config VFIO_AP
|
||||||
def_tristate n
|
def_tristate n
|
||||||
prompt "VFIO support for AP devices"
|
prompt "VFIO support for AP devices"
|
||||||
depends on S390_AP_IOMMU && VFIO_MDEV_DEVICE && KVM
|
depends on S390_AP_IOMMU && VFIO_MDEV && KVM
|
||||||
depends on ZCRYPT
|
depends on ZCRYPT
|
||||||
help
|
help
|
||||||
This driver grants access to Adjunct Processor (AP) devices
|
This driver grants access to Adjunct Processor (AP) devices
|
||||||
|
@@ -124,7 +124,7 @@ config DRM_I915_GVT_KVMGT
|
|||||||
tristate "Enable KVM/VFIO support for Intel GVT-g"
|
tristate "Enable KVM/VFIO support for Intel GVT-g"
|
||||||
depends on DRM_I915_GVT
|
depends on DRM_I915_GVT
|
||||||
depends on KVM
|
depends on KVM
|
||||||
depends on VFIO_MDEV && VFIO_MDEV_DEVICE
|
depends on VFIO_MDEV
|
||||||
default n
|
default n
|
||||||
help
|
help
|
||||||
Choose this option if you want to enable KVMGT support for
|
Choose this option if you want to enable KVMGT support for
|
||||||
|
@@ -9,10 +9,3 @@ config VFIO_MDEV
|
|||||||
See Documentation/driver-api/vfio-mediated-device.rst for more details.
|
See Documentation/driver-api/vfio-mediated-device.rst for more details.
|
||||||
|
|
||||||
If you don't know what do here, say N.
|
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
|
|
||||||
default n
|
|
||||||
help
|
|
||||||
VFIO based driver for Mediated devices.
|
|
||||||
|
@@ -1,6 +1,5 @@
|
|||||||
# SPDX-License-Identifier: GPL-2.0-only
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
|
||||||
mdev-y := mdev_core.o mdev_sysfs.o mdev_driver.o
|
mdev-y := mdev_core.o mdev_sysfs.o mdev_driver.o vfio_mdev.o
|
||||||
|
|
||||||
obj-$(CONFIG_VFIO_MDEV) += mdev.o
|
obj-$(CONFIG_VFIO_MDEV) += mdev.o
|
||||||
obj-$(CONFIG_VFIO_MDEV_DEVICE) += vfio_mdev.o
|
|
||||||
|
@@ -360,11 +360,24 @@ int mdev_device_remove(struct mdev_device *mdev)
|
|||||||
|
|
||||||
static int __init mdev_init(void)
|
static int __init mdev_init(void)
|
||||||
{
|
{
|
||||||
return mdev_bus_register();
|
int rc;
|
||||||
|
|
||||||
|
rc = mdev_bus_register();
|
||||||
|
if (rc)
|
||||||
|
return rc;
|
||||||
|
rc = mdev_register_driver(&vfio_mdev_driver);
|
||||||
|
if (rc)
|
||||||
|
goto err_bus;
|
||||||
|
return 0;
|
||||||
|
err_bus:
|
||||||
|
mdev_bus_unregister();
|
||||||
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __exit mdev_exit(void)
|
static void __exit mdev_exit(void)
|
||||||
{
|
{
|
||||||
|
mdev_unregister_driver(&vfio_mdev_driver);
|
||||||
|
|
||||||
if (mdev_bus_compat_class)
|
if (mdev_bus_compat_class)
|
||||||
class_compat_unregister(mdev_bus_compat_class);
|
class_compat_unregister(mdev_bus_compat_class);
|
||||||
|
|
||||||
@@ -378,4 +391,3 @@ MODULE_VERSION(DRIVER_VERSION);
|
|||||||
MODULE_LICENSE("GPL v2");
|
MODULE_LICENSE("GPL v2");
|
||||||
MODULE_AUTHOR(DRIVER_AUTHOR);
|
MODULE_AUTHOR(DRIVER_AUTHOR);
|
||||||
MODULE_DESCRIPTION(DRIVER_DESC);
|
MODULE_DESCRIPTION(DRIVER_DESC);
|
||||||
MODULE_SOFTDEP("post: vfio_mdev");
|
|
||||||
|
@@ -37,6 +37,8 @@ struct mdev_type {
|
|||||||
#define to_mdev_type(_kobj) \
|
#define to_mdev_type(_kobj) \
|
||||||
container_of(_kobj, struct mdev_type, kobj)
|
container_of(_kobj, struct mdev_type, kobj)
|
||||||
|
|
||||||
|
extern struct mdev_driver vfio_mdev_driver;
|
||||||
|
|
||||||
int parent_create_sysfs_files(struct mdev_parent *parent);
|
int parent_create_sysfs_files(struct mdev_parent *parent);
|
||||||
void parent_remove_sysfs_files(struct mdev_parent *parent);
|
void parent_remove_sysfs_files(struct mdev_parent *parent);
|
||||||
|
|
||||||
|
@@ -17,10 +17,6 @@
|
|||||||
|
|
||||||
#include "mdev_private.h"
|
#include "mdev_private.h"
|
||||||
|
|
||||||
#define DRIVER_VERSION "0.1"
|
|
||||||
#define DRIVER_AUTHOR "NVIDIA Corporation"
|
|
||||||
#define DRIVER_DESC "VFIO based driver for Mediated device"
|
|
||||||
|
|
||||||
static int vfio_mdev_open(struct vfio_device *core_vdev)
|
static int vfio_mdev_open(struct vfio_device *core_vdev)
|
||||||
{
|
{
|
||||||
struct mdev_device *mdev = to_mdev_device(core_vdev->dev);
|
struct mdev_device *mdev = to_mdev_device(core_vdev->dev);
|
||||||
@@ -151,7 +147,7 @@ static void vfio_mdev_remove(struct mdev_device *mdev)
|
|||||||
kfree(vdev);
|
kfree(vdev);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct mdev_driver vfio_mdev_driver = {
|
struct mdev_driver vfio_mdev_driver = {
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "vfio_mdev",
|
.name = "vfio_mdev",
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
@@ -160,21 +156,3 @@ static struct mdev_driver vfio_mdev_driver = {
|
|||||||
.probe = vfio_mdev_probe,
|
.probe = vfio_mdev_probe,
|
||||||
.remove = vfio_mdev_remove,
|
.remove = vfio_mdev_remove,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init vfio_mdev_init(void)
|
|
||||||
{
|
|
||||||
return mdev_register_driver(&vfio_mdev_driver);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __exit vfio_mdev_exit(void)
|
|
||||||
{
|
|
||||||
mdev_unregister_driver(&vfio_mdev_driver);
|
|
||||||
}
|
|
||||||
|
|
||||||
module_init(vfio_mdev_init)
|
|
||||||
module_exit(vfio_mdev_exit)
|
|
||||||
|
|
||||||
MODULE_VERSION(DRIVER_VERSION);
|
|
||||||
MODULE_LICENSE("GPL v2");
|
|
||||||
MODULE_AUTHOR(DRIVER_AUTHOR);
|
|
||||||
MODULE_DESCRIPTION(DRIVER_DESC);
|
|
||||||
|
@@ -154,14 +154,14 @@ config SAMPLE_UHID
|
|||||||
|
|
||||||
config SAMPLE_VFIO_MDEV_MTTY
|
config SAMPLE_VFIO_MDEV_MTTY
|
||||||
tristate "Build VFIO mtty example mediated device sample code -- loadable modules only"
|
tristate "Build VFIO mtty example mediated device sample code -- loadable modules only"
|
||||||
depends on VFIO_MDEV_DEVICE && m
|
depends on VFIO_MDEV && m
|
||||||
help
|
help
|
||||||
Build a virtual tty sample driver for use as a VFIO
|
Build a virtual tty sample driver for use as a VFIO
|
||||||
mediated device
|
mediated device
|
||||||
|
|
||||||
config SAMPLE_VFIO_MDEV_MDPY
|
config SAMPLE_VFIO_MDEV_MDPY
|
||||||
tristate "Build VFIO mdpy example mediated device sample code -- loadable modules only"
|
tristate "Build VFIO mdpy example mediated device sample code -- loadable modules only"
|
||||||
depends on VFIO_MDEV_DEVICE && m
|
depends on VFIO_MDEV && m
|
||||||
help
|
help
|
||||||
Build a virtual display sample driver for use as a VFIO
|
Build a virtual display sample driver for use as a VFIO
|
||||||
mediated device. It is a simple framebuffer and supports
|
mediated device. It is a simple framebuffer and supports
|
||||||
@@ -178,7 +178,7 @@ config SAMPLE_VFIO_MDEV_MDPY_FB
|
|||||||
|
|
||||||
config SAMPLE_VFIO_MDEV_MBOCHS
|
config SAMPLE_VFIO_MDEV_MBOCHS
|
||||||
tristate "Build VFIO mdpy example mediated device sample code -- loadable modules only"
|
tristate "Build VFIO mdpy example mediated device sample code -- loadable modules only"
|
||||||
depends on VFIO_MDEV_DEVICE && m
|
depends on VFIO_MDEV && m
|
||||||
select DMA_SHARED_BUFFER
|
select DMA_SHARED_BUFFER
|
||||||
help
|
help
|
||||||
Build a virtual display sample driver for use as a VFIO
|
Build a virtual display sample driver for use as a VFIO
|
||||||
|
Reference in New Issue
Block a user