Received: from eggs.gnu.org ([140.186.70.92]:34968) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qdr1E-000778-F1 for qemu-devel@nongnu.org; Mon, 04 Jul 2011 17:49:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qdr1C-0003T3-GW for qemu-devel@nongnu.org; Mon, 04 Jul 2011 17:49:27 -0400 Received: from cantor2.suse.de ([195.135.220.15]:49829 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qdr1C-0003Sv-4o for qemu-devel@nongnu.org; Mon, 04 Jul 2011 17:49:26 -0400 From: Alexander Graf Date: Sun, 3 Jul 2011 17:10:40 +0200 Message-Id: <1309705840-14496-1-git-send-email-agraf@suse.de> Subject: [Qemu-devel] [PATCH] xen_console: fall back to qemu serial device List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "qemu-devel@nongnu.org Developers" Cc: Stefano Stabellini The new xen_console protocol changed the default xen_console output device from whatever Qemu chose to whatever xenstore choses and "pty" as fallback. This is not how Qemu works. It has its own serial redirection semantics. So it xenstore doesn't contain information on what to do, Qemu is the place to ask. Signed-off-by: Alexander Graf --- hw/xen_console.c | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/hw/xen_console.c b/hw/xen_console.c index bdb8540..8ef104c 100644 --- a/hw/xen_console.c +++ b/hw/xen_console.c @@ -196,12 +196,15 @@ static int con_init(struct XenDevice *xendev) } output = xenstore_read_str(con->console, "output"); - /* output is a pty by default */ + + /* no Xen override, use qemu output device */ if (output == NULL) { - output = "pty"; + con->chr = serial_hds[con->xendev.dev]; + } else { + snprintf(label, sizeof(label), "xencons%d", con->xendev.dev); + con->chr = qemu_chr_open(label, output, NULL); } - snprintf(label, sizeof(label), "xencons%d", con->xendev.dev); - con->chr = qemu_chr_open(label, output, NULL); + xenstore_store_pv_console_info(con->xendev.dev, con->chr); out: -- 1.6.0.2