public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kvm tools: Print only serial output to the terminal
@ 2011-08-10  9:52 Sasha Levin
  2011-08-10  9:58 ` Pekka Enberg
  2011-08-10 13:34 ` Pekka Enberg
  0 siblings, 2 replies; 15+ messages in thread
From: Sasha Levin @ 2011-08-10  9:52 UTC (permalink / raw)
  To: penberg; +Cc: kvm, mingo, asias.hejun, gorcunov, Sasha Levin

This patch changes the serial device to print only auxiliary output to the
terminal.

Doing so prevents printing output which the guest kernel never intended us
to print and by printing it we wrote junk to the users terminal.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
---
 tools/kvm/hw/serial.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/kvm/hw/serial.c b/tools/kvm/hw/serial.c
index 1199264..0393d3d 100644
--- a/tools/kvm/hw/serial.c
+++ b/tools/kvm/hw/serial.c
@@ -213,7 +213,7 @@ static bool serial8250_out(struct ioport *ioport, struct kvm *kvm, u16 port, voi
 		case UART_TX: {
 			char *addr = data;
 
-			if (!(dev->mcr & UART_MCR_LOOP))
+			if (!(dev->mcr & (UART_MCR_LOOP | UART_MCR_OUT2)))
 				term_putc(CONSOLE_8250, addr, size * count);
 
 			dev->iir		= UART_IIR_NO_INT;
-- 
1.7.6


^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2011-08-11 15:55 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-10  9:52 [PATCH] kvm tools: Print only serial output to the terminal Sasha Levin
2011-08-10  9:58 ` Pekka Enberg
2011-08-10 13:34 ` Pekka Enberg
2011-08-10 13:43   ` walimis
2011-08-10 15:06     ` Sasha Levin
2011-08-10 15:28       ` Pekka Enberg
2011-08-10 16:39   ` Asias He
2011-08-10 16:45     ` Pekka Enberg
2011-08-11  3:06       ` walimis
2011-08-11  8:56       ` Sasha Levin
2011-08-11 13:42         ` Pekka Enberg
2011-08-11 15:19           ` Sasha Levin
2011-08-11 15:14             ` walimis
2011-08-11 15:31               ` Sasha Levin
2011-08-11 15:55                 ` Pekka Enberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox