Skip to contentSkip to conversation

virtio: don't prompt CONFIG_VIRTIO_PCI_MODERN

PATCH In review Jason Wang 5 participants 9 messages Feb 19, 2021 – Feb 22, 2021 virtio core

lore
Share & tools
lore

Jason Wang

author
#0 lore raw

PATCH 1/1 virtio: don't prompt CONFIG_VIRTIO_PCI_MODERN

We used to prompt CONFIG_VIRTIO_PCI_MODERN to user which may bring a lot of confusion. E.g it may break various default configs which want virtio devices.

So this patch fixes this by hide the prompot and document the dependency.

Cc Arnd Bergmann <[email protected]>
Cc Anders Roxell <[email protected]>
Cc Guenter Roeck <[email protected]>
Fixes 86b87c9d858b6 ("virtio-pci: introduce modern device module")
---
 drivers/virtio/Kconfig | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/virtio/Kconfig +5 -4
index 6b9b81f4b8c2..be7df369bc2b 100644
@@ -13,12 +13,12 @@ config ARCH_HAS_RESTRICTED_VIRTIO_MEMORY_ACCESS
 	  VIRTIO_F_ACCESS_PLATFORM
 
 config VIRTIO_PCI_MODERN
-	tristate "Modern Virtio PCI Device"
-	depends on PCI
+	tristate
 	help
 	  Modern PCI device implementation. This module implements the
 	  basic probe and control for devices which are based on modern
-	  PCI device with possible vendor specific extensions.
+	  PCI device with possible vendor specific extensions. Any
+	  module that selects this module must depend on PCI.
 
 menuconfig VIRTIO_MENU
 	bool "Virtio drivers"
@@ -28,7 +28,8 @@ if VIRTIO_MENU
 
 config VIRTIO_PCI
 	tristate "PCI driver for virtio devices"
-	depends on VIRTIO_PCI_MODERN
+	depends on PCI
+	select VIRTIO_PCI_MODERN
 	select VIRTIO
 	help
 	  This driver provides support for virtio based paravirtual device
Signature · 6 lines
2.18.1

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
#1 lore raw
Quoted 6 lines · Jason Wang

We used to prompt CONFIG_VIRTIO_PCI_MODERN to user which may bring a lot of confusion. E.g it may break various default configs which want virtio devices.

So this patch fixes this by hide the prompot and document the dependency.

Is there any good reason to keep the symbol at all?

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Acked-by on v1 1/1
#3 lore raw
In reply to Jason Wang
Quoted 8 lines · Jason Wang

We used to prompt CONFIG_VIRTIO_PCI_MODERN to user which may bring a lot of confusion. E.g it may break various default configs which want virtio devices.

So this patch fixes this by hide the prompot and document the dependency.

Quoted 6 lines
Cc Arnd Bergmann <[email protected]>
Cc Anders Roxell <[email protected]>
Cc Guenter Roeck <[email protected]>
Fixes 86b87c9d858b6 ("virtio-pci: introduce modern device module")

Note that this effectively makes VIRTIO_PCI_MODERN and VIRTIO_PCI synonyms, so git goes back to not being able to have VIRTIO_PCI_MODERN by itself, but it seems that this is ok because the legacy part was already split out.

Arnd

Reviewed-by on v1 1/1
#5 lore raw
In reply to Jason Wang
Quoted 5 lines · Jason Wang

We used to prompt CONFIG_VIRTIO_PCI_MODERN to user which may bring a lot of confusion. E.g it may break various default configs which want virtio devices.

So this patch fixes this by hide the prompot and document the

... by hiding the prompt and documenting ...

Quoted 8 lines

dependency.

Cc Arnd Bergmann <[email protected]>
Cc Anders Roxell <[email protected]>
Cc Guenter Roeck <[email protected]>
Fixes 86b87c9d858b6 ("virtio-pci: introduce modern device module")
Quoted 26 lines
---
 drivers/virtio/Kconfig | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/virtio/Kconfig +3 -3
index 6b9b81f4b8c2..be7df369bc2b 100644
@@ -13,12 +13,12 @@ config ARCH_HAS_RESTRICTED_VIRTIO_MEMORY_ACCESS
 	  VIRTIO_F_ACCESS_PLATFORM
 
 config VIRTIO_PCI_MODERN
-	tristate "Modern Virtio PCI Device"
-	depends on PCI
+	tristate
 	help
 	  Modern PCI device implementation. This module implements the
 	  basic probe and control for devices which are based on modern
-	  PCI device with possible vendor specific extensions.
+	  PCI device with possible vendor specific extensions. Any
+	  module that selects this module must depend on PCI.
 
 menuconfig VIRTIO_MENU
 	bool "Virtio drivers"

drivers/virtio/Kconfig if VIRTIO_MENU · line 35

Quoted 9 lines
drivers/virtio/Kconfig +2 -1
@@ -28,7 +28,8 @@ if VIRTIO_MENU
 
 config VIRTIO_PCI
 	tristate "PCI driver for virtio devices"
-	depends on VIRTIO_PCI_MODERN
+	depends on PCI
+	select VIRTIO_PCI_MODERN
 	select VIRTIO
 	help
 	  This driver provides support for virtio based paravirtual device

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

author
#2 lore raw
In reply to Christoph Hellwig
Quoted 9 lines · Christoph Hellwig
Quoted 6 lines · Jason Wang

We used to prompt CONFIG_VIRTIO_PCI_MODERN to user which may bring a lot of confusion. E.g it may break various default configs which want virtio devices.

So this patch fixes this by hide the prompot and document the dependency.

Is there any good reason to keep the symbol at all?

The plan is to convert IFCVF driver to use this module (select it).

Thanks

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

author
#4 lore raw
In reply to Arnd Bergmann
Quoted 14 lines · Arnd Bergmann
Quoted 7 lines · Jason Wang

We used to prompt CONFIG_VIRTIO_PCI_MODERN to user which may bring a lot of confusion. E.g it may break various default configs which want virtio devices.

So this patch fixes this by hide the prompot and document the dependency.

Quoted 6 lines
Cc Arnd Bergmann <[email protected]>
Cc Anders Roxell <[email protected]>
Cc Guenter Roeck <[email protected]>
Fixes 86b87c9d858b6 ("virtio-pci: introduce modern device module")
Quoted 6 lines

Note that this effectively makes VIRTIO_PCI_MODERN and VIRTIO_PCI synonyms, so git goes back to not being able to have VIRTIO_PCI_MODERN by itself, but it seems that this is ok because the legacy part was already split out.

There will be a vDPA driver that will select VIRTIO_PCI_MODERN_DEV. It used to belong to one large sereis, but it was not merged since it needs some rebase.

Thanks

Quoted 3 lines

Arnd

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

author
#6 lore raw
In reply to Guenter Roeck
Quoted 7 lines · Guenter Roeck
Quoted 5 lines · Jason Wang

We used to prompt CONFIG_VIRTIO_PCI_MODERN to user which may bring a lot of confusion. E.g it may break various default configs which want virtio devices.

So this patch fixes this by hide the prompot and document the

... by hiding the prompt and documenting ...

Hi Michael:

Would you like me to post a new version or you can fix those typos when applying the patch?

Thanks

Quoted 37 lines
Quoted 9 lines

dependency.

Cc Arnd Bergmann <[email protected]>
Cc Anders Roxell <[email protected]>
Cc Guenter Roeck <[email protected]>
Fixes 86b87c9d858b6 ("virtio-pci: introduce modern device module")
Quoted 26 lines
---
  drivers/virtio/Kconfig | 9 +++++----
  1 file changed, 5 insertions(+), 4 deletions(-)
drivers/virtio/Kconfig +3 -3
index 6b9b81f4b8c2..be7df369bc2b 100644
@@ -13,12 +13,12 @@ config ARCH_HAS_RESTRICTED_VIRTIO_MEMORY_ACCESS
  	  VIRTIO_F_ACCESS_PLATFORM
 
  config VIRTIO_PCI_MODERN
-	tristate "Modern Virtio PCI Device"
-	depends on PCI
+	tristate
  	help
  	  Modern PCI device implementation. This module implements the
  	  basic probe and control for devices which are based on modern
-	  PCI device with possible vendor specific extensions.
+	  PCI device with possible vendor specific extensions. Any
+	  module that selects this module must depend on PCI.
 
  menuconfig VIRTIO_MENU
  	bool "Virtio drivers"
@@ -28,7 +28,8 @@ if VIRTIO_MENU
 
Quoted 9 lines

drivers/virtio/Kconfig if VIRTIO_MENU · line 35

Quoted 9 lines
drivers/virtio/Kconfig +2 -1
  config VIRTIO_PCI
  	tristate "PCI driver for virtio devices"
-	depends on VIRTIO_PCI_MODERN
+	depends on PCI
+	select VIRTIO_PCI_MODERN
  	select VIRTIO
  	help
  	  This driver provides support for virtio based paravirtual device

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

#7 lore raw
Quoted 11 lines · Jason Wang
Quoted 7 lines · Guenter Roeck
Quoted 5 lines · Jason Wang

We used to prompt CONFIG_VIRTIO_PCI_MODERN to user which may bring a lot of confusion. E.g it may break various default configs which want virtio devices.

So this patch fixes this by hide the prompot and document the

... by hiding the prompt and documenting ...

Quoted 6 lines

Hi Michael:

Would you like me to post a new version or you can fix those typos when applying the patch?

Thanks

A new version. However I have a suggestion.

How about we call the new library VIRTIO_PCI_LIB? That would be a new auto-selected symbol.

We can then keep VIRTIO_PCI as a symbol enabling the actual driver.

Quoted 36 lines
Quoted 36 lines
Quoted 10 lines

dependency.

Cc Arnd Bergmann <[email protected]>
Cc Anders Roxell <[email protected]>
Cc Guenter Roeck <[email protected]>
Fixes 86b87c9d858b6 ("virtio-pci: introduce modern device module")
Quoted 24 lines
---
  drivers/virtio/Kconfig | 9 +++++----
  1 file changed, 5 insertions(+), 4 deletions(-)
drivers/virtio/Kconfig +3 -3
index 6b9b81f4b8c2..be7df369bc2b 100644
@@ -13,12 +13,12 @@ config ARCH_HAS_RESTRICTED_VIRTIO_MEMORY_ACCESS
  	  VIRTIO_F_ACCESS_PLATFORM
  config VIRTIO_PCI_MODERN
-	tristate "Modern Virtio PCI Device"
-	depends on PCI
+	tristate
  	help
  	  Modern PCI device implementation. This module implements the
  	  basic probe and control for devices which are based on modern
-	  PCI device with possible vendor specific extensions.
+	  PCI device with possible vendor specific extensions. Any
+	  module that selects this module must depend on PCI.
  menuconfig VIRTIO_MENU
  	bool "Virtio drivers"
@@ -28,7 +28,8 @@ if VIRTIO_MENU
  config VIRTIO_PCI
Quoted 8 lines
Quoted 8 lines

drivers/virtio/Kconfig if VIRTIO_MENU

Quoted 8 lines
drivers/virtio/Kconfig +2 -1
  	tristate "PCI driver for virtio devices"
-	depends on VIRTIO_PCI_MODERN
+	depends on PCI
+	select VIRTIO_PCI_MODERN
  	select VIRTIO
  	help
  	  This driver provides support for virtio based paravirtual device
 

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

author
#8 lore raw
Quoted 15 lines · Michael S. Tsirkin
Quoted 14 lines · Jason Wang
Quoted 7 lines · Guenter Roeck
Quoted 5 lines · Jason Wang

We used to prompt CONFIG_VIRTIO_PCI_MODERN to user which may bring a lot of confusion. E.g it may break various default configs which want virtio devices.

So this patch fixes this by hide the prompot and document the

... by hiding the prompt and documenting ...

Hi Michael:

Would you like me to post a new version or you can fix those typos when applying the patch?

Quoted 8 lines
Quoted 1 line

Thanks

A new version. However I have a suggestion.

How about we call the new library VIRTIO_PCI_LIB? That would be a new auto-selected symbol.

We can then keep VIRTIO_PCI as a symbol enabling the actual driver.

Ok, will do.

Thanks

Quoted 37 lines
Quoted 37 lines
Quoted 37 lines
Quoted 11 lines

dependency.

Cc Arnd Bergmann <[email protected]>
Cc Anders Roxell <[email protected]>
Cc Guenter Roeck <[email protected]>
Fixes 86b87c9d858b6 ("virtio-pci: introduce modern device module")
Quoted 24 lines
---
   drivers/virtio/Kconfig | 9 +++++----
   1 file changed, 5 insertions(+), 4 deletions(-)
drivers/virtio/Kconfig +3 -3
index 6b9b81f4b8c2..be7df369bc2b 100644
@@ -13,12 +13,12 @@ config ARCH_HAS_RESTRICTED_VIRTIO_MEMORY_ACCESS
   	  VIRTIO_F_ACCESS_PLATFORM
   config VIRTIO_PCI_MODERN
-	tristate "Modern Virtio PCI Device"
-	depends on PCI
+	tristate
   	help
   	  Modern PCI device implementation. This module implements the
   	  basic probe and control for devices which are based on modern
-	  PCI device with possible vendor specific extensions.
+	  PCI device with possible vendor specific extensions. Any
+	  module that selects this module must depend on PCI.
   menuconfig VIRTIO_MENU
   	bool "Virtio drivers"
@@ -28,7 +28,8 @@ if VIRTIO_MENU
   config VIRTIO_PCI
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

drivers/virtio/Kconfig if VIRTIO_MENU

Quoted 8 lines
drivers/virtio/Kconfig +2 -1
   	tristate "PCI driver for virtio devices"
-	depends on VIRTIO_PCI_MODERN
+	depends on PCI
+	select VIRTIO_PCI_MODERN
   	select VIRTIO
   	help
   	  This driver provides support for virtio based paravirtual device
 

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization