From patchwork Wed Aug 10 15:28:37 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pekka Enberg X-Patchwork-Id: 1054332 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p7AFSn7J018129 for ; Wed, 10 Aug 2011 15:28:49 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753106Ab1HJP2q (ORCPT ); Wed, 10 Aug 2011 11:28:46 -0400 Received: from mail-bw0-f46.google.com ([209.85.214.46]:48555 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750922Ab1HJP2q (ORCPT ); Wed, 10 Aug 2011 11:28:46 -0400 Received: by bke11 with SMTP id 11so395258bke.19 for ; Wed, 10 Aug 2011 08:28:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:date:from:x-x-sender:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version:content-type; bh=xGX3B1q0EklIVhK6AYUkHwK6jCopiW17hVvEYY46hSg=; b=g9u6ZEJCrLg+u0nLwpYp27QS1q0G1xKUfeHuqtXEgk7rn/ErmJZTgQTRNn1jJexPSC JHDy87QtzQr22qhBKou37SKgXn6UHYX08NvLfR1VLgl7v+ZoluLhDQY8W14WFebqubMM K6bflta+zAqJsiKg1Ze9hT7IJd3C+2ouCZzHA= Received: by 10.204.148.89 with SMTP id o25mr2303670bkv.261.1312990124920; Wed, 10 Aug 2011 08:28:44 -0700 (PDT) Received: from tiger.local (cs181136138.pp.htv.fi [82.181.136.138]) by mx.google.com with ESMTPS id sz1sm270182bkb.25.2011.08.10.08.28.42 (version=SSLv3 cipher=OTHER); Wed, 10 Aug 2011 08:28:43 -0700 (PDT) Date: Wed, 10 Aug 2011 18:28:37 +0300 (EEST) From: Pekka Enberg X-X-Sender: penberg@tiger To: Sasha Levin cc: walimis , kvm@vger.kernel.org, mingo@elte.hu, asias.hejun@gmail.com, gorcunov@gmail.com Subject: Re: [PATCH] kvm tools: Print only serial output to the terminal In-Reply-To: <1312988801.15665.0.camel@lappy> Message-ID: References: <1312969969-14433-1-git-send-email-levinsasha928@gmail.com> <20110810134309.GA26871@walimis-desktop> <1312988801.15665.0.camel@lappy> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Wed, 10 Aug 2011 15:28:49 +0000 (UTC) On Wed, 10 Aug 2011, Sasha Levin wrote: > Pekka, could you check whats the MCR value when your guest is writing > from usermode? MCR: b MCR: b MCR: b MCR: b MCR: b MCR: b MCR: b MCR: b MCR: b MCR: b # KVM session terminated. diff --git a/tools/kvm/hw/serial.c b/tools/kvm/hw/serial.c index 1199264..44d9439 100644 --- a/tools/kvm/hw/serial.c +++ b/tools/kvm/hw/serial.c @@ -213,8 +213,10 @@ 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); + else + printf("MCR: %x\n", dev->mcr); dev->iir = UART_IIR_NO_INT; break;