ia64/xen-unstable

changeset 10502:411a3c01bb40

[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@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Tue Jun 20 18:51:46 2006 +0100 (2006-06-20)
parents 967d4c65659a
children 59e05ddfd0ad
files docs/src/user.tex xen/arch/ia64/xen/domain.c xen/arch/ia64/xen/xensetup.c xen/arch/x86/setup.c xen/drivers/char/console.c xen/include/xen/console.h
line diff
     1.1 --- a/docs/src/user.tex	Tue Jun 20 18:28:41 2006 +0100
     1.2 +++ b/docs/src/user.tex	Tue Jun 20 18:51:46 2006 +0100
     1.3 @@ -1972,7 +1972,8 @@ editing \path{grub.conf}.
     1.4  \item [ console=$<$specifier list$>$ ] Specify the destination for Xen
     1.5    console I/O.  This is a comma-separated list of, for example:
     1.6    \begin{description}
     1.7 -  \item[ vga ] Use VGA console and allow keyboard input.
     1.8 +  \item[ vga ] Use VGA console (only until domain 0 boots, unless {\bf
     1.9 +  vga[keep] } is specified).
    1.10    \item[ com1 ] Use serial port com1.
    1.11    \item[ com2H ] Use serial port com2. Transmitted chars will have the
    1.12      MSB set. Received chars must have MSB set.
     2.1 --- a/xen/arch/ia64/xen/domain.c	Tue Jun 20 18:28:41 2006 +0100
     2.2 +++ b/xen/arch/ia64/xen/domain.c	Tue Jun 20 18:51:46 2006 +0100
     2.3 @@ -855,9 +855,7 @@ int construct_dom0(struct domain *d,
     2.4  	sprintf(si->magic, "xen-%i.%i-ia64", XEN_VERSION, XEN_SUBVERSION);
     2.5  	si->nr_pages     = max_pages;
     2.6  
     2.7 -	/* Give up the VGA console if DOM0 is configured to grab it. */
     2.8 -	if (cmdline != NULL)
     2.9 -	    console_endboot(strstr(cmdline, "tty0") != NULL);
    2.10 +	console_endboot();
    2.11  
    2.12  	printk("Dom0: 0x%lx\n", (u64)dom0);
    2.13  
     3.1 --- a/xen/arch/ia64/xen/xensetup.c	Tue Jun 20 18:28:41 2006 +0100
     3.2 +++ b/xen/arch/ia64/xen/xensetup.c	Tue Jun 20 18:51:46 2006 +0100
     3.3 @@ -511,9 +511,8 @@ printk("About to call domain_create()\n"
     3.4  printk("About to call init_trace_bufs()\n");
     3.5      init_trace_bufs();
     3.6  
     3.7 -    /* Give up the VGA console if DOM0 is configured to grab it. */
     3.8  #ifdef CONFIG_XEN_CONSOLE_INPUT	/* CONFIG_SERIAL_8250_CONSOLE=n in dom0! */
     3.9 -    console_endboot(cmdline && strstr(cmdline, "tty0"));
    3.10 +    console_endboot();
    3.11  #endif
    3.12  
    3.13      domain0_ready = 1;
     4.1 --- a/xen/arch/x86/setup.c	Tue Jun 20 18:28:41 2006 +0100
     4.2 +++ b/xen/arch/x86/setup.c	Tue Jun 20 18:51:46 2006 +0100
     4.3 @@ -598,8 +598,7 @@ void __init __start_xen(multiboot_info_t
     4.4  
     4.5      init_trace_bufs();
     4.6  
     4.7 -    /* Give up the VGA console if DOM0 is configured to grab it. */
     4.8 -    console_endboot(cmdline && strstr(cmdline, "tty0"));
     4.9 +    console_endboot();
    4.10  
    4.11      /* Hide UART from DOM0 if we're using it */
    4.12      serial_endboot();
     5.1 --- a/xen/drivers/char/console.c	Tue Jun 20 18:28:41 2006 +0100
     5.2 +++ b/xen/drivers/char/console.c	Tue Jun 20 18:51:46 2006 +0100
     5.3 @@ -476,7 +476,11 @@ void init_console(void)
     5.4          if ( strncmp(p, "com", 3) == 0 )
     5.5              sercon_handle = serial_parse_handle(p);
     5.6          else if ( strncmp(p, "vga", 3) == 0 )
     5.7 +        {
     5.8              vgacon_enabled = 1;
     5.9 +            if ( strncmp(p+3, "[keep]", 6) == 0 )
    5.10 +                vgacon_enabled++;
    5.11 +        }
    5.12      }
    5.13  
    5.14      init_vga();
    5.15 @@ -502,7 +506,7 @@ void init_console(void)
    5.16      }
    5.17  }
    5.18  
    5.19 -void console_endboot(int disable_vga)
    5.20 +void console_endboot(void)
    5.21  {
    5.22      int i, j;
    5.23  
    5.24 @@ -532,8 +536,12 @@ void console_endboot(int disable_vga)
    5.25          printk("\n");
    5.26      }
    5.27  
    5.28 -    if ( disable_vga )
    5.29 -        vgacon_enabled = 0;
    5.30 +    if ( vgacon_enabled )
    5.31 +    {
    5.32 +        vgacon_enabled--;
    5.33 +        printk("Xen is %s VGA console.\n",
    5.34 +               vgacon_enabled ? "keeping" : "relinquishing");
    5.35 +    }
    5.36  
    5.37      /*
    5.38       * If user specifies so, we fool the switch routine to redirect input
     6.1 --- a/xen/include/xen/console.h	Tue Jun 20 18:28:41 2006 +0100
     6.2 +++ b/xen/include/xen/console.h	Tue Jun 20 18:51:46 2006 +0100
     6.3 @@ -15,7 +15,7 @@ void set_printk_prefix(const char *prefi
     6.4  long read_console_ring(XEN_GUEST_HANDLE(char), u32 *, int);
     6.5  
     6.6  void init_console(void);
     6.7 -void console_endboot(int disable_vga);
     6.8 +void console_endboot(void);
     6.9  
    6.10  void console_force_unlock(void);
    6.11  void console_force_lock(void);