* [PATCH 1/2] x86 Kconfig: create x86/Kconfig.virt
@ 2014-01-14 0:11 Dave Hansen
2014-01-14 0:11 ` [PATCH 2/2] x86 Kconfig: move guest-side options under "Virtualization" Dave Hansen
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Dave Hansen @ 2014-01-14 0:11 UTC (permalink / raw)
To: linux-kernel
Cc: x86, Dave Hansen, bp, dtor, kys, haiyangz, agraf, gleb, pbonzini
From: Dave Hansen <dave.hansen@linux.intel.com>
Right now, there is a "Enable paravirtualization code" option in
the "Processor Features" menu, which means Xen. There is also a
group of host-side paravirtualization options specific to KVM
under the top-level "Virtualization" menu.
I think it makes a lot of sense to group the host and guest side
things together, especially since the top-level "Virtualization"
menu is so sparsely populated.
This creates a new hypervisor-independent arch/x86/Kconfig.virt
file, and moves the "Virtualization" menu to be defined in there.
Currently CONFIG_VIRTUALIZATION really means "host-side", so
create a new config option which matches the guest-side one, and
default its value to be what CONFIG_VIRTUALIZATION was set to.
This also removes the very counterintuitive references to
lguest/vhost code *from* kvm-specific code and removes the silly:
depends on HAVE_KVM || X86
dependency. It makes zero sense to have entries defined in
arch/x86 depend on x86.
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: Dmitry Torokhov <dtor@vmware.com>
Cc: K. Y. Srinivasan <kys@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Alexander Graf <agraf@suse.de>
Cc: Gleb Natapov <gleb@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
---
linux.git-davehans/arch/x86/Kconfig | 2 +-
linux.git-davehans/arch/x86/Kconfig.virt | 25 +++++++++++++++++++++++++
linux.git-davehans/arch/x86/kvm/Kconfig | 19 -------------------
3 files changed, 26 insertions(+), 20 deletions(-)
diff -puN arch/x86/Kconfig~x86-Kconfig-move-paravirt-under-virtualization arch/x86/Kconfig
--- linux.git/arch/x86/Kconfig~x86-Kconfig-move-paravirt-under-virtualization 2014-01-13 16:09:29.785875796 -0800
+++ linux.git-davehans/arch/x86/Kconfig 2014-01-13 16:09:29.793876157 -0800
@@ -2416,6 +2416,6 @@ source "security/Kconfig"
source "crypto/Kconfig"
-source "arch/x86/kvm/Kconfig"
+source "arch/x86/Kconfig.virt"
source "lib/Kconfig"
diff -puN /dev/null arch/x86/Kconfig.virt
--- /dev/null 2013-11-27 17:20:18.337162396 -0800
+++ linux.git-davehans/arch/x86/Kconfig.virt 2014-01-13 16:09:29.793876157 -0800
@@ -0,0 +1,25 @@
+
+menu "Virtualization"
+
+config VIRTUALIZATION
+ bool
+
+config HYPERVISOR_HOST
+ bool "Host-Side Features (Linux as the Hypervisor)"
+ default y if VIRTUALIZATION
+ ---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 HYPERVISOR_HOST
+
+source arch/x86/kvm/Kconfig
+source drivers/vhost/Kconfig
+source drivers/lguest/Kconfig
+
+endif # HYPERVISOR_HOST
+
+endmenu # "Virtualization"
diff -puN arch/x86/kvm/Kconfig~x86-Kconfig-move-paravirt-under-virtualization arch/x86/kvm/Kconfig
--- linux.git/arch/x86/kvm/Kconfig~x86-Kconfig-move-paravirt-under-virtualization 2014-01-13 16:09:29.787875886 -0800
+++ linux.git-davehans/arch/x86/kvm/Kconfig 2014-01-13 16:09:29.793876157 -0800
@@ -4,19 +4,6 @@
source "virt/kvm/Kconfig"
-menuconfig VIRTUALIZATION
- bool "Virtualization"
- depends on HAVE_KVM || X86
- default y
- ---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
-
config KVM
tristate "Kernel-based Virtual Machine (KVM) support"
depends on HAVE_KVM
@@ -93,9 +80,3 @@ config KVM_DEVICE_ASSIGNMENT
If unsure, say Y.
-# 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/lguest/Kconfig
-
-endif # VIRTUALIZATION
_
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2] x86 Kconfig: move guest-side options under "Virtualization"
2014-01-14 0:11 [PATCH 1/2] x86 Kconfig: create x86/Kconfig.virt Dave Hansen
@ 2014-01-14 0:11 ` Dave Hansen
2014-01-14 8:01 ` Paolo Bonzini
2014-01-14 8:01 ` [PATCH 1/2] x86 Kconfig: create x86/Kconfig.virt Paolo Bonzini
2018-09-15 13:31 ` Borislav Petkov
2 siblings, 1 reply; 5+ messages in thread
From: Dave Hansen @ 2014-01-14 0:11 UTC (permalink / raw)
To: linux-kernel
Cc: x86, Dave Hansen, bp, dtor, kys, haiyangz, agraf, gleb, pbonzini
We now have two groups of options in "Virtualization": one for
host-side support and a matching one for guest-side stuff. We do
not need separate submenus for this stuff since there are so few
options.
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: Dmitry Torokhov <dtor@vmware.com>
Cc: K. Y. Srinivasan <kys@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Alexander Graf <agraf@suse.de>
Cc: Gleb Natapov <gleb@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
---
linux.git-davehans/arch/x86/Kconfig | 83 ----------------------------
linux.git-davehans/arch/x86/Kconfig.virt | 85 +++++++++++++++++++++++++++++
linux.git-davehans/arch/x86/kvm/Kconfig | 2
linux.git-davehans/arch/x86/lguest/Kconfig | 1
4 files changed, 85 insertions(+), 86 deletions(-)
diff -puN arch/x86/Kconfig~x86-Kconfig-move-paravirt-under-virtualization-really arch/x86/Kconfig
--- linux.git/arch/x86/Kconfig~x86-Kconfig-move-paravirt-under-virtualization-really 2014-01-13 16:10:05.721497873 -0800
+++ linux.git-davehans/arch/x86/Kconfig 2014-01-13 16:10:05.758499543 -0800
@@ -1018,89 +1018,6 @@ config X86_ES7000
Support for Unisys ES7000 systems. Say 'Y' here if this kernel is
supposed to run on an IA32-based Unisys ES7000 system.
-menuconfig HYPERVISOR_GUEST
- bool "Linux guest support"
- ---help---
- Say Y here to enable options for running Linux under various hyper-
- visors. This option enables basic hypervisor detection and platform
- setup.
-
- If you say N, all options in this submenu will be skipped and
- disabled, and Linux guest support won't be built in.
-
-if HYPERVISOR_GUEST
-
-config PARAVIRT
- bool "Enable paravirtualization code"
- ---help---
- This changes the kernel so it can modify itself when it is run
- under a hypervisor, potentially improving performance significantly
- over full virtualization. However, when run without a hypervisor
- the kernel is theoretically slower and slightly larger.
-
-config PARAVIRT_DEBUG
- bool "paravirt-ops debugging"
- depends on PARAVIRT && DEBUG_KERNEL
- ---help---
- Enable to debug paravirt_ops internals. Specifically, BUG if
- a paravirt_op is missing when it is called.
-
-config PARAVIRT_SPINLOCKS
- bool "Paravirtualization layer for spinlocks"
- depends on PARAVIRT && SMP
- select UNINLINE_SPIN_UNLOCK
- ---help---
- Paravirtualized spinlocks allow a pvops backend to replace the
- spinlock implementation with something virtualization-friendly
- (for example, block the virtual CPU rather than spinning).
-
- It has a minimal impact on native kernels and gives a nice performance
- benefit on paravirtualized KVM / Xen kernels.
-
- If you are unsure how to answer this question, answer Y.
-
-source "arch/x86/xen/Kconfig"
-
-config KVM_GUEST
- bool "KVM Guest support (including kvmclock)"
- depends on PARAVIRT
- select PARAVIRT_CLOCK
- default y
- ---help---
- This option enables various optimizations for running under the KVM
- hypervisor. It includes a paravirtualized clock, so that instead
- of relying on a PIT (or probably other) emulation by the
- underlying device model, the host provides the guest with
- timing infrastructure such as time of day, and system time
-
-config KVM_DEBUG_FS
- bool "Enable debug information for KVM Guests in debugfs"
- depends on KVM_GUEST && DEBUG_FS
- default n
- ---help---
- This option enables collection of various statistics for KVM guest.
- Statistics are displayed in debugfs filesystem. Enabling this option
- may incur significant overhead.
-
-source "arch/x86/lguest/Kconfig"
-
-config PARAVIRT_TIME_ACCOUNTING
- bool "Paravirtual steal time accounting"
- depends on PARAVIRT
- default n
- ---help---
- Select this option to enable fine granularity task steal time
- accounting. Time spent executing other tasks in parallel with
- the current vCPU is discounted from the vCPU power. To account for
- that, there can be a small performance impact.
-
- If in doubt, say N here.
-
-config PARAVIRT_CLOCK
- bool
-
-endif #HYPERVISOR_GUEST
-
config NO_BOOTMEM
def_bool y
diff -puN arch/x86/Kconfig.virt~x86-Kconfig-move-paravirt-under-virtualization-really arch/x86/Kconfig.virt
--- linux.git/arch/x86/Kconfig.virt~x86-Kconfig-move-paravirt-under-virtualization-really 2014-01-13 16:10:05.722497918 -0800
+++ linux.git-davehans/arch/x86/Kconfig.virt 2014-01-13 16:10:35.730852434 -0800
@@ -1,3 +1,5 @@
+# No menu items in here, just common config variables:
+source "virt/kvm/Kconfig"
menu "Virtualization"
@@ -22,4 +24,87 @@ source drivers/lguest/Kconfig
endif # HYPERVISOR_HOST
+config HYPERVISOR_GUEST
+ bool "Guest-Side Features (Linux running under a Hypervisor)"
+ ---help---
+ Say Y here to enable options for running Linux under various hyper-
+ visors. This option enables basic hypervisor detection and platform
+ setup.
+
+ If you say N, all options in this submenu will be skipped and
+ disabled, and Linux guest support won't be built in.
+
+if HYPERVISOR_GUEST
+
+config PARAVIRT
+ bool "Enable paravirtualization code"
+ ---help---
+ This changes the kernel so it can modify itself when it is run
+ under a hypervisor, potentially improving performance significantly
+ over full virtualization. However, when run without a hypervisor
+ the kernel is theoretically slower and slightly larger.
+
+config PARAVIRT_DEBUG
+ bool "paravirt-ops debugging"
+ depends on PARAVIRT && DEBUG_KERNEL
+ ---help---
+ Enable to debug paravirt_ops internals. Specifically, BUG if
+ a paravirt_op is missing when it is called.
+
+config PARAVIRT_SPINLOCKS
+ bool "Paravirtualization layer for spinlocks"
+ depends on PARAVIRT && SMP
+ select UNINLINE_SPIN_UNLOCK
+ ---help---
+ Paravirtualized spinlocks allow a pvops backend to replace the
+ spinlock implementation with something virtualization-friendly
+ (for example, block the virtual CPU rather than spinning).
+
+ It has a minimal impact on native kernels and gives a nice performance
+ benefit on paravirtualized KVM / Xen kernels.
+
+ If you are unsure how to answer this question, answer Y.
+
+source "arch/x86/xen/Kconfig"
+
+config KVM_GUEST
+ bool "KVM Guest support (including kvmclock)"
+ depends on PARAVIRT
+ select PARAVIRT_CLOCK
+ default y
+ ---help---
+ This option enables various optimizations for running under the KVM
+ hypervisor. It includes a paravirtualized clock, so that instead
+ of relying on a PIT (or probably other) emulation by the
+ underlying device model, the host provides the guest with
+ timing infrastructure such as time of day, and system time
+
+config KVM_DEBUG_FS
+ bool "Enable debug information for KVM Guests in debugfs"
+ depends on KVM_GUEST && DEBUG_FS
+ default n
+ ---help---
+ This option enables collection of various statistics for KVM guest.
+ Statistics are displayed in debugfs filesystem. Enabling this option
+ may incur significant overhead.
+
+source "arch/x86/lguest/Kconfig"
+
+config PARAVIRT_TIME_ACCOUNTING
+ bool "Paravirtual steal time accounting"
+ depends on PARAVIRT
+ default n
+ ---help---
+ Select this option to enable fine granularity task steal time
+ accounting. Time spent executing other tasks in parallel with
+ the current vCPU is discounted from the vCPU power. To account for
+ that, there can be a small performance impact.
+
+ If in doubt, say N here.
+
+config PARAVIRT_CLOCK
+ bool
+
+endif # HYPERVISOR_GUEST
+
endmenu # "Virtualization"
diff -puN arch/x86/lguest/Kconfig~x86-Kconfig-move-paravirt-under-virtualization-really arch/x86/lguest/Kconfig
--- linux.git/arch/x86/lguest/Kconfig~x86-Kconfig-move-paravirt-under-virtualization-really 2014-01-13 16:10:05.724498009 -0800
+++ linux.git-davehans/arch/x86/lguest/Kconfig 2014-01-13 16:10:05.759499589 -0800
@@ -2,7 +2,6 @@ config LGUEST_GUEST
bool "Lguest guest support"
depends on X86_32 && PARAVIRT
select TTY
- select VIRTUALIZATION
select VIRTIO
select VIRTIO_CONSOLE
help
diff -puN arch/x86/kvm/Kconfig~x86-Kconfig-move-paravirt-under-virtualization-really arch/x86/kvm/Kconfig
--- linux.git/arch/x86/kvm/Kconfig~x86-Kconfig-move-paravirt-under-virtualization-really 2014-01-13 16:10:05.729498234 -0800
+++ linux.git-davehans/arch/x86/kvm/Kconfig 2014-01-13 16:10:05.760499634 -0800
@@ -2,8 +2,6 @@
# KVM configuration
#
-source "virt/kvm/Kconfig"
-
config KVM
tristate "Kernel-based Virtual Machine (KVM) support"
depends on HAVE_KVM
_
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] x86 Kconfig: create x86/Kconfig.virt
2014-01-14 0:11 [PATCH 1/2] x86 Kconfig: create x86/Kconfig.virt Dave Hansen
2014-01-14 0:11 ` [PATCH 2/2] x86 Kconfig: move guest-side options under "Virtualization" Dave Hansen
@ 2014-01-14 8:01 ` Paolo Bonzini
2018-09-15 13:31 ` Borislav Petkov
2 siblings, 0 replies; 5+ messages in thread
From: Paolo Bonzini @ 2014-01-14 8:01 UTC (permalink / raw)
To: Dave Hansen; +Cc: linux-kernel, x86, bp, dtor, kys, haiyangz, agraf, gleb
Il 14/01/2014 01:11, Dave Hansen ha scritto:
> From: Dave Hansen <dave.hansen@linux.intel.com>
>
> Right now, there is a "Enable paravirtualization code" option in
> the "Processor Features" menu, which means Xen. There is also a
> group of host-side paravirtualization options specific to KVM
> under the top-level "Virtualization" menu.
>
> I think it makes a lot of sense to group the host and guest side
> things together, especially since the top-level "Virtualization"
> menu is so sparsely populated.
>
> This creates a new hypervisor-independent arch/x86/Kconfig.virt
> file, and moves the "Virtualization" menu to be defined in there.
> Currently CONFIG_VIRTUALIZATION really means "host-side", so
> create a new config option which matches the guest-side one, and
> default its value to be what CONFIG_VIRTUALIZATION was set to.
>
> This also removes the very counterintuitive references to
> lguest/vhost code *from* kvm-specific code and removes the silly:
>
> depends on HAVE_KVM || X86
>
> dependency. It makes zero sense to have entries defined in
> arch/x86 depend on x86.
>
> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
> Cc: Borislav Petkov <bp@suse.de>
> Cc: Dmitry Torokhov <dtor@vmware.com>
> Cc: K. Y. Srinivasan <kys@microsoft.com>
> Cc: Haiyang Zhang <haiyangz@microsoft.com>
> Cc: Alexander Graf <agraf@suse.de>
> Cc: Gleb Natapov <gleb@redhat.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> ---
>
> linux.git-davehans/arch/x86/Kconfig | 2 +-
> linux.git-davehans/arch/x86/Kconfig.virt | 25 +++++++++++++++++++++++++
> linux.git-davehans/arch/x86/kvm/Kconfig | 19 -------------------
> 3 files changed, 26 insertions(+), 20 deletions(-)
>
> diff -puN arch/x86/Kconfig~x86-Kconfig-move-paravirt-under-virtualization arch/x86/Kconfig
> --- linux.git/arch/x86/Kconfig~x86-Kconfig-move-paravirt-under-virtualization 2014-01-13 16:09:29.785875796 -0800
> +++ linux.git-davehans/arch/x86/Kconfig 2014-01-13 16:09:29.793876157 -0800
> @@ -2416,6 +2416,6 @@ source "security/Kconfig"
>
> source "crypto/Kconfig"
>
> -source "arch/x86/kvm/Kconfig"
> +source "arch/x86/Kconfig.virt"
>
> source "lib/Kconfig"
> diff -puN /dev/null arch/x86/Kconfig.virt
> --- /dev/null 2013-11-27 17:20:18.337162396 -0800
> +++ linux.git-davehans/arch/x86/Kconfig.virt 2014-01-13 16:09:29.793876157 -0800
> @@ -0,0 +1,25 @@
> +
> +menu "Virtualization"
> +
> +config VIRTUALIZATION
> + bool
> +
> +config HYPERVISOR_HOST
> + bool "Host-Side Features (Linux as the Hypervisor)"
> + default y if VIRTUALIZATION
> + ---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 HYPERVISOR_HOST
> +
> +source arch/x86/kvm/Kconfig
> +source drivers/vhost/Kconfig
> +source drivers/lguest/Kconfig
> +
> +endif # HYPERVISOR_HOST
> +
> +endmenu # "Virtualization"
> diff -puN arch/x86/kvm/Kconfig~x86-Kconfig-move-paravirt-under-virtualization arch/x86/kvm/Kconfig
> --- linux.git/arch/x86/kvm/Kconfig~x86-Kconfig-move-paravirt-under-virtualization 2014-01-13 16:09:29.787875886 -0800
> +++ linux.git-davehans/arch/x86/kvm/Kconfig 2014-01-13 16:09:29.793876157 -0800
> @@ -4,19 +4,6 @@
>
> source "virt/kvm/Kconfig"
>
> -menuconfig VIRTUALIZATION
> - bool "Virtualization"
> - depends on HAVE_KVM || X86
> - default y
> - ---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
> -
> config KVM
> tristate "Kernel-based Virtual Machine (KVM) support"
> depends on HAVE_KVM
> @@ -93,9 +80,3 @@ config KVM_DEVICE_ASSIGNMENT
>
> If unsure, say Y.
>
> -# 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/lguest/Kconfig
> -
> -endif # VIRTUALIZATION
> _
>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] x86 Kconfig: move guest-side options under "Virtualization"
2014-01-14 0:11 ` [PATCH 2/2] x86 Kconfig: move guest-side options under "Virtualization" Dave Hansen
@ 2014-01-14 8:01 ` Paolo Bonzini
0 siblings, 0 replies; 5+ messages in thread
From: Paolo Bonzini @ 2014-01-14 8:01 UTC (permalink / raw)
To: Dave Hansen; +Cc: linux-kernel, x86, bp, dtor, kys, haiyangz, agraf, gleb
Il 14/01/2014 01:11, Dave Hansen ha scritto:
> We now have two groups of options in "Virtualization": one for
> host-side support and a matching one for guest-side stuff. We do
> not need separate submenus for this stuff since there are so few
> options.
>
> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
> Cc: Borislav Petkov <bp@suse.de>
> Cc: Dmitry Torokhov <dtor@vmware.com>
> Cc: K. Y. Srinivasan <kys@microsoft.com>
> Cc: Haiyang Zhang <haiyangz@microsoft.com>
> Cc: Alexander Graf <agraf@suse.de>
> Cc: Gleb Natapov <gleb@redhat.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> ---
>
> linux.git-davehans/arch/x86/Kconfig | 83 ----------------------------
> linux.git-davehans/arch/x86/Kconfig.virt | 85 +++++++++++++++++++++++++++++
> linux.git-davehans/arch/x86/kvm/Kconfig | 2
> linux.git-davehans/arch/x86/lguest/Kconfig | 1
> 4 files changed, 85 insertions(+), 86 deletions(-)
>
> diff -puN arch/x86/Kconfig~x86-Kconfig-move-paravirt-under-virtualization-really arch/x86/Kconfig
> --- linux.git/arch/x86/Kconfig~x86-Kconfig-move-paravirt-under-virtualization-really 2014-01-13 16:10:05.721497873 -0800
> +++ linux.git-davehans/arch/x86/Kconfig 2014-01-13 16:10:05.758499543 -0800
> @@ -1018,89 +1018,6 @@ config X86_ES7000
> Support for Unisys ES7000 systems. Say 'Y' here if this kernel is
> supposed to run on an IA32-based Unisys ES7000 system.
>
> -menuconfig HYPERVISOR_GUEST
> - bool "Linux guest support"
> - ---help---
> - Say Y here to enable options for running Linux under various hyper-
> - visors. This option enables basic hypervisor detection and platform
> - setup.
> -
> - If you say N, all options in this submenu will be skipped and
> - disabled, and Linux guest support won't be built in.
> -
> -if HYPERVISOR_GUEST
> -
> -config PARAVIRT
> - bool "Enable paravirtualization code"
> - ---help---
> - This changes the kernel so it can modify itself when it is run
> - under a hypervisor, potentially improving performance significantly
> - over full virtualization. However, when run without a hypervisor
> - the kernel is theoretically slower and slightly larger.
> -
> -config PARAVIRT_DEBUG
> - bool "paravirt-ops debugging"
> - depends on PARAVIRT && DEBUG_KERNEL
> - ---help---
> - Enable to debug paravirt_ops internals. Specifically, BUG if
> - a paravirt_op is missing when it is called.
> -
> -config PARAVIRT_SPINLOCKS
> - bool "Paravirtualization layer for spinlocks"
> - depends on PARAVIRT && SMP
> - select UNINLINE_SPIN_UNLOCK
> - ---help---
> - Paravirtualized spinlocks allow a pvops backend to replace the
> - spinlock implementation with something virtualization-friendly
> - (for example, block the virtual CPU rather than spinning).
> -
> - It has a minimal impact on native kernels and gives a nice performance
> - benefit on paravirtualized KVM / Xen kernels.
> -
> - If you are unsure how to answer this question, answer Y.
> -
> -source "arch/x86/xen/Kconfig"
> -
> -config KVM_GUEST
> - bool "KVM Guest support (including kvmclock)"
> - depends on PARAVIRT
> - select PARAVIRT_CLOCK
> - default y
> - ---help---
> - This option enables various optimizations for running under the KVM
> - hypervisor. It includes a paravirtualized clock, so that instead
> - of relying on a PIT (or probably other) emulation by the
> - underlying device model, the host provides the guest with
> - timing infrastructure such as time of day, and system time
> -
> -config KVM_DEBUG_FS
> - bool "Enable debug information for KVM Guests in debugfs"
> - depends on KVM_GUEST && DEBUG_FS
> - default n
> - ---help---
> - This option enables collection of various statistics for KVM guest.
> - Statistics are displayed in debugfs filesystem. Enabling this option
> - may incur significant overhead.
> -
> -source "arch/x86/lguest/Kconfig"
> -
> -config PARAVIRT_TIME_ACCOUNTING
> - bool "Paravirtual steal time accounting"
> - depends on PARAVIRT
> - default n
> - ---help---
> - Select this option to enable fine granularity task steal time
> - accounting. Time spent executing other tasks in parallel with
> - the current vCPU is discounted from the vCPU power. To account for
> - that, there can be a small performance impact.
> -
> - If in doubt, say N here.
> -
> -config PARAVIRT_CLOCK
> - bool
> -
> -endif #HYPERVISOR_GUEST
> -
> config NO_BOOTMEM
> def_bool y
>
> diff -puN arch/x86/Kconfig.virt~x86-Kconfig-move-paravirt-under-virtualization-really arch/x86/Kconfig.virt
> --- linux.git/arch/x86/Kconfig.virt~x86-Kconfig-move-paravirt-under-virtualization-really 2014-01-13 16:10:05.722497918 -0800
> +++ linux.git-davehans/arch/x86/Kconfig.virt 2014-01-13 16:10:35.730852434 -0800
> @@ -1,3 +1,5 @@
> +# No menu items in here, just common config variables:
> +source "virt/kvm/Kconfig"
>
> menu "Virtualization"
>
> @@ -22,4 +24,87 @@ source drivers/lguest/Kconfig
>
> endif # HYPERVISOR_HOST
>
> +config HYPERVISOR_GUEST
> + bool "Guest-Side Features (Linux running under a Hypervisor)"
> + ---help---
> + Say Y here to enable options for running Linux under various hyper-
> + visors. This option enables basic hypervisor detection and platform
> + setup.
> +
> + If you say N, all options in this submenu will be skipped and
> + disabled, and Linux guest support won't be built in.
> +
> +if HYPERVISOR_GUEST
> +
> +config PARAVIRT
> + bool "Enable paravirtualization code"
> + ---help---
> + This changes the kernel so it can modify itself when it is run
> + under a hypervisor, potentially improving performance significantly
> + over full virtualization. However, when run without a hypervisor
> + the kernel is theoretically slower and slightly larger.
> +
> +config PARAVIRT_DEBUG
> + bool "paravirt-ops debugging"
> + depends on PARAVIRT && DEBUG_KERNEL
> + ---help---
> + Enable to debug paravirt_ops internals. Specifically, BUG if
> + a paravirt_op is missing when it is called.
> +
> +config PARAVIRT_SPINLOCKS
> + bool "Paravirtualization layer for spinlocks"
> + depends on PARAVIRT && SMP
> + select UNINLINE_SPIN_UNLOCK
> + ---help---
> + Paravirtualized spinlocks allow a pvops backend to replace the
> + spinlock implementation with something virtualization-friendly
> + (for example, block the virtual CPU rather than spinning).
> +
> + It has a minimal impact on native kernels and gives a nice performance
> + benefit on paravirtualized KVM / Xen kernels.
> +
> + If you are unsure how to answer this question, answer Y.
> +
> +source "arch/x86/xen/Kconfig"
> +
> +config KVM_GUEST
> + bool "KVM Guest support (including kvmclock)"
> + depends on PARAVIRT
> + select PARAVIRT_CLOCK
> + default y
> + ---help---
> + This option enables various optimizations for running under the KVM
> + hypervisor. It includes a paravirtualized clock, so that instead
> + of relying on a PIT (or probably other) emulation by the
> + underlying device model, the host provides the guest with
> + timing infrastructure such as time of day, and system time
> +
> +config KVM_DEBUG_FS
> + bool "Enable debug information for KVM Guests in debugfs"
> + depends on KVM_GUEST && DEBUG_FS
> + default n
> + ---help---
> + This option enables collection of various statistics for KVM guest.
> + Statistics are displayed in debugfs filesystem. Enabling this option
> + may incur significant overhead.
> +
> +source "arch/x86/lguest/Kconfig"
> +
> +config PARAVIRT_TIME_ACCOUNTING
> + bool "Paravirtual steal time accounting"
> + depends on PARAVIRT
> + default n
> + ---help---
> + Select this option to enable fine granularity task steal time
> + accounting. Time spent executing other tasks in parallel with
> + the current vCPU is discounted from the vCPU power. To account for
> + that, there can be a small performance impact.
> +
> + If in doubt, say N here.
> +
> +config PARAVIRT_CLOCK
> + bool
> +
> +endif # HYPERVISOR_GUEST
> +
> endmenu # "Virtualization"
> diff -puN arch/x86/lguest/Kconfig~x86-Kconfig-move-paravirt-under-virtualization-really arch/x86/lguest/Kconfig
> --- linux.git/arch/x86/lguest/Kconfig~x86-Kconfig-move-paravirt-under-virtualization-really 2014-01-13 16:10:05.724498009 -0800
> +++ linux.git-davehans/arch/x86/lguest/Kconfig 2014-01-13 16:10:05.759499589 -0800
> @@ -2,7 +2,6 @@ config LGUEST_GUEST
> bool "Lguest guest support"
> depends on X86_32 && PARAVIRT
> select TTY
> - select VIRTUALIZATION
> select VIRTIO
> select VIRTIO_CONSOLE
> help
> diff -puN arch/x86/kvm/Kconfig~x86-Kconfig-move-paravirt-under-virtualization-really arch/x86/kvm/Kconfig
> --- linux.git/arch/x86/kvm/Kconfig~x86-Kconfig-move-paravirt-under-virtualization-really 2014-01-13 16:10:05.729498234 -0800
> +++ linux.git-davehans/arch/x86/kvm/Kconfig 2014-01-13 16:10:05.760499634 -0800
> @@ -2,8 +2,6 @@
> # KVM configuration
> #
>
> -source "virt/kvm/Kconfig"
> -
> config KVM
> tristate "Kernel-based Virtual Machine (KVM) support"
> depends on HAVE_KVM
> _
>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] x86 Kconfig: create x86/Kconfig.virt
2014-01-14 0:11 [PATCH 1/2] x86 Kconfig: create x86/Kconfig.virt Dave Hansen
2014-01-14 0:11 ` [PATCH 2/2] x86 Kconfig: move guest-side options under "Virtualization" Dave Hansen
2014-01-14 8:01 ` [PATCH 1/2] x86 Kconfig: create x86/Kconfig.virt Paolo Bonzini
@ 2018-09-15 13:31 ` Borislav Petkov
2 siblings, 0 replies; 5+ messages in thread
From: Borislav Petkov @ 2018-09-15 13:31 UTC (permalink / raw)
To: Dave Hansen; +Cc: linux-kernel, x86, dtor, kys, haiyangz, agraf, gleb, pbonzini
On Mon, Jan 13, 2014 at 04:11:38PM -0800, Dave Hansen wrote:
>
> From: Dave Hansen <dave.hansen@linux.intel.com>
>
> Right now, there is a "Enable paravirtualization code" option in
> the "Processor Features" menu, which means Xen. There is also a
> group of host-side paravirtualization options specific to KVM
> under the top-level "Virtualization" menu.
>
> I think it makes a lot of sense to group the host and guest side
> things together, especially since the top-level "Virtualization"
> menu is so sparsely populated.
Whoops, those are 4 years old and look forgotten. The idea still makes
sense though, IMO. You could refresh them, if bored ... :-)
Thx.
--
Regards/Gruss,
Boris.
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
--
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-09-15 13:32 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-14 0:11 [PATCH 1/2] x86 Kconfig: create x86/Kconfig.virt Dave Hansen
2014-01-14 0:11 ` [PATCH 2/2] x86 Kconfig: move guest-side options under "Virtualization" Dave Hansen
2014-01-14 8:01 ` Paolo Bonzini
2014-01-14 8:01 ` [PATCH 1/2] x86 Kconfig: create x86/Kconfig.virt Paolo Bonzini
2018-09-15 13:31 ` Borislav Petkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox