[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen stable-4.10] x86/guest: use PV console for Xen/Dom0 I/O
commit aa96a59dc2290fc3084525659282a59b29eff1d5 Author: Sergey Dyasli <sergey.dyasli@xxxxxxxxxx> AuthorDate: Fri Nov 24 11:21:17 2017 +0000 Commit: Roger Pau Monne <roger.pau@xxxxxxxxxx> CommitDate: Thu Jan 11 17:51:19 2018 +0000 x86/guest: use PV console for Xen/Dom0 I/O Signed-off-by: Sergey Dyasli <sergey.dyasli@xxxxxxxxxx> Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> --- docs/misc/xen-command-line.markdown | 5 ++++- xen/arch/x86/guest/xen.c | 3 +++ xen/drivers/char/console.c | 16 ++++++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) 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 59871170c8..d4968b47aa 100644 --- a/xen/arch/x86/guest/xen.c +++ b/xen/arch/x86/guest/xen.c @@ -23,6 +23,7 @@ #include <xen/pfn.h> #include <xen/rangeset.h> #include <xen/types.h> +#include <xen/pv_console.h> #include <asm/apic.h> #include <asm/e820.h> @@ -194,6 +195,8 @@ static void xen_evtchn_upcall(struct cpu_user_regs *regs) vcpu_info->evtchn_upcall_pending = 0; write_atomic(&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 d05ebf9f70..8acd358395 100644 --- a/xen/drivers/char/console.c +++ b/xen/drivers/char/console.c @@ -32,6 +32,7 @@ #include <xen/warning.h> #ifdef CONFIG_X86 +#include <xen/pv_console.h> #include <asm/guest.h> #endif @@ -344,6 +345,11 @@ static void sercon_puts(const char *s) (*serial_steal_fn)(s); else serial_puts(sercon_handle, s); + +#ifdef CONFIG_X86 + /* Copy all serial output into PV console */ + pv_console_puts(s); +#endif } static void dump_console_ring_key(unsigned char key) @@ -805,6 +811,8 @@ void __init console_init_preirq(void) if ( !strncmp(p, "vga", 3) ) video_init(); #ifdef CONFIG_X86 + else if ( !strncmp(p, "pv", 2) ) + pv_console_init(); else if ( !strncmp(p, "xen", 3) ) opt_console_xen = true; #endif @@ -828,6 +836,10 @@ void __init console_init_preirq(void) serial_set_rx_handler(sercon_handle, serial_rx); +#ifdef CONFIG_X86 + pv_console_set_rx_handler(serial_rx); +#endif + /* HELLO WORLD --- start-of-day banner text. */ spin_lock(&console_lock); __putstr(xen_banner()); @@ -880,6 +892,10 @@ void __init console_init_postirq(void) { serial_init_postirq(); +#ifdef CONFIG_X86 + pv_console_init_postirq(); +#endif + if ( conring != _conring ) return; -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.10 _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |