]> xenbits.xensource.com Git - mini-os.git/commitdiff
mini-os: add config item for printing via hypervisor
authorJuergen Gross <jgross@suse.com>
Wed, 22 Nov 2017 07:59:32 +0000 (08:59 +0100)
committerWei Liu <wei.liu2@citrix.com>
Tue, 13 Feb 2018 11:43:40 +0000 (11:43 +0000)
Today Mini-OS will print all console output via the hypervisor, too.

Make this behavior configurable instead and default it to "off".

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Config.mk
arch/x86/testbuild/all-no
arch/x86/testbuild/all-yes
arch/x86/testbuild/newxen-yes
console/console.c

index 0baedd1a7c37f608c7781ecd71cc3557902e7b84..f6a2afa00cf2ffee2058a4de0732e9a3e56c9ccd 100644 (file)
--- a/Config.mk
+++ b/Config.mk
@@ -180,6 +180,9 @@ CONFIG_XENBUS ?= y
 CONFIG_XC ?=y
 CONFIG_LWIP ?= $(lwip)
 CONFIG_BALLOON ?= n
+# Setting CONFIG_USE_XEN_CONSOLE copies all print output to the Xen emergency
+# console apart of standard dom0 handled console.
+CONFIG_USE_XEN_CONSOLE ?= n
 
 # Export config items as compiler directives
 DEFINES-$(CONFIG_PARAVIRT) += -DCONFIG_PARAVIRT
@@ -197,6 +200,7 @@ DEFINES-$(CONFIG_FBFRONT) += -DCONFIG_FBFRONT
 DEFINES-$(CONFIG_CONSFRONT) += -DCONFIG_CONSFRONT
 DEFINES-$(CONFIG_XENBUS) += -DCONFIG_XENBUS
 DEFINES-$(CONFIG_BALLOON) += -DCONFIG_BALLOON
+DEFINES-$(CONFIG_USE_XEN_CONSOLE) += -DCONFIG_USE_XEN_CONSOLE
 
 DEFINES-y += -D__XEN_INTERFACE_VERSION__=$(XEN_INTERFACE_VERSION)
 
index 78720c3d4cbd292492f5ac38081e11b322f60e05..1c50bbab6d319a7f4563e6bd697891fc66a9dba8 100644 (file)
@@ -16,3 +16,4 @@ CONFIG_XENBUS = n
 CONFIG_XC = n
 CONFIG_LWIP = n
 CONFIG_BALLOON = n
+CONFIG_USE_XEN_CONSOLE = n
index 303c56b75ca677068c57db37eb57909fe24efb2e..8732e691c84796192dcaf4ba57db27e9c5fbeed3 100644 (file)
@@ -17,3 +17,4 @@ CONFIG_XC = y
 # LWIP is special: it needs support from outside
 CONFIG_LWIP = n
 CONFIG_BALLOON = y
+CONFIG_USE_XEN_CONSOLE = y
index 907a8a07896ebc24bed258f37c09e56909e51404..9c30c008ee5b19ae88ba7b69ac0426945369c1e7 100644 (file)
@@ -17,4 +17,5 @@ CONFIG_XC = y
 # LWIP is special: it needs support from outside
 CONFIG_LWIP = n
 CONFIG_BALLOON = y
+CONFIG_USE_XEN_CONSOLE = y
 XEN_INTERFACE_VERSION=__XEN_LATEST_INTERFACE_VERSION__
index 2e045526f4411516bcdaba8c2f7d9c0c3ab62884..6a0b923b4b9b3a8ebf577d4e14e4621ca1f4a933 100644 (file)
 #include <xen/io/console.h>
 
 
-/* Copies all print output to the Xen emergency console apart
-   of standard dom0 handled console */
-#define USE_XEN_CONSOLE
-
-
 /* If console not initialised the printk will be sent to xen serial line 
    NOTE: you need to enable verbose in xen/Rules.mk for it to work. */
 static int console_initialised = 0;
@@ -135,7 +130,7 @@ void print(int direct, const char *fmt, va_list args)
         (void)HYPERVISOR_console_io(CONSOLEIO_write, strlen(buf), buf);
         return;
     } else {
-#ifndef USE_XEN_CONSOLE
+#ifndef CONFIG_USE_XEN_CONSOLE
     if(!console_initialised)
 #endif    
             (void)HYPERVISOR_console_io(CONSOLEIO_write, strlen(buf), buf);