diff mbox series

vfio-mdev: reinstate VFIO_MDEV Kconfig

Message ID 20240912141956.237734-1-jon@nutanix.com (mailing list archive)
State New
Headers show
Series vfio-mdev: reinstate VFIO_MDEV Kconfig | expand

Commit Message

Jon Kohler Sept. 12, 2024, 2:19 p.m. UTC
Reinstate Kconfig setup for CONFIG_VFIO_MDEV to help support out of
tree drivers that use VFIO_MDEV library (e.g. Nvidia GPU drivers).

Fixes: 8bf8c5ee1f38 ("vfio-mdev: turn VFIO_MDEV into a selectable symbol")
Signed-off-by: Jon Kohler <jon@nutanix.com>
Cc: Alex Williamson <alex.williamson@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Jason Gunthorpe <jgg@nvidia.com>
Cc: Rohit Shenoy <rshenoy@nvidia.com>
Cc: Tarun Gupta <targupta@nvidia.com>
Cc: Tony Krowiak <akrowiak@linux.ibm.com>
---
 drivers/vfio/mdev/Kconfig | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Comments

Christoph Hellwig Sept. 12, 2024, 2:05 p.m. UTC | #1
On Thu, Sep 12, 2024 at 07:19:55AM -0700, Jon Kohler wrote:
> Reinstate Kconfig setup for CONFIG_VFIO_MDEV to help support out of
> tree drivers that use VFIO_MDEV library (e.g. Nvidia GPU drivers).

NAK.  This is an internal symbol and the kernel could not care less
about out of tree driver.  Get the drivers upstream if you care
aboyut them.
Jon Kohler Sept. 12, 2024, 3:32 p.m. UTC | #2
> On Sep 12, 2024, at 10:05 AM, Christoph Hellwig <hch@lst.de> wrote:
> 
> !-------------------------------------------------------------------|
>  CAUTION: External Email
> 
> |-------------------------------------------------------------------!
> 
> On Thu, Sep 12, 2024 at 07:19:55AM -0700, Jon Kohler wrote:
>> Reinstate Kconfig setup for CONFIG_VFIO_MDEV to help support out of
>> tree drivers that use VFIO_MDEV library (e.g. Nvidia GPU drivers).
> 
> NAK.  This is an internal symbol and the kernel could not care less
> about out of tree driver.  Get the drivers upstream if you care
> aboyut them.
> 

Christoph - thanks for the swift reply, I appreciate it. To clarify slightly,
MDEV does have various exported symbols in MDEV, with both regular
EXPORT_SYMBOL and _GPL variant; however, there is just no way to 
consume them out of tree without this patch, unless there is also
incidentally another in-tree module that has select VFIO_MDEV set.

Also, the kernel does have precedence for making changes
to support out of tree modules, as recent as this 6.11 cycle, example:
e188e5d5ffd ("s390/setup: Fix __pa/__va for modules under non-GPL licenses”)

I don’t want to rock the boat, I’m just trying to make sure I approach this
conversation correctly. 

While I’m on the thought, for the sake of cleanup, should exported in
drivers/vfio be _GPL variant? There is a bit of a mix now.

Thanks again for the review, 
Jon
Christoph Hellwig Sept. 16, 2024, 7:20 a.m. UTC | #3
On Thu, Sep 12, 2024 at 03:32:52PM +0000, Jon Kohler wrote:
> Christoph - thanks for the swift reply, I appreciate it. To clarify slightly,
> MDEV does have various exported symbols in MDEV, with both regular
> EXPORT_SYMBOL and _GPL variant; however, there is just no way to 
> consume them out of tree without this patch, unless there is also
> incidentally another in-tree module that has select VFIO_MDEV set.

The point of kernel infrastructure is not to consume it out of tree.
Get your driver upstream and fully participate instead wasting your
time on this kind of stuff please.
diff mbox series

Patch

diff --git a/drivers/vfio/mdev/Kconfig b/drivers/vfio/mdev/Kconfig
index e5fb84e07965..b5e1eb634e62 100644
--- a/drivers/vfio/mdev/Kconfig
+++ b/drivers/vfio/mdev/Kconfig
@@ -1,4 +1,10 @@ 
 # SPDX-License-Identifier: GPL-2.0-only
 
 config VFIO_MDEV
-	tristate
+	tristate "Mediated device driver framework"
+	default n
+	help
+	  Provides a framework to virtualize devices.
+	  See Documentation/driver-api/vfio-mediated-device.rst for more details.
+
+	  If you don't know what do here, say N.
\ No newline at end of file