[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH v8 16/28] build: convert HAS_KEXEC / KEXEC use to Kconfig



Use the Kconfig generated CONFIG_HAS_KEXEC defines in the build system
and replace kexec :=y in Rules.mk with a kconfig option called
CONFIG_KEXEC. Purposefully did not merge the two variables together in
this patch to keep this as mechanical as possible.

CC: Ian Campbell <ian.campbell@xxxxxxxxxx>
CC: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
CC: Keir Fraser <keir@xxxxxxx>
CC: Jan Beulich <jbeulich@xxxxxxxx>
CC: Tim Deegan <tim@xxxxxxx>
CC: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Signed-off-by: Doug Goldstein <cardoe@xxxxxxxxxx>
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 xen/Rules.mk          | 10 ++++------
 xen/arch/x86/Kconfig  |  1 +
 xen/arch/x86/Rules.mk |  1 -
 xen/common/Kconfig    | 16 ++++++++++++++++
 4 files changed, 21 insertions(+), 7 deletions(-)

diff --git a/xen/Rules.mk b/xen/Rules.mk
index d55c58c..4ed0d11 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -10,7 +10,6 @@ lock_profile  ?= n
 crash_debug   ?= n
 frame_pointer ?= n
 lto           ?= n
-kexec         ?= y
 
 -include $(BASEDIR)/include/config/auto.conf
 
@@ -28,6 +27,10 @@ ifeq ($(perfc_arrays),y)
 perfc := y
 endif
 
+ifneq ($(origin kexec),undefined)
+$(error "You must use 'make menuconfig' to enable/disable kexec now.")
+endif
+
 # Set ARCH/SUBARCH appropriately.
 override TARGET_SUBARCH  := $(XEN_TARGET_ARCH)
 override TARGET_ARCH     := $(shell echo $(XEN_TARGET_ARCH) | \
@@ -68,11 +71,6 @@ ifneq ($(max_phys_irqs),)
 CFLAGS-y                += -DMAX_PHYS_IRQS=$(max_phys_irqs)
 endif
 
-CONFIG_KEXEC-$(HAS_KEXEC) := $(kexec)
-CONFIG_KEXEC              := $(CONFIG_KEXEC-y)
-
-CFLAGS-$(CONFIG_KEXEC)  += -DCONFIG_KEXEC
-
 AFLAGS-y                += -D__ASSEMBLY__ -include 
$(BASEDIR)/include/xen/config.h
 
 # Clang's built-in assembler can't handle .code16/.code32/.code64 yet
diff --git a/xen/arch/x86/Kconfig b/xen/arch/x86/Kconfig
index d472234..88955e7 100644
--- a/xen/arch/x86/Kconfig
+++ b/xen/arch/x86/Kconfig
@@ -7,6 +7,7 @@ config X86
        select HAS_CPUFREQ
        select HAS_GDBSX
        select HAS_IOPORTS
+       select HAS_KEXEC
        select HAS_NS16550
        select HAS_PASSTHROUGH
        select HAS_PCI
diff --git a/xen/arch/x86/Rules.mk b/xen/arch/x86/Rules.mk
index 193e7ea..793e1f7 100644
--- a/xen/arch/x86/Rules.mk
+++ b/xen/arch/x86/Rules.mk
@@ -3,7 +3,6 @@
 
 HAS_NUMA := y
 HAS_EHCI := y
-HAS_KEXEC := y
 HAS_CORE_PARKING := y
 xenoprof := y
 
diff --git a/xen/common/Kconfig b/xen/common/Kconfig
index 4905574..8d2ab4f 100644
--- a/xen/common/Kconfig
+++ b/xen/common/Kconfig
@@ -9,6 +9,10 @@ config HAS_DEVICE_TREE
 config HAS_PDX
        bool
 
+# Select HAS_KEXEC if kexec is supported
+config HAS_KEXEC
+       bool
+
 # Select HAS_GDBSX if GDBSX is supported
 config HAS_GDBSX
        bool
@@ -16,4 +20,16 @@ config HAS_GDBSX
 config HAS_IOPORTS
        bool
 
+# Enable/Disable kexec support
+config KEXEC
+       bool "kexec support"
+       default y
+       depends on HAS_KEXEC
+       ---help---
+         Allows a running Xen hypervisor to be replaced with another OS
+         without rebooting. This is primarily used to execute a crash
+         environment to collect information on a Xen hypervisor or dom0 crash.
+
+         If unsure, say Y.
+
 endmenu
-- 
2.4.10


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.