WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [XEN] Xen always relinquishes VGA console

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XEN] Xen always relinquishes VGA console to domain0 when domain0
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 20 Jun 2006 21:40:21 +0000
Delivery-date: Tue, 20 Jun 2006 14:42:33 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 411a3c01bb40681731ad50fd3b8c5d7972baf36d
# Parent  967d4c65659a74d0609ffe482e57098c4e5b6955
[XEN] Xen always relinquishes VGA console to domain0 when domain0
starts to boot (previous behaviour looked for console=tty0 on
dom0's command line). To prevent this 'console=vga[keep]' must
be specified.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 docs/src/user.tex            |    3 ++-
 xen/arch/ia64/xen/domain.c   |    4 +---
 xen/arch/ia64/xen/xensetup.c |    3 +--
 xen/arch/x86/setup.c         |    3 +--
 xen/drivers/char/console.c   |   14 +++++++++++---
 xen/include/xen/console.h    |    2 +-
 6 files changed, 17 insertions(+), 12 deletions(-)

diff -r 967d4c65659a -r 411a3c01bb40 docs/src/user.tex
--- a/docs/src/user.tex Tue Jun 20 18:28:41 2006 +0100
+++ b/docs/src/user.tex Tue Jun 20 18:51:46 2006 +0100
@@ -1972,7 +1972,8 @@ editing \path{grub.conf}.
 \item [ console=$<$specifier list$>$ ] Specify the destination for Xen
   console I/O.  This is a comma-separated list of, for example:
   \begin{description}
-  \item[ vga ] Use VGA console and allow keyboard input.
+  \item[ vga ] Use VGA console (only until domain 0 boots, unless {\bf
+  vga[keep] } is specified).
   \item[ com1 ] Use serial port com1.
   \item[ com2H ] Use serial port com2. Transmitted chars will have the
     MSB set. Received chars must have MSB set.
diff -r 967d4c65659a -r 411a3c01bb40 xen/arch/ia64/xen/domain.c
--- a/xen/arch/ia64/xen/domain.c        Tue Jun 20 18:28:41 2006 +0100
+++ b/xen/arch/ia64/xen/domain.c        Tue Jun 20 18:51:46 2006 +0100
@@ -855,9 +855,7 @@ int construct_dom0(struct domain *d,
        sprintf(si->magic, "xen-%i.%i-ia64", XEN_VERSION, XEN_SUBVERSION);
        si->nr_pages     = max_pages;
 
-       /* Give up the VGA console if DOM0 is configured to grab it. */
-       if (cmdline != NULL)
-           console_endboot(strstr(cmdline, "tty0") != NULL);
+       console_endboot();
 
        printk("Dom0: 0x%lx\n", (u64)dom0);
 
diff -r 967d4c65659a -r 411a3c01bb40 xen/arch/ia64/xen/xensetup.c
--- a/xen/arch/ia64/xen/xensetup.c      Tue Jun 20 18:28:41 2006 +0100
+++ b/xen/arch/ia64/xen/xensetup.c      Tue Jun 20 18:51:46 2006 +0100
@@ -511,9 +511,8 @@ printk("About to call init_trace_bufs()\
 printk("About to call init_trace_bufs()\n");
     init_trace_bufs();
 
-    /* Give up the VGA console if DOM0 is configured to grab it. */
 #ifdef CONFIG_XEN_CONSOLE_INPUT        /* CONFIG_SERIAL_8250_CONSOLE=n in 
dom0! */
-    console_endboot(cmdline && strstr(cmdline, "tty0"));
+    console_endboot();
 #endif
 
     domain0_ready = 1;
diff -r 967d4c65659a -r 411a3c01bb40 xen/arch/x86/setup.c
--- a/xen/arch/x86/setup.c      Tue Jun 20 18:28:41 2006 +0100
+++ b/xen/arch/x86/setup.c      Tue Jun 20 18:51:46 2006 +0100
@@ -598,8 +598,7 @@ void __init __start_xen(multiboot_info_t
 
     init_trace_bufs();
 
-    /* Give up the VGA console if DOM0 is configured to grab it. */
-    console_endboot(cmdline && strstr(cmdline, "tty0"));
+    console_endboot();
 
     /* Hide UART from DOM0 if we're using it */
     serial_endboot();
diff -r 967d4c65659a -r 411a3c01bb40 xen/drivers/char/console.c
--- a/xen/drivers/char/console.c        Tue Jun 20 18:28:41 2006 +0100
+++ b/xen/drivers/char/console.c        Tue Jun 20 18:51:46 2006 +0100
@@ -476,7 +476,11 @@ void init_console(void)
         if ( strncmp(p, "com", 3) == 0 )
             sercon_handle = serial_parse_handle(p);
         else if ( strncmp(p, "vga", 3) == 0 )
+        {
             vgacon_enabled = 1;
+            if ( strncmp(p+3, "[keep]", 6) == 0 )
+                vgacon_enabled++;
+        }
     }
 
     init_vga();
@@ -502,7 +506,7 @@ void init_console(void)
     }
 }
 
-void console_endboot(int disable_vga)
+void console_endboot(void)
 {
     int i, j;
 
@@ -532,8 +536,12 @@ void console_endboot(int disable_vga)
         printk("\n");
     }
 
-    if ( disable_vga )
-        vgacon_enabled = 0;
+    if ( vgacon_enabled )
+    {
+        vgacon_enabled--;
+        printk("Xen is %s VGA console.\n",
+               vgacon_enabled ? "keeping" : "relinquishing");
+    }
 
     /*
      * If user specifies so, we fool the switch routine to redirect input
diff -r 967d4c65659a -r 411a3c01bb40 xen/include/xen/console.h
--- a/xen/include/xen/console.h Tue Jun 20 18:28:41 2006 +0100
+++ b/xen/include/xen/console.h Tue Jun 20 18:51:46 2006 +0100
@@ -15,7 +15,7 @@ long read_console_ring(XEN_GUEST_HANDLE(
 long read_console_ring(XEN_GUEST_HANDLE(char), u32 *, int);
 
 void init_console(void);
-void console_endboot(int disable_vga);
+void console_endboot(void);
 
 void console_force_unlock(void);
 void console_force_lock(void);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [XEN] Xen always relinquishes VGA console to domain0 when domain0, Xen patchbot-unstable <=