build: convert verbose to Kconfig
authorDoug Goldstein <cardoe@cardoe.com>
Wed, 8 Jun 2016 12:09:55 +0000 (14:09 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 8 Jun 2016 12:09:55 +0000 (14:09 +0200)
Convert 'verbose', which was enabled by 'debug=y' to Kconfig as
CONFIG_VERBOSE_DEBUG which is enabled by default when CONFIG_DEBUG is
enabled.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Julien Grall <julien.grall@arm.com>
Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
INSTALL
xen/Kconfig.debug
xen/Rules.mk
xen/arch/arm/kernel.c
xen/arch/x86/domain_build.c
xen/include/xsm/dummy.h

diff --git a/INSTALL b/INSTALL
index 2974b9b7f1279251890756c7af3809cd941c9033..35668bd8e15a137dbefdf4c77010c805cc6d109d 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -227,7 +227,6 @@ VGABIOS_REL_DATE="dd Mon yyyy"
 
 The following variables can be used to tweak some aspects of the
 hypervisor build.
-verbose=y
 perfc=y
 perfc_arrays=y
 lock_profile=y
index 8eeb13fe269862d2c4a61ecb8dccf22c1e4e84fa..fb11c5675f67ed5a426ec2278d15e4e60b83020b 100644 (file)
@@ -20,6 +20,13 @@ config CRASH_DEBUG
          If you want to attach gdb to Xen to debug Xen if it crashes
          then say Y.
 
+config VERBOSE_DEBUG
+       bool "Verbose debug messages"
+       default DEBUG
+       ---help---
+         Guest output from HYPERVISOR_console_io and hypervisor parsing
+         ELF images (dom0) will be logged in the Xen ring buffer.
+
 endif # DEBUG || EXPERT
 
 endmenu
index b077e25b22961220c4d99bdd56681592b242e929..2a93ef7d3f8a83008ec5ba55f0d5d3fff35046eb 100644 (file)
@@ -3,7 +3,6 @@
 # If you change any of these configuration options then you must
 # 'make clean' before rebuilding.
 #
-verbose       ?= n
 perfc         ?= n
 perfc_arrays  ?= n
 lock_profile  ?= n
@@ -17,7 +16,6 @@ include $(XEN_ROOT)/Config.mk
 # Hardcoded configuration implications and dependencies.
 # Do this is a neater way if it becomes unwieldy.
 ifeq ($(debug),y)
-verbose       := y
 frame_pointer := y
 endif
 ifeq ($(perfc_arrays),y)
@@ -33,6 +31,9 @@ endif
 ifneq ($(origin kexec),undefined)
 $(error "You must use 'make menuconfig' to enable/disable kexec now.")
 endif
+ifneq ($(origin verbose),undefined)
+$(error "You must use 'make menuconfig' to enable/disable verbose now.")
+endif
 
 # Set ARCH/SUBARCH appropriately.
 override TARGET_SUBARCH  := $(XEN_TARGET_ARCH)
@@ -60,7 +61,6 @@ ifneq ($(clang),y)
 CFLAGS += -Wa,--strip-local-absolute
 endif
 
-CFLAGS-$(verbose)       += -DVERBOSE
 CFLAGS-$(perfc)         += -DPERF_COUNTERS
 CFLAGS-$(perfc_arrays)  += -DPERF_ARRAYS
 CFLAGS-$(lock_profile)  += -DLOCK_PROFILE
index 9871bd93c269078e75c55db787c979c20f9c8004..3f6cce3e1a58fcd3cd68891f393a57a2aacf711d 100644 (file)
@@ -472,7 +472,7 @@ static int kernel_elf_probe(struct kernel_info *info,
 
     if ( (rc = elf_init(&info->elf.elf, info->elf.kernel_img, size )) != 0 )
         goto err;
-#ifdef VERBOSE
+#ifdef CONFIG_VERBOSE_DEBUG
     elf_set_verbose(&info->elf.elf);
 #endif
     elf_parse_binary(&info->elf.elf);
index f9a3eca429b0f8b365f32379f7413e0393f0c57b..b29c3772db57ba0b67ea6969803a90c816ee679e 100644 (file)
@@ -942,7 +942,7 @@ int __init construct_dom0(
 
     if ( (rc = elf_init(&elf, image_start, image_len)) != 0 )
         return rc;
-#ifdef VERBOSE
+#ifdef CONFIG_VERBOSE_DEBUG
     elf_set_verbose(&elf);
 #endif
     elf_parse_binary(&elf);
index abbe28219b97114d8a30a244d209ca9c094b49de..406cd1887c46d4ce5006e835259a4766b2370dca 100644 (file)
@@ -215,7 +215,7 @@ static XSM_INLINE int xsm_memory_stat_reservation(XSM_DEFAULT_ARG struct domain
 static XSM_INLINE int xsm_console_io(XSM_DEFAULT_ARG struct domain *d, int cmd)
 {
     XSM_ASSERT_ACTION(XSM_OTHER);
-#ifdef VERBOSE
+#ifdef CONFIG_VERBOSE_DEBUG
     if ( cmd == CONSOLEIO_write )
         return xsm_default_action(XSM_HOOK, d, NULL);
 #endif