From: walimis Subject: Re: [PATCH] kvm tools: Print only serial output to the terminal Date: Wed, 10 Aug 2011 21:43:09 +0800 Message-ID: <20110810134309.GA26871@walimis-desktop> References: <1312969969-14433-1-git-send-email-levinsasha928@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Sasha Levin , kvm@vger.kernel.org, mingo@elte.hu, asias.hejun@gmail.com, gorcunov@gmail.com To: Pekka Enberg Return-path: Received: from mail-qy0-f181.google.com ([209.85.216.181]:34281 "EHLO mail-qy0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751594Ab1HJN7U (ORCPT ); Wed, 10 Aug 2011 09:59:20 -0400 Received: by qyk34 with SMTP id 34so627580qyk.19 for ; Wed, 10 Aug 2011 06:59:20 -0700 (PDT) Content-Disposition: inline In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Aug 10, 2011 at 04:34:53PM +0300, Pekka Enberg wrote: >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. It works for me. walimis > >>--- >>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 >> >> >-- >To unsubscribe from this list: send the line "unsubscribe kvm" in >the body of a message to majordomo@vger.kernel.org >More majordomo info at http://vger.kernel.org/majordomo-info.html