ia64/xen-unstable

changeset 14414:e9ef0808c09f

Add boot option to allow console I/O to be placed into ring buffer

This option allows console I/O to be placed into the hypervisor
console ring buffer. When enabled, all output to the console
device will be reflected in the ring buffer. When disabled (the
default), only hypervisor output is available from the ring buffer.

Signed-off-by: Ben Thomas <ben@virtualiron.com>
author kfraser@localhost.localdomain
date Thu Mar 15 10:33:32 2007 +0000 (2007-03-15)
parents 30a83a0839bd
children aa6914c527e1
files docs/src/user.tex xen/drivers/char/console.c
line diff
     1.1 --- a/docs/src/user.tex	Wed Mar 14 23:26:33 2007 +0000
     1.2 +++ b/docs/src/user.tex	Thu Mar 15 10:33:32 2007 +0000
     1.3 @@ -3179,6 +3179,11 @@ editing \path{grub.conf}.
     1.4    one of 80x25, 80x28, 80x30, 80x34, 80x43, 80x50, 80x60.
     1.5    \item[ keep ] Keep the VGA console even after domain 0 boots.
     1.6    \end{description}
     1.7 +\item [ console\_to\_ring ] Place guest console output into the
     1.8 +  hypervisor console ring buffer. This is disabled by default.
     1.9 +  When enabled, both hypervisor output and guest console output
    1.10 +  is available from the ring buffer. This can be useful for logging
    1.11 +  and/or remote presentation of console data.
    1.12  \item [ sync\_console ] Force synchronous console output. This is
    1.13    useful if you system fails unexpectedly before it has sent all
    1.14    available output to the console. In most cases Xen will
     2.1 --- a/xen/drivers/char/console.c	Wed Mar 14 23:26:33 2007 +0000
     2.2 +++ b/xen/drivers/char/console.c	Thu Mar 15 10:33:32 2007 +0000
     2.3 @@ -48,6 +48,10 @@ string_param("conswitch", opt_conswitch)
     2.4  static int opt_sync_console;
     2.5  boolean_param("sync_console", opt_sync_console);
     2.6  
     2.7 +/* console_to_ring: send guest (incl. dom 0) console data to console ring. */
     2.8 +static int opt_console_to_ring;
     2.9 +boolean_param("console_to_ring", opt_console_to_ring);
    2.10 +
    2.11  #define CONRING_SIZE 16384
    2.12  #define CONRING_IDX_MASK(i) ((i)&(CONRING_SIZE-1))
    2.13  static char conring[CONRING_SIZE];
    2.14 @@ -329,7 +333,14 @@ static long guest_console_write(XEN_GUES
    2.15          sercon_puts(kbuf);
    2.16  
    2.17          for ( kptr = kbuf; *kptr != '\0'; kptr++ )
    2.18 +        {
    2.19              vga_putchar(*kptr);
    2.20 +            if ( opt_console_to_ring )
    2.21 +                putchar_console_ring(*kptr);
    2.22 +        }
    2.23 +
    2.24 +        if ( opt_console_to_ring )
    2.25 +            send_guest_global_virq(dom0, VIRQ_CON_RING);
    2.26  
    2.27          guest_handle_add_offset(buffer, kcount);
    2.28          count -= kcount;