Skip to contentSkip to conversation

vfio-mdev: reinstate VFIO_MDEV Kconfig

PATCH In review Jon Kohler 2 participants 4 messages Sep 12, 2024 – Sep 16, 2024

Subsystems (3)
lore
Share & tools
lore

Jon Kohler

author
#0 lore raw

PATCH 1/1 vfio-mdev: reinstate VFIO_MDEV Kconfig

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")
Cc Alex Williamson <[email protected]>
Cc Christoph Hellwig <[email protected]>
Cc Jason Gunthorpe <[email protected]>
Cc Rohit Shenoy <[email protected]>
Cc Tarun Gupta <[email protected]>
Cc Tony Krowiak <[email protected]>
---
 drivers/vfio/mdev/Kconfig | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/vfio/mdev/Kconfig +7 -1
index e5fb84e07965..b5e1eb634e62 100644
@@ -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
Signature · 1 line
2.43.0
#1 lore raw
Quoted 2 lines · Jon Kohler

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.

author
#2 lore raw
Quoted 9 lines · Christoph Hellwig

!-------------------------------------------------------------------|
CAUTION: External Email

|-------------------------------------------------------------------!

Quoted 8 lines
Quoted 2 lines · Jon Kohler

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

#3 lore raw
Quoted 5 lines · Jon Kohler

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.