direct-io.hg
changeset 14287:38513d22d234
xen: Provide notification of console updates via VIRQ.
The readconsolering capabilities provide the opportunity to
provide console output to other clients (remote systems,
logging systems, etc). This patchs adds the ability to generate
a notification of a change in the console buffer.
Signed-off-by: Ben Thomas <ben@virtualiron.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
The readconsolering capabilities provide the opportunity to
provide console output to other clients (remote systems,
logging systems, etc). This patchs adds the ability to generate
a notification of a change in the console buffer.
Signed-off-by: Ben Thomas <ben@virtualiron.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
author | kfraser@localhost.localdomain |
---|---|
date | Thu Mar 08 15:21:10 2007 +0000 (2007-03-08) |
parents | 90e8d8169afd |
children | 7e2f7e8b63d3 dcec453681bc |
files | xen/common/event_channel.c xen/drivers/char/console.c xen/include/public/xen.h |
line diff
1.1 --- a/xen/common/event_channel.c Thu Mar 08 14:57:33 2007 +0000 1.2 +++ b/xen/common/event_channel.c Thu Mar 08 15:21:10 2007 +0000 1.3 @@ -560,6 +560,9 @@ void send_guest_global_virq(struct domai 1.4 1.5 ASSERT(virq_is_global(virq)); 1.6 1.7 + if ( unlikely(d == NULL) ) 1.8 + return; 1.9 + 1.10 v = d->vcpu[0]; 1.11 if ( unlikely(v == NULL) ) 1.12 return;
2.1 --- a/xen/drivers/char/console.c Thu Mar 08 14:57:33 2007 +0000 2.2 +++ b/xen/drivers/char/console.c Thu Mar 08 15:21:10 2007 +0000 2.3 @@ -399,6 +399,8 @@ static void __putstr(const char *str) 2.4 vga_putchar(c); 2.5 putchar_console_ring(c); 2.6 } 2.7 + 2.8 + send_guest_global_virq(dom0, VIRQ_CON_RING); 2.9 } 2.10 2.11 static int printk_prefix_check(char *p, char **pp)
3.1 --- a/xen/include/public/xen.h Thu Mar 08 14:57:33 2007 +0000 3.2 +++ b/xen/include/public/xen.h Thu Mar 08 15:21:10 2007 +0000 3.3 @@ -131,6 +131,7 @@ 3.4 #define VIRQ_TBUF 4 /* G. (DOM0) Trace buffer has records available. */ 3.5 #define VIRQ_DEBUGGER 6 /* G. (DOM0) A domain has paused for debugging. */ 3.6 #define VIRQ_XENOPROF 7 /* V. XenOprofile interrupt: new sample available */ 3.7 +#define VIRQ_CON_RING 8 /* G. (DOM0) Bytes received on console */ 3.8 3.9 /* Architecture-specific VIRQ definitions. */ 3.10 #define VIRQ_ARCH_0 16