aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/Kconfig
diff options
context:
space:
mode:
authorBorislav Petkov <bp@suse.de>2013-03-04 15:20:21 -0500
committerH. Peter Anvin <hpa@linux.intel.com>2013-03-04 16:14:25 -0500
commit6276a074c6519946c527f03e2ab69770a62652d9 (patch)
tree29527fb4e5a6c4f3089d82643616465d85697530 /arch/x86/Kconfig
parent2c59cad6941cb55990fa6e19d84ae027c46991ee (diff)
x86: Make Linux guest support optional
Put all config options needed to run Linux as a guest behind a CONFIG_HYPERVISOR_GUEST menu so that they don't get built-in by default but be selectable by the user. Also, make all units which depend on x86_hyper, depend on this new symbol so that compilation doesn't fail when CONFIG_HYPERVISOR_GUEST is disabled but those units assume its presence. Sort options in the new HYPERVISOR_GUEST menu, adapt config text and drop redundant select. Signed-off-by: Borislav Petkov <bp@suse.de> Link: http://lkml.kernel.org/r/1362428421-9244-3-git-send-email-bp@alien8.de Cc: Dmitry Torokhov <dtor@vmware.com> Cc: K. Y. Srinivasan <kys@microsoft.com> Cc: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/Kconfig')
-rw-r--r--arch/x86/Kconfig89
1 files changed, 45 insertions, 44 deletions
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index f922a9b9a319..e9e4623bd4da 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -389,7 +389,7 @@ config X86_NUMACHIP
389 389
390config X86_VSMP 390config X86_VSMP
391 bool "ScaleMP vSMP" 391 bool "ScaleMP vSMP"
392 select PARAVIRT_GUEST 392 select HYPERVISOR_GUEST
393 select PARAVIRT 393 select PARAVIRT
394 depends on X86_64 && PCI 394 depends on X86_64 && PCI
395 depends on X86_EXTENDED_PLATFORM 395 depends on X86_EXTENDED_PLATFORM
@@ -596,44 +596,17 @@ config SCHED_OMIT_FRAME_POINTER
596 596
597 If in doubt, say "Y". 597 If in doubt, say "Y".
598 598
599menuconfig PARAVIRT_GUEST 599menuconfig HYPERVISOR_GUEST
600 bool "Paravirtualized guest support" 600 bool "Linux guest support"
601 ---help--- 601 ---help---
602 Say Y here to get to see options related to running Linux under 602 Say Y here to enable options for running Linux under various hyper-
603 various hypervisors. This option alone does not add any kernel code. 603 visors. This option enables basic hypervisor detection and platform
604 setup.
604 605
605 If you say N, all options in this submenu will be skipped and disabled. 606 If you say N, all options in this submenu will be skipped and
607 disabled, and Linux guest support won't be built in.
606 608
607if PARAVIRT_GUEST 609if HYPERVISOR_GUEST
608
609config PARAVIRT_TIME_ACCOUNTING
610 bool "Paravirtual steal time accounting"
611 select PARAVIRT
612 default n
613 ---help---
614 Select this option to enable fine granularity task steal time
615 accounting. Time spent executing other tasks in parallel with
616 the current vCPU is discounted from the vCPU power. To account for
617 that, there can be a small performance impact.
618
619 If in doubt, say N here.
620
621source "arch/x86/xen/Kconfig"
622
623config KVM_GUEST
624 bool "KVM Guest support (including kvmclock)"
625 select PARAVIRT
626 select PARAVIRT
627 select PARAVIRT_CLOCK
628 default y if PARAVIRT_GUEST
629 ---help---
630 This option enables various optimizations for running under the KVM
631 hypervisor. It includes a paravirtualized clock, so that instead
632 of relying on a PIT (or probably other) emulation by the
633 underlying device model, the host provides the guest with
634 timing infrastructure such as time of day, and system time
635
636source "arch/x86/lguest/Kconfig"
637 610
638config PARAVIRT 611config PARAVIRT
639 bool "Enable paravirtualization code" 612 bool "Enable paravirtualization code"
@@ -643,6 +616,13 @@ config PARAVIRT
643 over full virtualization. However, when run without a hypervisor 616 over full virtualization. However, when run without a hypervisor
644 the kernel is theoretically slower and slightly larger. 617 the kernel is theoretically slower and slightly larger.
645 618
619config PARAVIRT_DEBUG
620 bool "paravirt-ops debugging"
621 depends on PARAVIRT && DEBUG_KERNEL
622 ---help---
623 Enable to debug paravirt_ops internals. Specifically, BUG if
624 a paravirt_op is missing when it is called.
625
646config PARAVIRT_SPINLOCKS 626config PARAVIRT_SPINLOCKS
647 bool "Paravirtualization layer for spinlocks" 627 bool "Paravirtualization layer for spinlocks"
648 depends on PARAVIRT && SMP 628 depends on PARAVIRT && SMP
@@ -656,17 +636,38 @@ config PARAVIRT_SPINLOCKS
656 636
657 If you are unsure how to answer this question, answer N. 637 If you are unsure how to answer this question, answer N.
658 638
659config PARAVIRT_CLOCK 639source "arch/x86/xen/Kconfig"
660 bool
661 640
662config PARAVIRT_DEBUG 641config KVM_GUEST
663 bool "paravirt-ops debugging" 642 bool "KVM Guest support (including kvmclock)"
664 depends on PARAVIRT && DEBUG_KERNEL 643 depends on PARAVIRT
644 select PARAVIRT_CLOCK
645 default y
665 ---help--- 646 ---help---
666 Enable to debug paravirt_ops internals. Specifically, BUG if 647 This option enables various optimizations for running under the KVM
667 a paravirt_op is missing when it is called. 648 hypervisor. It includes a paravirtualized clock, so that instead
649 of relying on a PIT (or probably other) emulation by the
650 underlying device model, the host provides the guest with
651 timing infrastructure such as time of day, and system time
652
653source "arch/x86/lguest/Kconfig"
654
655config PARAVIRT_TIME_ACCOUNTING
656 bool "Paravirtual steal time accounting"
657 depends on PARAVIRT
658 default n
659 ---help---
660 Select this option to enable fine granularity task steal time
661 accounting. Time spent executing other tasks in parallel with
662 the current vCPU is discounted from the vCPU power. To account for
663 that, there can be a small performance impact.
664
665 If in doubt, say N here.
666
667config PARAVIRT_CLOCK
668 bool
668 669
669endif #PARAVIRT_GUEST 670endif #HYPERVISOR_GUEST
670 671
671config NO_BOOTMEM 672config NO_BOOTMEM
672 def_bool y 673 def_bool y