* [PATCH 06/10] vfio/mdev: Remove CONFIG_VFIO_MDEV_DEVICE
2021-06-08 0:55 [PATCH 00/10] Allow mdev drivers to directly create the vfio_device Jason Gunthorpe
@ 2021-06-08 0:55 ` Jason Gunthorpe
2021-06-11 12:40 ` Cornelia Huck
0 siblings, 1 reply; 18+ messages in thread
From: Jason Gunthorpe @ 2021-06-08 0:55 UTC (permalink / raw)
To: David Airlie, Tony Krowiak, Alex Williamson,
Christian Borntraeger, Cornelia Huck, Jonathan Corbet,
Daniel Vetter, dri-devel, Vasily Gorbik, Heiko Carstens,
intel-gfx, Jani Nikula, Jason Herne, Joonas Lahtinen, kvm,
Kirti Wankhede, linux-doc, linux-s390, Halil Pasic, Rodrigo Vivi
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>
---
Documentation/s390/vfio-ap.rst | 1 -
arch/s390/Kconfig | 2 +-
drivers/gpu/drm/i915/Kconfig | 2 +-
drivers/vfio/mdev/Kconfig | 7 -------
drivers/vfio/mdev/Makefile | 3 +--
drivers/vfio/mdev/mdev_core.c | 16 ++++++++++++++--
drivers/vfio/mdev/mdev_private.h | 2 ++
drivers/vfio/mdev/vfio_mdev.c | 24 +-----------------------
samples/Kconfig | 6 +++---
9 files changed, 23 insertions(+), 40 deletions(-)
diff --git a/Documentation/s390/vfio-ap.rst b/Documentation/s390/vfio-ap.rst
index e15436599086b7..f57ae621f33e89 100644
--- a/Documentation/s390/vfio-ap.rst
+++ b/Documentation/s390/vfio-ap.rst
@@ -514,7 +514,6 @@ These are the steps:
* S390_AP_IOMMU
* VFIO
* VFIO_MDEV
- * VFIO_MDEV_DEVICE
* KVM
If using make menuconfig select the following to build the vfio_ap module::
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index b4c7c34069f81a..ea63fd22e1198a 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -768,7 +768,7 @@ config VFIO_CCW
config VFIO_AP
def_tristate n
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
help
This driver grants access to Adjunct Processor (AP) devices
diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig
index 69f57ca9c68d73..9ab1cecd69b2a0 100644
--- a/drivers/gpu/drm/i915/Kconfig
+++ b/drivers/gpu/drm/i915/Kconfig
@@ -126,7 +126,7 @@ config DRM_I915_GVT_KVMGT
tristate "Enable KVM/VFIO support for Intel GVT-g"
depends on DRM_I915_GVT
depends on KVM
- depends on VFIO_MDEV && VFIO_MDEV_DEVICE
+ depends on VFIO_MDEV
default n
help
Choose this option if you want to enable KVMGT support for
diff --git a/drivers/vfio/mdev/Kconfig b/drivers/vfio/mdev/Kconfig
index 5da27f2100f9bd..763c877a1318bc 100644
--- a/drivers/vfio/mdev/Kconfig
+++ b/drivers/vfio/mdev/Kconfig
@@ -9,10 +9,3 @@ config VFIO_MDEV
See Documentation/driver-api/vfio-mediated-device.rst 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
- default n
- help
- VFIO based driver for Mediated devices.
diff --git a/drivers/vfio/mdev/Makefile b/drivers/vfio/mdev/Makefile
index 101516fdf3753e..ff9ecd80212503 100644
--- a/drivers/vfio/mdev/Makefile
+++ b/drivers/vfio/mdev/Makefile
@@ -1,6 +1,5 @@
# 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_DEVICE) += vfio_mdev.o
diff --git a/drivers/vfio/mdev/mdev_core.c b/drivers/vfio/mdev/mdev_core.c
index 2a85d6fcb7ddd0..ff8c1a84516698 100644
--- a/drivers/vfio/mdev/mdev_core.c
+++ b/drivers/vfio/mdev/mdev_core.c
@@ -360,11 +360,24 @@ int mdev_device_remove(struct mdev_device *mdev)
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)
{
+ mdev_unregister_driver(&vfio_mdev_driver);
+
if (mdev_bus_compat_class)
class_compat_unregister(mdev_bus_compat_class);
@@ -378,4 +391,3 @@ MODULE_VERSION(DRIVER_VERSION);
MODULE_LICENSE("GPL v2");
MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);
-MODULE_SOFTDEP("post: vfio_mdev");
diff --git a/drivers/vfio/mdev/mdev_private.h b/drivers/vfio/mdev/mdev_private.h
index 6999c89db7b162..afbad7b0a14a17 100644
--- a/drivers/vfio/mdev/mdev_private.h
+++ b/drivers/vfio/mdev/mdev_private.h
@@ -37,6 +37,8 @@ struct mdev_type {
#define to_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);
void parent_remove_sysfs_files(struct mdev_parent *parent);
diff --git a/drivers/vfio/mdev/vfio_mdev.c b/drivers/vfio/mdev/vfio_mdev.c
index 922729071c5a8e..d5b4eede47c1a5 100644
--- a/drivers/vfio/mdev/vfio_mdev.c
+++ b/drivers/vfio/mdev/vfio_mdev.c
@@ -17,10 +17,6 @@
#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)
{
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);
}
-static struct mdev_driver vfio_mdev_driver = {
+struct mdev_driver vfio_mdev_driver = {
.driver = {
.name = "vfio_mdev",
.owner = THIS_MODULE,
@@ -160,21 +156,3 @@ static struct mdev_driver vfio_mdev_driver = {
.probe = vfio_mdev_probe,
.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);
diff --git a/samples/Kconfig b/samples/Kconfig
index b5a1a7aa7e23ab..b0503ef058d334 100644
--- a/samples/Kconfig
+++ b/samples/Kconfig
@@ -154,14 +154,14 @@ config SAMPLE_UHID
config SAMPLE_VFIO_MDEV_MTTY
tristate "Build VFIO mtty example mediated device sample code -- loadable modules only"
- depends on VFIO_MDEV_DEVICE && m
+ depends on VFIO_MDEV && m
help
Build a virtual tty sample driver for use as a VFIO
mediated device
config SAMPLE_VFIO_MDEV_MDPY
tristate "Build VFIO mdpy example mediated device sample code -- loadable modules only"
- depends on VFIO_MDEV_DEVICE && m
+ depends on VFIO_MDEV && m
help
Build a virtual display sample driver for use as a VFIO
mediated device. It is a simple framebuffer and supports
@@ -178,7 +178,7 @@ config SAMPLE_VFIO_MDEV_MDPY_FB
config SAMPLE_VFIO_MDEV_MBOCHS
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
help
Build a virtual display sample driver for use as a VFIO
--
2.31.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH 06/10] vfio/mdev: Remove CONFIG_VFIO_MDEV_DEVICE
2021-06-08 0:55 ` [PATCH 06/10] vfio/mdev: Remove CONFIG_VFIO_MDEV_DEVICE Jason Gunthorpe
@ 2021-06-11 12:40 ` Cornelia Huck
2021-06-14 12:35 ` Jason Gunthorpe
0 siblings, 1 reply; 18+ messages in thread
From: Cornelia Huck @ 2021-06-11 12:40 UTC (permalink / raw)
To: Jason Gunthorpe, David Airlie, Tony Krowiak, Alex Williamson,
Christian Borntraeger, Jonathan Corbet, Daniel Vetter, dri-devel,
Vasily Gorbik, Heiko Carstens, intel-gfx, Jani Nikula,
Jason Herne, Joonas Lahtinen, kvm, Kirti Wankhede, linux-doc,
linux-s390, Halil Pasic, Rodrigo Vivi
On Mon, Jun 07 2021, Jason Gunthorpe <jgg@nvidia.com> wrote:
> 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>
> ---
> Documentation/s390/vfio-ap.rst | 1 -
> arch/s390/Kconfig | 2 +-
> drivers/gpu/drm/i915/Kconfig | 2 +-
> drivers/vfio/mdev/Kconfig | 7 -------
> drivers/vfio/mdev/Makefile | 3 +--
> drivers/vfio/mdev/mdev_core.c | 16 ++++++++++++++--
> drivers/vfio/mdev/mdev_private.h | 2 ++
> drivers/vfio/mdev/vfio_mdev.c | 24 +-----------------------
> samples/Kconfig | 6 +++---
> 9 files changed, 23 insertions(+), 40 deletions(-)
I think you missed my earlier
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 06/10] vfio/mdev: Remove CONFIG_VFIO_MDEV_DEVICE
2021-06-11 12:40 ` Cornelia Huck
@ 2021-06-14 12:35 ` Jason Gunthorpe
0 siblings, 0 replies; 18+ messages in thread
From: Jason Gunthorpe @ 2021-06-14 12:35 UTC (permalink / raw)
To: Cornelia Huck, Christoph Hellwig
Cc: Tony Krowiak, Jason Herne, kvm, Vasily Gorbik, Jonathan Corbet,
David Airlie, linux-s390, Heiko Carstens, linux-doc,
Kirti Wankhede, dri-devel, Halil Pasic, Christian Borntraeger,
Alex Williamson, Rodrigo Vivi, intel-gfx
On Fri, Jun 11, 2021 at 02:40:41PM +0200, Cornelia Huck wrote:
> On Mon, Jun 07 2021, Jason Gunthorpe <jgg@nvidia.com> wrote:
>
> > 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>
> > Documentation/s390/vfio-ap.rst | 1 -
> > arch/s390/Kconfig | 2 +-
> > drivers/gpu/drm/i915/Kconfig | 2 +-
> > drivers/vfio/mdev/Kconfig | 7 -------
> > drivers/vfio/mdev/Makefile | 3 +--
> > drivers/vfio/mdev/mdev_core.c | 16 ++++++++++++++--
> > drivers/vfio/mdev/mdev_private.h | 2 ++
> > drivers/vfio/mdev/vfio_mdev.c | 24 +-----------------------
> > samples/Kconfig | 6 +++---
> > 9 files changed, 23 insertions(+), 40 deletions(-)
>
> I think you missed my earlier
>
> Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Yes, my mistake, I didn't think there were any tags in the v1 posting
Thanks,
Jason
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 02/10] driver core: Better distinguish probe errors in really_probe
[not found] ` <20210614150846.4111871-3-hch@lst.de>
@ 2021-06-14 18:47 ` Kirti Wankhede
2021-06-15 5:17 ` Greg Kroah-Hartman
1 sibling, 0 replies; 18+ messages in thread
From: Kirti Wankhede @ 2021-06-14 18:47 UTC (permalink / raw)
To: Christoph Hellwig, Greg Kroah-Hartman, Jason Gunthorpe,
Alex Williamson
Cc: Tony Krowiak, Jason Herne, kvm, Vasily Gorbik, Jonathan Corbet,
David Airlie, linux-s390, Heiko Carstens, Cornelia Huck,
linux-doc, dri-devel, Halil Pasic, Christian Borntraeger,
Rodrigo Vivi, Rafael J. Wysocki, intel-gfx
On 6/14/2021 8:38 PM, Christoph Hellwig wrote:
> really_probe tries to special case errors from ->probe, but due to all
> other initialization added to the function over time now a lot of
> internal errors hit that code path as well. Untangle that by adding
> a new probe_err local variable and apply the special casing only to
> that.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> drivers/base/dd.c | 72 +++++++++++++++++++++++++++--------------------
> 1 file changed, 41 insertions(+), 31 deletions(-)
>
> diff --git a/drivers/base/dd.c b/drivers/base/dd.c
> index 7477d3322b3a..999bc737a8f0 100644
> --- a/drivers/base/dd.c
> +++ b/drivers/base/dd.c
> @@ -513,12 +513,42 @@ static ssize_t state_synced_show(struct device *dev,
> }
> static DEVICE_ATTR_RO(state_synced);
>
> +
> +static int call_driver_probe(struct device *dev, struct device_driver *drv)
> +{
> + int ret = 0;
> +
> + if (dev->bus->probe)
> + ret = dev->bus->probe(dev);
> + else if (drv->probe)
> + ret = drv->probe(dev);
> +
> + switch (ret) {
> + case -EPROBE_DEFER:
> + /* Driver requested deferred probing */
> + dev_dbg(dev, "Driver %s requests probe deferral\n", drv->name);
> + break;
> + case -ENODEV:
> + case -ENXIO:
> + pr_debug("%s: probe of %s rejects match %d\n",
> + drv->name, dev_name(dev), ret);
> + break;
> + default:
> + /* driver matched but the probe failed */
> + pr_warn("%s: probe of %s failed with error %d\n",
> + drv->name, dev_name(dev), ret);
There should be case 0, that is, success case before default case as below:
+ case 0:
+ /* Driver returned success */
+ break;
Otherwise even in case of success, above warning would mislead that
probe has failed.
Thanks,
Kirti
> + break;
> + }
> +
> + return ret;
> +}
> +
> static int really_probe(struct device *dev, struct device_driver *drv)
> {
> - int ret = -EPROBE_DEFER;
> int local_trigger_count = atomic_read(&deferred_trigger_count);
> bool test_remove = IS_ENABLED(CONFIG_DEBUG_TEST_DRIVER_REMOVE) &&
> !drv->suppress_bind_attrs;
> + int ret = -EPROBE_DEFER, probe_ret = 0;
>
> if (defer_all_probes) {
> /*
> @@ -572,15 +602,15 @@ static int really_probe(struct device *dev, struct device_driver *drv)
> goto probe_failed;
> }
>
> - if (dev->bus->probe) {
> - ret = dev->bus->probe(dev);
> - if (ret)
> - goto probe_failed;
> - } else if (drv->probe) {
> - ret = drv->probe(dev);
> - if (ret)
> - goto probe_failed;
> - }
> + probe_ret = call_driver_probe(dev, drv);
> + if (probe_ret) {
> + /*
> + * Ignore errors returned by ->probe so that the next driver can
> + * try its luck.
> + */
> + ret = 0;
> + goto probe_failed;
> + }
>
> if (device_add_groups(dev, drv->dev_groups)) {
> dev_err(dev, "device_add_groups() failed\n");
> @@ -650,28 +680,8 @@ static int really_probe(struct device *dev, struct device_driver *drv)
> dev->pm_domain->dismiss(dev);
> pm_runtime_reinit(dev);
> dev_pm_set_driver_flags(dev, 0);
> -
> - switch (ret) {
> - case -EPROBE_DEFER:
> - /* Driver requested deferred probing */
> - dev_dbg(dev, "Driver %s requests probe deferral\n", drv->name);
> + if (probe_ret == -EPROBE_DEFER)
> driver_deferred_probe_add_trigger(dev, local_trigger_count);
> - break;
> - case -ENODEV:
> - case -ENXIO:
> - pr_debug("%s: probe of %s rejects match %d\n",
> - drv->name, dev_name(dev), ret);
> - break;
> - default:
> - /* driver matched but the probe failed */
> - pr_warn("%s: probe of %s failed with error %d\n",
> - drv->name, dev_name(dev), ret);
> - }
> - /*
> - * Ignore errors returned by ->probe so that the next driver can try
> - * its luck.
> - */
> - ret = 0;
> done:
> atomic_dec(&probe_count);
> wake_up_all(&probe_waitqueue);
>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 04/10] driver core: Don't return EPROBE_DEFER to userspace during sysfs bind
[not found] ` <20210614150846.4111871-5-hch@lst.de>
@ 2021-06-14 22:43 ` Jason Gunthorpe
0 siblings, 0 replies; 18+ messages in thread
From: Jason Gunthorpe @ 2021-06-14 22:43 UTC (permalink / raw)
To: Christoph Hellwig
Cc: kvm, linux-doc, David Airlie, dri-devel, Kirti Wankhede,
linux-s390, Jonathan Corbet, Rafael J. Wysocki, Halil Pasic,
Christian Borntraeger, intel-gfx, Jason Herne, Vasily Gorbik,
Heiko Carstens, Alex Williamson, Rodrigo Vivi, Tony Krowiak,
Greg Kroah-Hartman, Cornelia Huck
On Mon, Jun 14, 2021 at 05:08:40PM +0200, Christoph Hellwig wrote:
> @@ -679,8 +666,6 @@ static int really_probe(struct device *dev, struct device_driver *drv)
> dev->pm_domain->dismiss(dev);
> pm_runtime_reinit(dev);
> dev_pm_set_driver_flags(dev, 0);
> - if (probe_ret == -EPROBE_DEFER)
> - driver_deferred_probe_add_trigger(dev, local_trigger_count);
> done:
I like the new arrangement - however I'm looking at the ordering
relative to this:
> atomic_dec(&probe_count);
> wake_up_all(&probe_waitqueue);
And wondering if the idea is that driver_deferred_probe_add_trigger()
is supposed to be enclosed by the atomic, so that the
device_block_probing() / wait_for_device_probe() sequence is actually
a fence against queuing new work?
Which is suggesting that the other driver_deferred_probe_add_trigger()
at the top of really_probe is already ordered wrong?
Although, if that is the idea the wait_for_device_probe() doesn't look
entirely sequenced right..
It looks easy enough to fix by moving the probe_count up:
> +static int driver_probe_device(struct device_driver *drv, struct device *dev)
> +{
> + int trigger_count = atomic_read(&deferred_trigger_count);
> + int ret;
> +
> + ret = __driver_probe_device(drv, dev);
> + if (ret == -EPROBE_DEFER || ret == EPROBE_DEFER) {
> + driver_deferred_probe_add(dev);
> +
> + /*
> + * Did a trigger occur while probing? Need to re-trigger if yes
> + */
> + if (trigger_count != atomic_read(&deferred_trigger_count) &&
> + !defer_all_probes)
> + driver_deferred_probe_trigger();
> + }
into here?
I didn't see a reason why it couldn't enclose the pm stuff too..
Jason
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 01/10] driver core: Pull required checks into driver_probe_device()
[not found] ` <20210614150846.4111871-2-hch@lst.de>
@ 2021-06-15 5:16 ` Greg Kroah-Hartman
2021-06-15 10:27 ` Cornelia Huck
1 sibling, 0 replies; 18+ messages in thread
From: Greg Kroah-Hartman @ 2021-06-15 5:16 UTC (permalink / raw)
To: Christoph Hellwig
Cc: kvm, linux-doc, David Airlie, dri-devel, Kirti Wankhede,
linux-s390, Jonathan Corbet, Rafael J. Wysocki, Halil Pasic,
Christian Borntraeger, Jason Gunthorpe, intel-gfx, Jason Herne,
Vasily Gorbik, Heiko Carstens, Alex Williamson, Rodrigo Vivi,
Tony Krowiak, Cornelia Huck
On Mon, Jun 14, 2021 at 05:08:37PM +0200, Christoph Hellwig wrote:
> From: Jason Gunthorpe <jgg@nvidia.com>
>
> Checking if the dev is dead or if the dev is already bound is a required
> precondition to invoking driver_probe_device(). All the call chains
> leading here duplicate these checks.
>
> Add it directly to driver_probe_device() so the precondition is clear and
> remove the checks from device_driver_attach() and
> __driver_attach_async_helper().
>
> The other call chain going through __device_attach_driver() does have
> these same checks but they are inlined into logic higher up the call stack
> and can't be removed.
>
> The sysfs uAPI call chain starting at bind_store() is a bit confused
> because it reads dev->driver unlocked and returns -ENODEV if it is !NULL,
> otherwise it reads it again under lock and returns 0 if it is !NULL. Fix
> this to always return -EBUSY and always read dev->driver under its lock.
>
> Done in preparation for the next patches which will add additional
> callers to driver_probe_device() and will need these checks as well.
>
> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
> [hch: drop the extra checks in device_driver_attach and bind_store]
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 02/10] driver core: Better distinguish probe errors in really_probe
[not found] ` <20210614150846.4111871-3-hch@lst.de>
2021-06-14 18:47 ` [PATCH 02/10] driver core: Better distinguish probe errors in really_probe Kirti Wankhede
@ 2021-06-15 5:17 ` Greg Kroah-Hartman
1 sibling, 0 replies; 18+ messages in thread
From: Greg Kroah-Hartman @ 2021-06-15 5:17 UTC (permalink / raw)
To: Christoph Hellwig
Cc: kvm, linux-doc, David Airlie, dri-devel, Kirti Wankhede,
linux-s390, Jonathan Corbet, Rafael J. Wysocki, Halil Pasic,
Christian Borntraeger, Jason Gunthorpe, intel-gfx, Jason Herne,
Vasily Gorbik, Heiko Carstens, Alex Williamson, Rodrigo Vivi,
Tony Krowiak, Cornelia Huck
On Mon, Jun 14, 2021 at 05:08:38PM +0200, Christoph Hellwig wrote:
> really_probe tries to special case errors from ->probe, but due to all
> other initialization added to the function over time now a lot of
> internal errors hit that code path as well. Untangle that by adding
> a new probe_err local variable and apply the special casing only to
> that.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> drivers/base/dd.c | 72 +++++++++++++++++++++++++++--------------------
> 1 file changed, 41 insertions(+), 31 deletions(-)
>
> diff --git a/drivers/base/dd.c b/drivers/base/dd.c
> index 7477d3322b3a..999bc737a8f0 100644
> --- a/drivers/base/dd.c
> +++ b/drivers/base/dd.c
> @@ -513,12 +513,42 @@ static ssize_t state_synced_show(struct device *dev,
> }
> static DEVICE_ATTR_RO(state_synced);
>
> +
> +static int call_driver_probe(struct device *dev, struct device_driver *drv)
> +{
> + int ret = 0;
> +
> + if (dev->bus->probe)
> + ret = dev->bus->probe(dev);
> + else if (drv->probe)
> + ret = drv->probe(dev);
> +
> + switch (ret) {
> + case -EPROBE_DEFER:
> + /* Driver requested deferred probing */
> + dev_dbg(dev, "Driver %s requests probe deferral\n", drv->name);
> + break;
> + case -ENODEV:
> + case -ENXIO:
> + pr_debug("%s: probe of %s rejects match %d\n",
> + drv->name, dev_name(dev), ret);
> + break;
> + default:
> + /* driver matched but the probe failed */
> + pr_warn("%s: probe of %s failed with error %d\n",
> + drv->name, dev_name(dev), ret);
> + break;
> + }
Like Kirti said, 0 needs to be handled here. Did this not spew a lot of
warnings in the logs?
And we can fix up the pr_* calls to use dev_* in the future, shows the
evolution of this code...
thanks,
greg k-h
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 03/10] driver core: Flow the return code from ->probe() through to sysfs bind
[not found] ` <20210614150846.4111871-4-hch@lst.de>
@ 2021-06-15 5:18 ` Greg Kroah-Hartman
2021-06-15 10:31 ` Cornelia Huck
1 sibling, 0 replies; 18+ messages in thread
From: Greg Kroah-Hartman @ 2021-06-15 5:18 UTC (permalink / raw)
To: Christoph Hellwig
Cc: kvm, linux-doc, David Airlie, dri-devel, Kirti Wankhede,
linux-s390, Jonathan Corbet, Rafael J. Wysocki, Halil Pasic,
Christian Borntraeger, Jason Gunthorpe, intel-gfx, Jason Herne,
Vasily Gorbik, Heiko Carstens, Alex Williamson, Rodrigo Vivi,
Tony Krowiak, Cornelia Huck
On Mon, Jun 14, 2021 at 05:08:39PM +0200, Christoph Hellwig wrote:
> Currently really_probe() returns 1 on success and 0 if the probe() call
> fails. This return code arrangement is designed to be useful for
> __device_attach_driver() which is walking the device list and trying every
> driver. 0 means to keep trying.
>
> However, it is not useful for the other places that call through to
> really_probe() that do actually want to see the probe() return code.
>
> For instance bind_store() would be better to return the actual error code
> from the driver's probe method, not discarding it and returning -ENODEV.
>
> Reorganize things so that really_probe() returns the error code from
> ->probe as a (inverted) positive number, and 0 for successful attach.
>
> With this, __device_attach_driver can ignore the (positive) probe errors,
> return 1 to exit the loop for a successful binding and pass on the
> other negative errors, while device_driver_attach simplify inverts the
> positive errors and returns all errors to the sysfs code.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> drivers/base/bus.c | 6 +-----
> drivers/base/dd.c | 29 ++++++++++++++++++++---------
> 2 files changed, 21 insertions(+), 14 deletions(-)
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 05/10] driver core: Export device_driver_attach()
[not found] ` <20210614150846.4111871-6-hch@lst.de>
@ 2021-06-15 5:20 ` Greg Kroah-Hartman
2021-06-15 10:49 ` Cornelia Huck
1 sibling, 0 replies; 18+ messages in thread
From: Greg Kroah-Hartman @ 2021-06-15 5:20 UTC (permalink / raw)
To: Christoph Hellwig
Cc: kvm, linux-doc, David Airlie, dri-devel, Kirti Wankhede,
linux-s390, Jonathan Corbet, Rafael J. Wysocki, Halil Pasic,
Christian Borntraeger, Jason Gunthorpe, intel-gfx, Jason Herne,
Vasily Gorbik, Heiko Carstens, Alex Williamson, Rodrigo Vivi,
Tony Krowiak, Cornelia Huck
On Mon, Jun 14, 2021 at 05:08:41PM +0200, Christoph Hellwig wrote:
> From: Jason Gunthorpe <jgg@nvidia.com>
>
> This is intended as a replacement API for device_bind_driver(). It has at
> least the following benefits:
>
> - Internal locking. Few of the users of device_bind_driver() follow the
> locking rules
>
> - Calls device driver probe() internally. Notably this means that devm
> support for probe works correctly as probe() error will call
> devres_release_all()
>
> - struct device_driver -> dev_groups is supported
>
> - Simplified calling convention, no need to manually call probe().
>
> The general usage is for situations that already know what driver to bind
> and need to ensure the bind is synchronized with other logic. Call
> device_driver_attach() after device_add().
>
> If probe() returns a failure then this will be preserved up through to the
> error return of device_driver_attach().
>
> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Allow mdev drivers to directly create the vfio_device (v2 / alternative)
[not found] <20210614150846.4111871-1-hch@lst.de>
` (2 preceding siblings ...)
[not found] ` <20210614150846.4111871-6-hch@lst.de>
@ 2021-06-15 5:21 ` Greg Kroah-Hartman
[not found] ` <20210615055021.GB21080@lst.de>
[not found] ` <20210614150846.4111871-2-hch@lst.de>
` (3 subsequent siblings)
7 siblings, 1 reply; 18+ messages in thread
From: Greg Kroah-Hartman @ 2021-06-15 5:21 UTC (permalink / raw)
To: Christoph Hellwig
Cc: kvm, linux-doc, David Airlie, dri-devel, Kirti Wankhede,
linux-s390, Jonathan Corbet, Rafael J. Wysocki, Halil Pasic,
Christian Borntraeger, Jason Gunthorpe, intel-gfx, Jason Herne,
Vasily Gorbik, Heiko Carstens, Alex Williamson, Rodrigo Vivi,
Tony Krowiak, Cornelia Huck
On Mon, Jun 14, 2021 at 05:08:36PM +0200, Christoph Hellwig wrote:
> This is my alternative take on this series from Jason:
>
> https://lore.kernel.org/dri-devel/87czsszi9i.fsf@redhat.com/T/
>
> The mdev/vfio parts are exactly the same, but this solves the driver core
> changes for the direct probing without the in/out flag that Greg hated,
> which cause a little more work, but probably make the result better.
>
> Original decription from Jason below:
>
> The mdev bus's core part for managing the lifecycle of devices is mostly
> as one would expect for a driver core bus subsystem.
>
> However instead of having a normal 'struct device_driver' and binding the
> actual mdev drivers through the standard driver core mechanisms it open
> codes this with the struct mdev_parent_ops and provides a single driver
> that shims between the VFIO core's struct vfio_device and the actual
> device driver.
>
> Instead, allow mdev drivers implement an actual struct mdev_driver and
> directly call vfio_register_group_dev() in the probe() function for the
> mdev. Arrange to bind the created mdev_device to the mdev_driver that is
> provided by the end driver.
>
> The actual execution flow doesn't change much, eg what was
> parent_ops->create is now device_driver->probe and it is called at almost
> the exact same time - except under the normal control of the driver core.
>
> Ultimately converting all the drivers unlocks a fair number of additional
> VFIO simplifications and cleanups.
This looks much better as far as the driver core changes go, thank you
for doing this.
I'm guessing there will be at least one more revision of this. Do you
want this to go through my driver core tree or is there a mdev tree it
should go through? Either is fine for me.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 01/10] driver core: Pull required checks into driver_probe_device()
[not found] ` <20210614150846.4111871-2-hch@lst.de>
2021-06-15 5:16 ` [PATCH 01/10] driver core: Pull required checks into driver_probe_device() Greg Kroah-Hartman
@ 2021-06-15 10:27 ` Cornelia Huck
1 sibling, 0 replies; 18+ messages in thread
From: Cornelia Huck @ 2021-06-15 10:27 UTC (permalink / raw)
To: Christoph Hellwig, Greg Kroah-Hartman, Jason Gunthorpe,
Alex Williamson, Kirti Wankhede
Cc: Tony Krowiak, Jason Herne, kvm, Vasily Gorbik, Jonathan Corbet,
David Airlie, linux-s390, Heiko Carstens, linux-doc, dri-devel,
Halil Pasic, Christian Borntraeger, Rodrigo Vivi,
Rafael J. Wysocki, intel-gfx
On Mon, Jun 14 2021, Christoph Hellwig <hch@lst.de> wrote:
> From: Jason Gunthorpe <jgg@nvidia.com>
>
> Checking if the dev is dead or if the dev is already bound is a required
> precondition to invoking driver_probe_device(). All the call chains
> leading here duplicate these checks.
>
> Add it directly to driver_probe_device() so the precondition is clear and
> remove the checks from device_driver_attach() and
> __driver_attach_async_helper().
>
> The other call chain going through __device_attach_driver() does have
> these same checks but they are inlined into logic higher up the call stack
> and can't be removed.
>
> The sysfs uAPI call chain starting at bind_store() is a bit confused
> because it reads dev->driver unlocked and returns -ENODEV if it is !NULL,
> otherwise it reads it again under lock and returns 0 if it is !NULL. Fix
> this to always return -EBUSY and always read dev->driver under its lock.
>
> Done in preparation for the next patches which will add additional
> callers to driver_probe_device() and will need these checks as well.
>
> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
> [hch: drop the extra checks in device_driver_attach and bind_store]
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> drivers/base/bus.c | 2 +-
> drivers/base/dd.c | 32 ++++++++++----------------------
> 2 files changed, 11 insertions(+), 23 deletions(-)
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 03/10] driver core: Flow the return code from ->probe() through to sysfs bind
[not found] ` <20210614150846.4111871-4-hch@lst.de>
2021-06-15 5:18 ` [PATCH 03/10] driver core: Flow the return code from ->probe() through to sysfs bind Greg Kroah-Hartman
@ 2021-06-15 10:31 ` Cornelia Huck
1 sibling, 0 replies; 18+ messages in thread
From: Cornelia Huck @ 2021-06-15 10:31 UTC (permalink / raw)
To: Christoph Hellwig, Greg Kroah-Hartman, Jason Gunthorpe,
Alex Williamson, Kirti Wankhede
Cc: Tony Krowiak, Jason Herne, kvm, Vasily Gorbik, Jonathan Corbet,
David Airlie, linux-s390, Heiko Carstens, linux-doc, dri-devel,
Halil Pasic, Christian Borntraeger, Rodrigo Vivi,
Rafael J. Wysocki, intel-gfx
On Mon, Jun 14 2021, Christoph Hellwig <hch@lst.de> wrote:
> Currently really_probe() returns 1 on success and 0 if the probe() call
> fails. This return code arrangement is designed to be useful for
> __device_attach_driver() which is walking the device list and trying every
> driver. 0 means to keep trying.
>
> However, it is not useful for the other places that call through to
> really_probe() that do actually want to see the probe() return code.
>
> For instance bind_store() would be better to return the actual error code
> from the driver's probe method, not discarding it and returning -ENODEV.
>
> Reorganize things so that really_probe() returns the error code from
> ->probe as a (inverted) positive number, and 0 for successful attach.
>
> With this, __device_attach_driver can ignore the (positive) probe errors,
> return 1 to exit the loop for a successful binding and pass on the
> other negative errors, while device_driver_attach simplify inverts the
> positive errors and returns all errors to the sysfs code.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> drivers/base/bus.c | 6 +-----
> drivers/base/dd.c | 29 ++++++++++++++++++++---------
> 2 files changed, 21 insertions(+), 14 deletions(-)
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 05/10] driver core: Export device_driver_attach()
[not found] ` <20210614150846.4111871-6-hch@lst.de>
2021-06-15 5:20 ` [PATCH 05/10] driver core: Export device_driver_attach() Greg Kroah-Hartman
@ 2021-06-15 10:49 ` Cornelia Huck
1 sibling, 0 replies; 18+ messages in thread
From: Cornelia Huck @ 2021-06-15 10:49 UTC (permalink / raw)
To: Christoph Hellwig, Greg Kroah-Hartman, Jason Gunthorpe,
Alex Williamson, Kirti Wankhede
Cc: Tony Krowiak, Jason Herne, kvm, Vasily Gorbik, Jonathan Corbet,
David Airlie, linux-s390, Heiko Carstens, linux-doc, dri-devel,
Halil Pasic, Christian Borntraeger, Rodrigo Vivi,
Rafael J. Wysocki, intel-gfx
On Mon, Jun 14 2021, Christoph Hellwig <hch@lst.de> wrote:
> From: Jason Gunthorpe <jgg@nvidia.com>
>
> This is intended as a replacement API for device_bind_driver(). It has at
> least the following benefits:
>
> - Internal locking. Few of the users of device_bind_driver() follow the
> locking rules
>
> - Calls device driver probe() internally. Notably this means that devm
> support for probe works correctly as probe() error will call
> devres_release_all()
>
> - struct device_driver -> dev_groups is supported
>
> - Simplified calling convention, no need to manually call probe().
>
> The general usage is for situations that already know what driver to bind
> and need to ensure the bind is synchronized with other logic. Call
> device_driver_attach() after device_add().
>
> If probe() returns a failure then this will be preserved up through to the
> error return of device_driver_attach().
>
> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> drivers/base/base.h | 1 -
> drivers/base/dd.c | 3 +++
> include/linux/device.h | 2 ++
> 3 files changed, 5 insertions(+), 1 deletion(-)
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 06/10] vfio/mdev: Remove CONFIG_VFIO_MDEV_DEVICE
[not found] ` <20210614150846.4111871-7-hch@lst.de>
@ 2021-06-15 10:50 ` Cornelia Huck
0 siblings, 0 replies; 18+ messages in thread
From: Cornelia Huck @ 2021-06-15 10:50 UTC (permalink / raw)
To: Christoph Hellwig, Greg Kroah-Hartman, Jason Gunthorpe,
Alex Williamson, Kirti Wankhede
Cc: Tony Krowiak, Jason Herne, kvm, Vasily Gorbik, Jonathan Corbet,
David Airlie, linux-s390, Heiko Carstens, linux-doc, dri-devel,
Halil Pasic, Christian Borntraeger, Rodrigo Vivi,
Rafael J. Wysocki, intel-gfx
On Mon, Jun 14 2021, Christoph Hellwig <hch@lst.de> wrote:
> From: Jason Gunthorpe <jgg@nvidia.com>
>
> 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>
> ---
> Documentation/s390/vfio-ap.rst | 1 -
> arch/s390/Kconfig | 2 +-
> drivers/gpu/drm/i915/Kconfig | 2 +-
> drivers/vfio/mdev/Kconfig | 7 -------
> drivers/vfio/mdev/Makefile | 3 +--
> drivers/vfio/mdev/mdev_core.c | 16 ++++++++++++++--
> drivers/vfio/mdev/mdev_private.h | 2 ++
> drivers/vfio/mdev/vfio_mdev.c | 24 +-----------------------
> samples/Kconfig | 6 +++---
> 9 files changed, 23 insertions(+), 40 deletions(-)
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 07/10] vfio/mdev: Allow the mdev_parent_ops to specify the device driver to bind
[not found] ` <20210614150846.4111871-8-hch@lst.de>
@ 2021-06-15 10:54 ` Cornelia Huck
0 siblings, 0 replies; 18+ messages in thread
From: Cornelia Huck @ 2021-06-15 10:54 UTC (permalink / raw)
To: Christoph Hellwig, Greg Kroah-Hartman, Jason Gunthorpe,
Alex Williamson, Kirti Wankhede
Cc: Tony Krowiak, Jason Herne, kvm, Vasily Gorbik, Jonathan Corbet,
David Airlie, linux-s390, Heiko Carstens, linux-doc, dri-devel,
Halil Pasic, Christian Borntraeger, Rodrigo Vivi,
Rafael J. Wysocki, intel-gfx
On Mon, Jun 14 2021, Christoph Hellwig <hch@lst.de> wrote:
> From: Jason Gunthorpe <jgg@nvidia.com>
>
> This allows a mdev driver to opt out of using vfio_mdev.c, instead the
> driver will provide a 'struct mdev_driver' and register directly with the
> driver core.
>
> Much of mdev_parent_ops becomes unused in this mode:
> - create()/remove() are done via the mdev_driver probe()/remove()
> - mdev_attr_groups becomes mdev_driver driver.dev_groups
> - Wrapper function callbacks are replaced with the same ones from
> struct vfio_device_ops
>
> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> drivers/vfio/mdev/mdev_core.c | 30 ++++++++++++++++++++++--------
> drivers/vfio/mdev/mdev_driver.c | 10 ++++++++++
> include/linux/mdev.h | 2 ++
> 3 files changed, 34 insertions(+), 8 deletions(-)
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 06/10] vfio/mdev: Remove CONFIG_VFIO_MDEV_DEVICE
[not found] ` <20210615133519.754763-7-hch@lst.de>
@ 2021-06-15 14:10 ` Greg Kroah-Hartman
2021-06-16 20:20 ` Kirti Wankhede
1 sibling, 0 replies; 18+ messages in thread
From: Greg Kroah-Hartman @ 2021-06-15 14:10 UTC (permalink / raw)
To: Christoph Hellwig
Cc: kvm, linux-doc, David Airlie, dri-devel, Kirti Wankhede,
linux-s390, Jonathan Corbet, Rafael J. Wysocki, Halil Pasic,
Christian Borntraeger, Jason Gunthorpe, intel-gfx, Jason Herne,
Vasily Gorbik, Heiko Carstens, Alex Williamson, Rodrigo Vivi,
Tony Krowiak, Cornelia Huck
On Tue, Jun 15, 2021 at 03:35:15PM +0200, Christoph Hellwig wrote:
> From: Jason Gunthorpe <jgg@nvidia.com>
>
> 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>
> ---
> Documentation/s390/vfio-ap.rst | 1 -
> arch/s390/Kconfig | 2 +-
> drivers/gpu/drm/i915/Kconfig | 2 +-
> drivers/vfio/mdev/Kconfig | 7 -------
> drivers/vfio/mdev/Makefile | 3 +--
> drivers/vfio/mdev/mdev_core.c | 16 ++++++++++++++--
> drivers/vfio/mdev/mdev_private.h | 2 ++
> drivers/vfio/mdev/vfio_mdev.c | 24 +-----------------------
> samples/Kconfig | 6 +++---
> 9 files changed, 23 insertions(+), 40 deletions(-)
>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Allow mdev drivers to directly create the vfio_device (v2 / alternative)
[not found] ` <20210615055021.GB21080@lst.de>
@ 2021-06-15 15:27 ` Jason Gunthorpe
0 siblings, 0 replies; 18+ messages in thread
From: Jason Gunthorpe @ 2021-06-15 15:27 UTC (permalink / raw)
To: Christoph Hellwig
Cc: kvm, linux-doc, David Airlie, dri-devel, Kirti Wankhede,
linux-s390, Jonathan Corbet, Rafael J. Wysocki, Halil Pasic,
Christian Borntraeger, intel-gfx, Jason Herne, Vasily Gorbik,
Heiko Carstens, Alex Williamson, Rodrigo Vivi, Tony Krowiak,
Greg Kroah-Hartman, Cornelia Huck
On Tue, Jun 15, 2021 at 07:50:21AM +0200, Christoph Hellwig wrote:
> On Tue, Jun 15, 2021 at 07:21:57AM +0200, Greg Kroah-Hartman wrote:
> > This looks much better as far as the driver core changes go, thank you
> > for doing this.
> >
> > I'm guessing there will be at least one more revision of this.
>
> Yes.
>
> > Do you
> > want this to go through my driver core tree or is there a mdev tree it
> > should go through? Either is fine for me.
>
> Either way is fine with me. Alex, do you have a preference?
I would prefer to see it go to Alex's tree since there are more vfio
patches following this that might get to this merge window.
If you want the driver core part on a branch you can pull/etc I can
organize that.
Jason
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 06/10] vfio/mdev: Remove CONFIG_VFIO_MDEV_DEVICE
[not found] ` <20210615133519.754763-7-hch@lst.de>
2021-06-15 14:10 ` [PATCH 06/10] vfio/mdev: Remove CONFIG_VFIO_MDEV_DEVICE Greg Kroah-Hartman
@ 2021-06-16 20:20 ` Kirti Wankhede
1 sibling, 0 replies; 18+ messages in thread
From: Kirti Wankhede @ 2021-06-16 20:20 UTC (permalink / raw)
To: Christoph Hellwig, Greg Kroah-Hartman, Jason Gunthorpe,
Alex Williamson
Cc: Tony Krowiak, Jason Herne, kvm, Vasily Gorbik, Jonathan Corbet,
David Airlie, linux-s390, Heiko Carstens, Cornelia Huck,
linux-doc, dri-devel, Halil Pasic, Christian Borntraeger,
Rodrigo Vivi, Rafael J. Wysocki, intel-gfx
On 6/15/2021 7:05 PM, Christoph Hellwig wrote:
> From: Jason Gunthorpe <jgg@nvidia.com>
>
> 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: Kirti Wankhede <kwankhede@nvidia.com>
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2021-06-16 20:20 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20210614150846.4111871-1-hch@lst.de>
[not found] ` <20210614150846.4111871-3-hch@lst.de>
2021-06-14 18:47 ` [PATCH 02/10] driver core: Better distinguish probe errors in really_probe Kirti Wankhede
2021-06-15 5:17 ` Greg Kroah-Hartman
[not found] ` <20210614150846.4111871-5-hch@lst.de>
2021-06-14 22:43 ` [PATCH 04/10] driver core: Don't return EPROBE_DEFER to userspace during sysfs bind Jason Gunthorpe
[not found] ` <20210614150846.4111871-6-hch@lst.de>
2021-06-15 5:20 ` [PATCH 05/10] driver core: Export device_driver_attach() Greg Kroah-Hartman
2021-06-15 10:49 ` Cornelia Huck
2021-06-15 5:21 ` Allow mdev drivers to directly create the vfio_device (v2 / alternative) Greg Kroah-Hartman
[not found] ` <20210615055021.GB21080@lst.de>
2021-06-15 15:27 ` Jason Gunthorpe
[not found] ` <20210614150846.4111871-2-hch@lst.de>
2021-06-15 5:16 ` [PATCH 01/10] driver core: Pull required checks into driver_probe_device() Greg Kroah-Hartman
2021-06-15 10:27 ` Cornelia Huck
[not found] ` <20210614150846.4111871-4-hch@lst.de>
2021-06-15 5:18 ` [PATCH 03/10] driver core: Flow the return code from ->probe() through to sysfs bind Greg Kroah-Hartman
2021-06-15 10:31 ` Cornelia Huck
[not found] ` <20210614150846.4111871-7-hch@lst.de>
2021-06-15 10:50 ` [PATCH 06/10] vfio/mdev: Remove CONFIG_VFIO_MDEV_DEVICE Cornelia Huck
[not found] ` <20210614150846.4111871-8-hch@lst.de>
2021-06-15 10:54 ` [PATCH 07/10] vfio/mdev: Allow the mdev_parent_ops to specify the device driver to bind Cornelia Huck
[not found] <20210615133519.754763-1-hch@lst.de>
[not found] ` <20210615133519.754763-7-hch@lst.de>
2021-06-15 14:10 ` [PATCH 06/10] vfio/mdev: Remove CONFIG_VFIO_MDEV_DEVICE Greg Kroah-Hartman
2021-06-16 20:20 ` Kirti Wankhede
2021-06-08 0:55 [PATCH 00/10] Allow mdev drivers to directly create the vfio_device Jason Gunthorpe
2021-06-08 0:55 ` [PATCH 06/10] vfio/mdev: Remove CONFIG_VFIO_MDEV_DEVICE Jason Gunthorpe
2021-06-11 12:40 ` Cornelia Huck
2021-06-14 12:35 ` Jason Gunthorpe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox