From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pekka Enberg Subject: Re: [PATCH] kvm tools: Print only serial output to the terminal Date: Wed, 10 Aug 2011 16:34:53 +0300 (EEST) Message-ID: References: <1312969969-14433-1-git-send-email-levinsasha928@gmail.com> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: kvm@vger.kernel.org, mingo@elte.hu, asias.hejun@gmail.com, gorcunov@gmail.com To: Sasha Levin Return-path: Received: from mail-ey0-f174.google.com ([209.85.215.174]:39843 "EHLO mail-ey0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751440Ab1HJNfN (ORCPT ); Wed, 10 Aug 2011 09:35:13 -0400 Received: by eyx24 with SMTP id 24so800291eyx.19 for ; Wed, 10 Aug 2011 06:35:12 -0700 (PDT) In-Reply-To: <1312969969-14433-1-git-send-email-levinsasha928@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, 10 Aug 2011, Sasha Levin wrote: > 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 This doesn't seem to work for me. As soon as we switch to userspace, I don't get any output from serial console. > --- > 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 > >