xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: minios-devel@lists.xenproject.org, xen-devel@lists.xenproject.org
Cc: Juergen Gross <jgross@suse.com>,
	samuel.thibault@ens-lyon.org, wei.liu2@citrix.com
Subject: [PATCH] mini-os: add config item for printing via hypervisor
Date: Tue, 21 Nov 2017 16:15:09 +0100	[thread overview]
Message-ID: <20171121151509.2974-1-jgross@suse.com> (raw)

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>
---
 Config.mk                     | 2 ++
 arch/x86/testbuild/all-no     | 1 +
 arch/x86/testbuild/all-yes    | 1 +
 arch/x86/testbuild/newxen-yes | 1 +
 console/console.c             | 7 +------
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/Config.mk b/Config.mk
index 0baedd1..586dce0 100644
--- a/Config.mk
+++ b/Config.mk
@@ -180,6 +180,7 @@ CONFIG_XENBUS ?= y
 CONFIG_XC ?=y
 CONFIG_LWIP ?= $(lwip)
 CONFIG_BALLOON ?= n
+CONFIG_USE_XEN_CONSOLE ?= n
 
 # Export config items as compiler directives
 DEFINES-$(CONFIG_PARAVIRT) += -DCONFIG_PARAVIRT
@@ -197,6 +198,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)
 
diff --git a/arch/x86/testbuild/all-no b/arch/x86/testbuild/all-no
index 78720c3..1c50bba 100644
--- a/arch/x86/testbuild/all-no
+++ b/arch/x86/testbuild/all-no
@@ -16,3 +16,4 @@ CONFIG_XENBUS = n
 CONFIG_XC = n
 CONFIG_LWIP = n
 CONFIG_BALLOON = n
+CONFIG_USE_XEN_CONSOLE = n
diff --git a/arch/x86/testbuild/all-yes b/arch/x86/testbuild/all-yes
index 303c56b..8732e69 100644
--- a/arch/x86/testbuild/all-yes
+++ b/arch/x86/testbuild/all-yes
@@ -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
diff --git a/arch/x86/testbuild/newxen-yes b/arch/x86/testbuild/newxen-yes
index 907a8a0..9c30c00 100644
--- a/arch/x86/testbuild/newxen-yes
+++ b/arch/x86/testbuild/newxen-yes
@@ -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__
diff --git a/console/console.c b/console/console.c
index 2e04552..6a0b923 100644
--- a/console/console.c
+++ b/console/console.c
@@ -45,11 +45,6 @@
 #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);
-- 
2.12.3


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

             reply	other threads:[~2017-11-21 15:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-21 15:15 Juergen Gross [this message]
2017-11-21 21:33 ` [PATCH] mini-os: add config item for printing via hypervisor Samuel Thibault

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171121151509.2974-1-jgross@suse.com \
    --to=jgross@suse.com \
    --cc=minios-devel@lists.xenproject.org \
    --cc=samuel.thibault@ens-lyon.org \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).