From d3d1c4bdf16bd154d9f27f34fca28edca90465eb Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 22 Oct 2007 10:55:21 +1000 Subject: Normalize config options for guest support 1) Group all the "guest OS" support options together, under a PARAVIRT_GUEST menu. 2) Make those options select CONFIG_PARAVIRT, as suggested by Andi. 3) Make kconfig help titles consistent. Signed-off-by: Rusty Russell Cc: Andi Kleen Cc: Zach Amsden Cc: Jeremy Fitzhardinge Cc: Chris Wright --- arch/i386/Kconfig | 38 ++++++++++++++++++++++++++++---------- arch/x86/xen/Kconfig | 5 +++-- drivers/lguest/Kconfig | 3 +-- 3 files changed, 32 insertions(+), 14 deletions(-) diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig index f6e44fc5283c..3523e82c8412 100644 --- a/arch/i386/Kconfig +++ b/arch/i386/Kconfig @@ -227,28 +227,46 @@ config SCHED_NO_NO_OMIT_FRAME_POINTER If in doubt, say "Y". config PARAVIRT - bool "Paravirtualization support (EXPERIMENTAL)" - depends on EXPERIMENTAL + bool depends on !(X86_VISWS || X86_VOYAGER) help - Paravirtualization is a way of running multiple instances of - Linux on the same machine, under a hypervisor. This option - changes the kernel so it can modify itself when it is run - under a hypervisor, improving performance significantly. - However, when run without a hypervisor the kernel is - theoretically slower. If in doubt, say N. + 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. + +menuconfig PARAVIRT_GUEST + bool "Paravirtualized guest support" + help + Say Y here to get to see options related to running Linux under + various hypervisors. This option alone does not add any kernel code. + + If you say N, all options in this submenu will be skipped and disabled. + +if PARAVIRT_GUEST source "arch/x86/xen/Kconfig" config VMI - bool "VMI Paravirt-ops support" - depends on PARAVIRT + bool "VMI Guest support" + select PARAVIRT + depends on !(X86_VISWS || X86_VOYAGER) help VMI provides a paravirtualized interface to the VMware ESX server (it could be used by other hypervisors in theory too, but is not at the moment), by linking the kernel to a GPL-ed ROM module provided by the hypervisor. +config LGUEST_GUEST + bool "Lguest guest support" + select PARAVIRT + depends on !X86_PAE + help + Lguest is a tiny in-kernel hypervisor. Selecting this will + allow your kernel to boot under lguest. This option will increase + your kernel size by about 6k. If in doubt, say N. +endif + config ACPI_SRAT bool default y diff --git a/arch/x86/xen/Kconfig b/arch/x86/xen/Kconfig index 9df99e1885a4..fbfa55ce0d55 100644 --- a/arch/x86/xen/Kconfig +++ b/arch/x86/xen/Kconfig @@ -3,8 +3,9 @@ # config XEN - bool "Enable support for Xen hypervisor" - depends on PARAVIRT && X86_CMPXCHG && X86_TSC && !NEED_MULTIPLE_NODES + bool "Xen guest support" + select PARAVIRT + depends on X86_CMPXCHG && X86_TSC && !NEED_MULTIPLE_NODES && !(X86_VISWS || X86_VOYAGER) help This is the Linux Xen port. Enabling this will allow the kernel to boot in a paravirtualized environment under the diff --git a/drivers/lguest/Kconfig b/drivers/lguest/Kconfig index 41e2250613a1..64e1bb31c5b4 100644 --- a/drivers/lguest/Kconfig +++ b/drivers/lguest/Kconfig @@ -1,7 +1,6 @@ config LGUEST tristate "Linux hypervisor example code" - depends on X86 && PARAVIRT && EXPERIMENTAL && !X86_PAE && FUTEX - select LGUEST_GUEST + depends on X86 && EXPERIMENTAL && !X86_PAE && FUTEX && !(X86_VISWS || X86_VOYAGER) select HVC_DRIVER ---help--- This is a very simple module which allows you to run -- cgit v1.2.3 From 9525ca0286afd54a5cd69d9ded741b4df8d0c554 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 22 Oct 2007 10:55:43 +1000 Subject: Consolidate host virtualization support under Virtualization menu Move lguest under the virtualization menu. Signed-off-by: Rusty Russell Cc: Avi Kivity --- drivers/Kconfig | 2 -- drivers/kvm/Kconfig | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/Kconfig b/drivers/Kconfig index 34f40ea0ba60..d945ffc57c25 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig @@ -93,6 +93,4 @@ source "drivers/auxdisplay/Kconfig" source "drivers/kvm/Kconfig" source "drivers/uio/Kconfig" - -source "drivers/lguest/Kconfig" endmenu diff --git a/drivers/kvm/Kconfig b/drivers/kvm/Kconfig index 8749fa4ffcee..656920636cb2 100644 --- a/drivers/kvm/Kconfig +++ b/drivers/kvm/Kconfig @@ -47,4 +47,8 @@ config KVM_AMD Provides support for KVM on AMD processors equipped with the AMD-V (SVM) extensions. +# OK, it's a little counter-intuitive to do this, but it puts it neatly under +# the virtualization menu. +source drivers/lguest/Kconfig + endif # VIRTUALIZATION -- cgit v1.2.3 From ee8e7cfe9d330d6f1ce0b9b1620d6df5d9cf6b70 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 22 Oct 2007 10:56:19 +1000 Subject: Make asm-x86/bootparam.h includable from userspace. To actually write a bootloader (or, say, the lguest launcher) currently requires duplication of these structures. Making them includable from userspace is much nicer. We merge the common userspace-required definitions of e820_32/64.h into e820.h for export. Signed-off-by: Rusty Russell --- Documentation/lguest/lguest.c | 2 +- include/asm-x86/Kbuild | 3 + include/asm-x86/bootparam.h | 108 ++++++++++++++++----------------- include/asm-x86/e820.h | 28 +++++++++ include/asm-x86/e820_32.h | 21 ------- include/asm-x86/e820_64.h | 20 ------ include/asm-x86/ist.h | 12 ++-- include/linux/Kbuild | 2 + include/linux/apm_bios.h | 30 ++++----- include/linux/edd.h | 137 +++++++++++++++++++++--------------------- include/linux/screen_info.h | 81 ++++++++++++++----------- include/video/Kbuild | 1 + include/video/edid.h | 9 ++- 13 files changed, 229 insertions(+), 225 deletions(-) diff --git a/Documentation/lguest/lguest.c b/Documentation/lguest/lguest.c index 103e346c8b6a..c7fc995076cf 100644 --- a/Documentation/lguest/lguest.c +++ b/Documentation/lguest/lguest.c @@ -46,7 +46,7 @@ typedef uint32_t u32; typedef uint16_t u16; typedef uint8_t u8; #include "../../include/linux/lguest_launcher.h" -#include "../../include/asm-x86/e820_32.h" +#include "../../include/asm-x86/e820.h" /*:*/ #define PAGE_PRESENT 0x7 /* Present, RW, Execute */ diff --git a/include/asm-x86/Kbuild b/include/asm-x86/Kbuild index 559830ece755..5e3539c129b9 100644 --- a/include/asm-x86/Kbuild +++ b/include/asm-x86/Kbuild @@ -1,6 +1,7 @@ include include/asm-generic/Kbuild.asm header-y += boot.h +header-y += bootparam.h header-y += debugreg.h header-y += ldt.h header-y += msr-index.h @@ -14,8 +15,10 @@ unifdef-y += a.out_32.h unifdef-y += a.out_64.h unifdef-y += byteorder_32.h unifdef-y += byteorder_64.h +unifdef-y += e820.h unifdef-y += elf_32.h unifdef-y += elf_64.h +unifdef-y += ist.h unifdef-y += mce.h unifdef-y += msgbuf_32.h unifdef-y += msgbuf_64.h diff --git a/include/asm-x86/bootparam.h b/include/asm-x86/bootparam.h index dc031cf44633..19f3ddf2df4b 100644 --- a/include/asm-x86/bootparam.h +++ b/include/asm-x86/bootparam.h @@ -10,85 +10,85 @@ #include