From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sasha Levin Subject: [PATCH] kvm tools: Print only serial output to the terminal Date: Wed, 10 Aug 2011 12:52:49 +0300 Message-ID: <1312969969-14433-1-git-send-email-levinsasha928@gmail.com> Cc: kvm@vger.kernel.org, mingo@elte.hu, asias.hejun@gmail.com, gorcunov@gmail.com, Sasha Levin To: penberg@kernel.org Return-path: Received: from mail-fx0-f46.google.com ([209.85.161.46]:44057 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753046Ab1HJJxx (ORCPT ); Wed, 10 Aug 2011 05:53:53 -0400 Received: by fxh19 with SMTP id 19so752754fxh.19 for ; Wed, 10 Aug 2011 02:53:52 -0700 (PDT) Sender: kvm-owner@vger.kernel.org List-ID: 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 --- 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