Skip to content

Commit

Permalink
virtio: expose for non-virtualization users too
Browse files Browse the repository at this point in the history
virtio has been so far used only in the context of virtualization,
and the virtio Kconfig was sourced directly by the relevant arch
Kconfigs when VIRTUALIZATION was selected.

Now that we start using virtio for inter-processor communications,
we need to source the virtio Kconfig outside of the virtualization
scope too.

Moreover, some architectures might use virtio for both virtualization
and inter-processor communications, so directly sourcing virtio
might yield unexpected results due to conflicting selections.

The simple solution offered by this patch is to always source virtio's
Kconfig in drivers/Kconfig, and remove it from the appropriate arch
Kconfigs. Additionally, a virtio menu entry has been added so virtio
drivers don't show up in the general drivers menu.

This way anyone can use virtio, though it's arguably less accessible
(and neat!) for virtualization users now.

Note: some architectures (mips and sh) seem to have a VIRTUALIZATION
menu merely for sourcing virtio's Kconfig, so that menu is removed too.

Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
  • Loading branch information
Ohad Ben-Cohen authored and Rusty Russell committed Jul 23, 2011
1 parent bbd9d6f commit e725421
Show file tree
Hide file tree
Showing 9 changed files with 5 additions and 37 deletions.
1 change: 0 additions & 1 deletion arch/ia64/kvm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,5 @@ config KVM_INTEL
extensions.

source drivers/vhost/Kconfig
source drivers/virtio/Kconfig

endif # VIRTUALIZATION
16 changes: 0 additions & 16 deletions arch/mips/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2493,20 +2493,4 @@ source "security/Kconfig"

source "crypto/Kconfig"

menuconfig VIRTUALIZATION
bool "Virtualization"
default n
---help---
Say Y here to get to see options for using your Linux host to run other
operating systems inside virtual machines (guests).
This option alone does not add any kernel code.

If you say N, all options in this submenu will be skipped and disabled.

if VIRTUALIZATION

source drivers/virtio/Kconfig

endif # VIRTUALIZATION

source "lib/Kconfig"
1 change: 0 additions & 1 deletion arch/powerpc/kvm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,5 @@ config KVM_E500
If unsure, say N.

source drivers/vhost/Kconfig
source drivers/virtio/Kconfig

endif # VIRTUALIZATION
1 change: 0 additions & 1 deletion arch/s390/kvm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,5 @@ config KVM
# OK, it's a little counter-intuitive to do this, but it puts it neatly under
# the virtualization menu.
source drivers/vhost/Kconfig
source drivers/virtio/Kconfig

endif # VIRTUALIZATION
16 changes: 0 additions & 16 deletions arch/sh/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -897,20 +897,4 @@ source "security/Kconfig"

source "crypto/Kconfig"

menuconfig VIRTUALIZATION
bool "Virtualization"
default n
---help---
Say Y here to get to see options for using your Linux host to run other
operating systems inside virtual machines (guests).
This option alone does not add any kernel code.

If you say N, all options in this submenu will be skipped and disabled.

if VIRTUALIZATION

source drivers/virtio/Kconfig

endif # VIRTUALIZATION

source "lib/Kconfig"
1 change: 0 additions & 1 deletion arch/tile/kvm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,5 @@ config KVM
If unsure, say N.

source drivers/vhost/Kconfig
source drivers/virtio/Kconfig

endif # VIRTUALIZATION
1 change: 0 additions & 1 deletion arch/x86/kvm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,5 @@ config KVM_MMU_AUDIT
# the virtualization menu.
source drivers/vhost/Kconfig
source drivers/lguest/Kconfig
source drivers/virtio/Kconfig

endif # VIRTUALIZATION
2 changes: 2 additions & 0 deletions drivers/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ source "drivers/uio/Kconfig"

source "drivers/vlynq/Kconfig"

source "drivers/virtio/Kconfig"

source "drivers/xen/Kconfig"

source "drivers/staging/Kconfig"
Expand Down
3 changes: 3 additions & 0 deletions drivers/virtio/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ config VIRTIO_RING
tristate
depends on VIRTIO

menu "Virtio drivers"

config VIRTIO_PCI
tristate "PCI driver for virtio devices (EXPERIMENTAL)"
depends on PCI && EXPERIMENTAL
Expand All @@ -33,3 +35,4 @@ config VIRTIO_BALLOON

If unsure, say M.

endmenu

0 comments on commit e725421

Please sign in to comment.