Vincent Legoll
2017-Dec-09 15:26 UTC
[PATCH] virtio: make VIRTIO a menuconfig to ease disabling it all
No need to get into the submenu to disable all VIRTIO-related config entries. This makes it easier to disable all VIRTIO config options without entering the submenu. It will also enable one to see that en/dis-abled state from the outside menu. This is only intended to change menuconfig UI, not change the config dependencies. Signed-off-by: Vincent Legoll <vincent.legoll at gmail.com> --- drivers/virtio/Kconfig | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/virtio/Kconfig b/drivers/virtio/Kconfig index cff773f15b7e..d485a63a8233 100644 --- a/drivers/virtio/Kconfig +++ b/drivers/virtio/Kconfig @@ -5,7 +5,10 @@ config VIRTIO bus, such as CONFIG_VIRTIO_PCI, CONFIG_VIRTIO_MMIO, CONFIG_RPMSG or CONFIG_S390_GUEST. -menu "Virtio drivers" +menuconfig VIRTIO_MENU + bool "Virtio drivers" + +if VIRTIO_MENU config VIRTIO_PCI tristate "PCI driver for virtio devices" @@ -79,4 +82,4 @@ config VIRTIO_MMIO_CMDLINE_DEVICES If unsure, say 'N'. -endmenu +endif # VIRTIO_MENU -- 2.14.1
Andrei Vagin
2017-Dec-21 06:44 UTC
virtio: make VIRTIO a menuconfig to ease disabling it all
On Sat, Dec 09, 2017 at 04:26:57PM +0100, Vincent Legoll wrote:> No need to get into the submenu to disable all VIRTIO-related > config entries. > > This makes it easier to disable all VIRTIO config options > without entering the submenu. It will also enable one > to see that en/dis-abled state from the outside menu. > > This is only intended to change menuconfig UI, not change > the config dependencies. > > Signed-off-by: Vincent Legoll <vincent.legoll at gmail.com> > --- > drivers/virtio/Kconfig | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/drivers/virtio/Kconfig b/drivers/virtio/Kconfig > index cff773f15b7e..d485a63a8233 100644 > --- a/drivers/virtio/Kconfig > +++ b/drivers/virtio/Kconfig > @@ -5,7 +5,10 @@ config VIRTIO > bus, such as CONFIG_VIRTIO_PCI, CONFIG_VIRTIO_MMIO, CONFIG_RPMSG > or CONFIG_S390_GUEST. > > -menu "Virtio drivers" > +menuconfig VIRTIO_MENU > + bool "Virtio drivers"Hi Vincent, make localyesconfig and make localmodconfig doesn't work with this patch. My scenario looks like this: * Create a virtual machine with Ubuntu 14.04 in GCE * git clone git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git * cd linux-next * curl -o .config https://raw.githubusercontent.com/avagin/criu/linux-next/scripts/linux-next-config * make localyesconfig Without this patch: $ cat .config | grep VIRTIO CONFIG_BLK_MQ_VIRTIO=y CONFIG_VIRTIO_BLK=y # CONFIG_VIRTIO_BLK_SCSI is not set CONFIG_SCSI_VIRTIO=y CONFIG_VIRTIO_NET=y CONFIG_VIRTIO_CONSOLE=y # CONFIG_HW_RANDOM_VIRTIO is not set CONFIG_VIRTIO=y CONFIG_VIRTIO_PCI=y CONFIG_VIRTIO_PCI_LEGACY=y CONFIG_VIRTIO_BALLOON=y # CONFIG_VIRTIO_INPUT is not set CONFIG_VIRTIO_MMIO=y CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y # CONFIG_RPMSG_VIRTIO is not set # CONFIG_CRYPTO_DEV_VIRTIO is not set With this patch: $ cat .config | grep VIRTIO CONFIG_BLK_MQ_VIRTIO=y # CONFIG_VIRTIO_BLK is not set CONFIG_SCSI_VIRTIO=y # CONFIG_VIRTIO_NET is not set CONFIG_CAIF_VIRTIO=y # CONFIG_VIRTIO_CONSOLE is not set # CONFIG_HW_RANDOM_VIRTIO is not set CONFIG_VIRTIO=y # CONFIG_VIRTIO_MENU is not set # CONFIG_RPMSG_VIRTIO is not set # CONFIG_CRYPTO_DEV_VIRTIO is not set You can see that with this patch CONFIG_VIRTIO_BLK is not set. It is wrong, and the kernel with this config will not be able to boot. We can add "default y" to fix this problem. https://travis-ci.org/avagin/linux/jobs/313348334 https://travis-ci.org/avagin/linux/jobs/318491188 Thanks, Andrei> + > +if VIRTIO_MENU > > config VIRTIO_PCI > tristate "PCI driver for virtio devices" > @@ -79,4 +82,4 @@ config VIRTIO_MMIO_CMDLINE_DEVICES > > If unsure, say 'N'. > > -endmenu > +endif # VIRTIO_MENU
Michael Ellerman
2017-Dec-21 10:53 UTC
[PATCH] virtio: make VIRTIO a menuconfig to ease disabling it all
Vincent Legoll <vincent.legoll at gmail.com> writes:> No need to get into the submenu to disable all VIRTIO-related > config entries. > > This makes it easier to disable all VIRTIO config options > without entering the submenu. It will also enable one > to see that en/dis-abled state from the outside menu. > > This is only intended to change menuconfig UI, not change > the config dependencies. > > Signed-off-by: Vincent Legoll <vincent.legoll at gmail.com> > --- > drivers/virtio/Kconfig | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/drivers/virtio/Kconfig b/drivers/virtio/Kconfig > index cff773f15b7e..d485a63a8233 100644 > --- a/drivers/virtio/Kconfig > +++ b/drivers/virtio/Kconfig > @@ -5,7 +5,10 @@ config VIRTIO > bus, such as CONFIG_VIRTIO_PCI, CONFIG_VIRTIO_MMIO, CONFIG_RPMSG > or CONFIG_S390_GUEST. > > -menu "Virtio drivers" > +menuconfig VIRTIO_MENU > + bool "Virtio drivers" > + > +if VIRTIO_MENUThis breaks all existing .configs *and* defconfigs that use VIRTIO. Please don't do that. If you make it default y then everything will continue to work. cheers diff --git a/drivers/virtio/Kconfig b/drivers/virtio/Kconfig index d485a63a8233..35897649c24f 100644 --- a/drivers/virtio/Kconfig +++ b/drivers/virtio/Kconfig @@ -7,6 +7,7 @@ config VIRTIO menuconfig VIRTIO_MENU bool "Virtio drivers" + default y if VIRTIO_MENU
Vincent Legoll
2017-Dec-21 16:23 UTC
[PATCH] virtio: make VIRTIO a menuconfig to ease disabling it all
Hello, thanks for the help, and sorry for the poor patch, On Thu, Dec 21, 2017 at 11:53 AM, Michael Ellerman <mpe at ellerman.id.au> wrote:> This breaks all existing .configs *and* defconfigs that use VIRTIO. > > Please don't do that. > > If you make it default y then everything will continue to work.Do you want me to respin it with the added default ? Tchuss -- Vincent Legoll
Seemingly Similar Threads
- [PATCH] virtio: make VIRTIO a menuconfig to ease disabling it all
- [PATCH] virtio: make VIRTIO a menuconfig to ease disabling it all
- [PATCH] virtio: make VIRTIO a menuconfig to ease disabling it all
- [PATCH] virtio: make VIRTIO a menuconfig to ease disabling it all
- Ping Re: [PATCH] virtio: make VIRTIO a menuconfig to ease disabling it all