Re: [PATCH] virtio: don't prompt CONFIG_VIRTIO_PCI_MODERN

From: Jason Wang
Date: Mon Feb 22 2021 - 04:12:20 EST



On 2021/2/22 3:29 下午, Michael S. Tsirkin wrote:
On Mon, Feb 22, 2021 at 11:42:44AM +0800, Jason Wang wrote:
On 2021/2/19 11:38 下午, Guenter Roeck wrote:
On 2/19/21 12:45 AM, Jason Wang wrote:
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

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





dependency.

Cc: Arnd Bergmann <arnd@xxxxxxxx>
Cc: Anders Roxell <anders.roxell@xxxxxxxxxx>
Cc: Guenter Roeck <linux@xxxxxxxxxxxx>
Reported-by: Naresh Kamboju <naresh.kamboju@xxxxxxxxxx>
Fixes: 86b87c9d858b6 ("virtio-pci: introduce modern device module")
Signed-off-by: Jason Wang <jasowang@xxxxxxxxxx>
Reviewed-by: Guenter Roeck <linux@xxxxxxxxxxxx>

---
drivers/virtio/Kconfig | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/virtio/Kconfig b/drivers/virtio/Kconfig
index 6b9b81f4b8c2..be7df369bc2b 100644
--- a/drivers/virtio/Kconfig
+++ b/drivers/virtio/Kconfig
@@ -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