aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis R. Rodriguez <mcgrof@suse.com>2015-05-20 14:53:39 -0400
committerDavid Vrabel <david.vrabel@citrix.com>2015-06-16 06:04:29 -0400
commit6c6685055a285de53f18fbf6611687291b57ccd6 (patch)
tree2dbcdc67927fce66832e72e3e01a8e78b33c1787
parent9bcd776d299e8adb8ed37be0453472aa3cc2b7db (diff)
kconfig: add xenconfig defconfig helper
This lets you build a kernel which can support xen dom0 or xen guests on i386, x86-64 and arm64 by just using: make xenconfig You can start from an allnoconfig and then switch to xenconfig. This also splits out the options which are available currently to be built with x86 and 'make ARCH=arm64' under a shared config. Technically xen supports a dom0 kernel and also a guest kernel configuration but upon review with the xen team since we don't have many dom0 options its best to just combine these two into one. A few generic notes: we enable both of these: CONFIG_INET=y CONFIG_BINFMT_ELF=y although technically not required given you likely will end up with a pretty useless system otherwise. A few architectural differences worth noting: $ make allnoconfig; make xenconfig > /dev/null ; \ grep XEN .config > 64-bit-config $ make ARCH=i386 allnoconfig; make ARCH=i386 xenconfig > /dev/null; \ grep XEN .config > 32-bit-config $ make ARCH=arm64 allnoconfig; make ARCH=arm64 xenconfig > /dev/null; \ grep XEN .config > arm64-config Since the options are already split up with a generic config and architecture specific configs you anything on the x86 configs are known to only work right now on x86. For instance arm64 doesn't support MEMORY_HOTPLUG yet as such although we try to enabe it generically arm64 doesn't have it yet, so we leave the xen specific kconfig option XEN_BALLOON_MEMORY_HOTPLUG on x86's config file to set expecations correctly. Then on x86 we have differences between i386 and x86-64. The difference between 64-bit-config and 32-bit-config is you don't get XEN_MCE_LOG as this is only supported on 64-bit. You also do not get on i386 XEN_BALLOON_MEMORY_HOTPLUG, there does not seem to be any technical reasons to not allow this but I gave up after a few attempts. Cc: Josh Triplett <josh@joshtriplett.org> Cc: Borislav Petkov <bp@suse.de> Cc: Pekka Enberg <penberg@kernel.org> Cc: David Rientjes <rientjes@google.com> Cc: Michal Marek <mmarek@suse.cz> Cc: Randy Dunlap <rdunlap@infradead.org> Cc: penberg@kernel.org Cc: levinsasha928@gmail.com Cc: mtosatti@redhat.com Cc: fengguang.wu@intel.com Cc: David Vrabel <david.vrabel@citrix.com> Cc: Ian Campbell <Ian.Campbell@citrix.com> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Cc: xen-devel@lists.xenproject.org Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Julien Grall <julien.grall@linaro.org> Acked-by: Michal Marek <mmarek@suse.cz> Acked-by: David Rientjes <rientjes@google.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com> Signed-off-by: David Vrabel <david.vrabel@citrix.com>
-rw-r--r--arch/x86/configs/xen.config28
-rw-r--r--kernel/configs/xen.config48
-rw-r--r--scripts/kconfig/Makefile5
3 files changed, 81 insertions, 0 deletions
diff --git a/arch/x86/configs/xen.config b/arch/x86/configs/xen.config
new file mode 100644
index 000000000000..d9fc7139fd46
--- /dev/null
+++ b/arch/x86/configs/xen.config
@@ -0,0 +1,28 @@
1# global x86 required specific stuff
2# On 32-bit HIGHMEM4G is not allowed
3CONFIG_HIGHMEM64G=y
4CONFIG_64BIT=y
5
6# These enable us to allow some of the
7# not so generic stuff below
8CONFIG_HYPERVISOR_GUEST=y
9CONFIG_PCI=y
10CONFIG_PCI_MSI=y
11CONFIG_X86_MCE=y
12CONFIG_ACPI_PROCESSOR=y
13CONFIG_CPU_FREQ=y
14
15# x86 xen specific config options
16CONFIG_XEN_PVH=y
17CONFIG_XEN_MAX_DOMAIN_MEMORY=500
18CONFIG_XEN_SAVE_RESTORE=y
19# CONFIG_XEN_DEBUG_FS is not set
20CONFIG_XEN_MCE_LOG=y
21CONFIG_XEN_ACPI_PROCESSOR=m
22# x86 specific backend drivers
23CONFIG_XEN_PCIDEV_BACKEND=m
24# x86 specific frontend drivers
25CONFIG_XEN_PCIDEV_FRONTEND=m
26# depends on MEMORY_HOTPLUG, arm64 doesn't enable this yet,
27# move to generic config if it ever does.
28CONFIG_XEN_BALLOON_MEMORY_HOTPLUG=y
diff --git a/kernel/configs/xen.config b/kernel/configs/xen.config
new file mode 100644
index 000000000000..ff756221f112
--- /dev/null
+++ b/kernel/configs/xen.config
@@ -0,0 +1,48 @@
1# global stuff - these enable us to allow some
2# of the not so generic stuff below for xen
3CONFIG_PARAVIRT=y
4CONFIG_NET=y
5CONFIG_NET_CORE=y
6CONFIG_NETDEVICES=y
7CONFIG_BLOCK=y
8CONFIG_WATCHDOG=y
9CONFIG_TARGET_CORE=y
10CONFIG_SCSI=y
11CONFIG_FB=y
12CONFIG_INPUT_MISC=y
13CONFIG_MEMORY_HOTPLUG=y
14CONFIG_TTY=y
15# Technically not required but otherwise produces
16# pretty useless systems starting from allnoconfig
17# You want TCP/IP and ELF binaries right?
18CONFIG_INET=y
19CONFIG_BINFMT_ELF=y
20# generic config
21CONFIG_XEN=y
22CONFIG_XEN_DOM0=y
23# backend drivers
24CONFIG_XEN_BACKEND=y
25CONFIG_XEN_BLKDEV_BACKEND=m
26CONFIG_XEN_NETDEV_BACKEND=m
27CONFIG_HVC_XEN=y
28CONFIG_XEN_WDT=m
29CONFIG_XEN_SCSI_BACKEND=m
30# frontend drivers
31CONFIG_XEN_FBDEV_FRONTEND=m
32CONFIG_HVC_XEN_FRONTEND=y
33CONFIG_INPUT_XEN_KBDDEV_FRONTEND=m
34CONFIG_XEN_SCSI_FRONTEND=m
35# others
36CONFIG_XEN_BALLOON=y
37CONFIG_XEN_SCRUB_PAGES=y
38CONFIG_XEN_DEV_EVTCHN=m
39CONFIG_XEN_BLKDEV_FRONTEND=m
40CONFIG_XEN_NETDEV_FRONTEND=m
41CONFIG_XENFS=m
42CONFIG_XEN_COMPAT_XENFS=y
43CONFIG_XEN_SYS_HYPERVISOR=y
44CONFIG_XEN_XENBUS_FRONTEND=y
45CONFIG_XEN_GNTDEV=m
46CONFIG_XEN_GRANT_DEV_ALLOC=m
47CONFIG_SWIOTLB_XEN=y
48CONFIG_XEN_PRIVCMD=m
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index 6950032f06a5..f52abae0ec5f 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -115,6 +115,10 @@ PHONY += kvmconfig
115kvmconfig: kvm_guest.config 115kvmconfig: kvm_guest.config
116 @: 116 @:
117 117
118PHONY += xenconfig
119xenconfig: xen.config
120 @:
121
118PHONY += tinyconfig 122PHONY += tinyconfig
119tinyconfig: 123tinyconfig:
120 $(Q)$(MAKE) -f $(srctree)/Makefile allnoconfig tiny.config 124 $(Q)$(MAKE) -f $(srctree)/Makefile allnoconfig tiny.config
@@ -140,6 +144,7 @@ help:
140 @echo ' listnewconfig - List new options' 144 @echo ' listnewconfig - List new options'
141 @echo ' olddefconfig - Same as silentoldconfig but sets new symbols to their default value' 145 @echo ' olddefconfig - Same as silentoldconfig but sets new symbols to their default value'
142 @echo ' kvmconfig - Enable additional options for kvm guest kernel support' 146 @echo ' kvmconfig - Enable additional options for kvm guest kernel support'
147 @echo ' xenconfig - Enable additional options for xen dom0 and guest kernel support'
143 @echo ' tinyconfig - Configure the tiniest possible kernel' 148 @echo ' tinyconfig - Configure the tiniest possible kernel'
144 149
145# lxdialog stuff 150# lxdialog stuff