Date: Tue, 24 Dec 2013 12:20:55 +0100 From: Roger Pau Monne <roger.pau@citrix.com> To: <freebsd-xen@freebsd.org>, <freebsd-current@freebsd.org>, <xen-devel@lists.xenproject.org>, <gibbs@freebsd.org>, <jhb@freebsd.org>, <kib@freebsd.org>, <julien.grall@citrix.com> Subject: [PATCH RFC 06/13] xen: Dom0 console fixes Message-ID: <1387884062-41154-7-git-send-email-roger.pau@citrix.com> In-Reply-To: <1387884062-41154-1-git-send-email-roger.pau@citrix.com> References: <1387884062-41154-1-git-send-email-roger.pau@citrix.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Minor fixes and workarounds to make the Xen Dom0 console work. --- sys/dev/xen/console/xencons_ring.c | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/sys/dev/xen/console/xencons_ring.c b/sys/dev/xen/console/xencons_ring.c index d826363..ea97f7b 100644 --- a/sys/dev/xen/console/xencons_ring.c +++ b/sys/dev/xen/console/xencons_ring.c @@ -48,6 +48,9 @@ xencons_has_input(void) { struct xencons_interface *intf; + if (xen_initial_domain()) + return 1; + intf = xencons_interface(); return (intf->in_cons != intf->in_prod); @@ -97,6 +100,19 @@ xencons_handle_input(void *unused) XENCONS_RING_IDX cons, prod; CN_LOCK(cn_mtx); + + if (xen_initial_domain()) { + /* XXX: read from console */ + static char rbuf[16]; + int l; + + while ((l = HYPERVISOR_console_io(CONSOLEIO_read, 16, rbuf)) > 0) + xencons_rx(rbuf, l); + + CN_UNLOCK(cn_mtx); + return; + } + intf = xencons_interface(); cons = intf->in_cons; -- 1.7.7.5 (Apple Git-26)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1387884062-41154-7-git-send-email-roger.pau>