[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH RFC v1 35/74] x86/guest: use PV console for Xen/Dom0 I/O
From: Sergey Dyasli <sergey.dyasli@xxxxxxxxxx> Signed-off-by: Sergey Dyasli <sergey.dyasli@xxxxxxxxxx> --- docs/misc/xen-command-line.markdown | 5 ++++- xen/arch/x86/guest/xen.c | 3 +++ xen/drivers/char/console.c | 10 +++++++++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/docs/misc/xen-command-line.markdown b/docs/misc/xen-command-line.markdown index e5979bceee..da006dd4f7 100644 --- a/docs/misc/xen-command-line.markdown +++ b/docs/misc/xen-command-line.markdown @@ -365,7 +365,7 @@ The following are examples of correct specifications: Specify the size of the console ring buffer. ### console -> `= List of [ vga | com1[H,L] | com2[H,L] | dbgp | none ]` +> `= List of [ vga | com1[H,L] | com2[H,L] | pv | dbgp | none ]` > Default: `console=com1,vga` @@ -381,6 +381,9 @@ the converse; transmitted and received characters will have their MSB cleared. This allows a single port to be shared by two subsystems (e.g. console and debugger). +`pv` indicates that Xen should use Xen's PV console. This option is +only available when used together with `pv-in-pvh`. + `dbgp` indicates that Xen should use a USB debug port. `none` indicates that Xen should not use a console. This option only diff --git a/xen/arch/x86/guest/xen.c b/xen/arch/x86/guest/xen.c index 781bfa493b..0319a5f9e8 100644 --- a/xen/arch/x86/guest/xen.c +++ b/xen/arch/x86/guest/xen.c @@ -20,6 +20,7 @@ */ #include <xen/init.h> #include <xen/types.h> +#include <xen/pv_console.h> #include <asm/apic.h> #include <asm/guest.h> @@ -101,6 +102,8 @@ static void xen_evtchn_upcall(struct cpu_user_regs *regs) vcpu_info->evtchn_upcall_pending = 0; xchg(&vcpu_info->evtchn_pending_sel, 0); + pv_console_rx(regs); + ack_APIC_irq(); } diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c index 51c1454b8e..354e020d19 100644 --- a/xen/drivers/char/console.c +++ b/xen/drivers/char/console.c @@ -16,6 +16,7 @@ #include <xen/event.h> #include <xen/console.h> #include <xen/serial.h> +#include <xen/pv_console.h> #include <xen/softirq.h> #include <xen/keyhandler.h> #include <xen/guest_access.h> @@ -339,6 +340,9 @@ static void sercon_puts(const char *s) (*serial_steal_fn)(s); else serial_puts(sercon_handle, s); + + /* Copy all serial output into PV console */ + pv_console_puts(s); } static void dump_console_ring_key(unsigned char key) @@ -791,7 +795,9 @@ void __init console_init_preirq(void) { if ( *p == ',' ) p++; - if ( !strncmp(p, "vga", 3) ) + if ( !strncmp(p, "pv", 2) ) + pv_console_init(); + else if ( !strncmp(p, "vga", 3) ) video_init(); else if ( !strncmp(p, "xen", 3) ) opt_console_xen = true; @@ -814,6 +820,7 @@ void __init console_init_preirq(void) } serial_set_rx_handler(sercon_handle, serial_rx); + pv_console_set_rx_handler(serial_rx); /* HELLO WORLD --- start-of-day banner text. */ spin_lock(&console_lock); @@ -866,6 +873,7 @@ void __init console_init_ring(void) void __init console_init_postirq(void) { serial_init_postirq(); + pv_console_init_postirq(); if ( conring != _conring ) return; -- 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |