summaryrefslogtreecommitdiffstats
path: root/sys/dev/xen/console/xencons_ring.h
diff options
context:
space:
mode:
authorroyger <royger@FreeBSD.org>2015-10-08 16:39:43 +0000
committerroyger <royger@FreeBSD.org>2015-10-08 16:39:43 +0000
commit375ecc42dee993e895968c47a125336d3205abcb (patch)
tree4d554b6933c62f969ce512c3c8dce2e0ef744afd /sys/dev/xen/console/xencons_ring.h
parent0412e2f18cedb7c9016cfa6c110f6ed609b8b3cc (diff)
downloadFreeBSD-src-375ecc42dee993e895968c47a125336d3205abcb.zip
FreeBSD-src-375ecc42dee993e895968c47a125336d3205abcb.tar.gz
xen/console: Introduce a new console driver for Xen guest
The current Xen console driver is crashing very quickly when using it on an ARM guest. This is because the console lock is recursive and it may lead to recursion on the tty lock and/or corrupt the ring pointer. Furthermore, the console lock is not always taken where it should be and has to be released too early because of the way the console has been designed. Over the years, code has been modified to support various new features but the driver has not been reworked. This new driver has been rewritten with the idea of only having a small set of specific function to write either via the shared ring or the hypercall interface. Note that HVM support has been left aside for now because it requires additional features which are not yet supported. A follow-up patch will be sent with HVM guest support. List of items that may be good to have but not mandatory: - Avoid to flush for each character written when using the tty - Support multiple consoles Submitted by: Julien Grall <julien.grall@citrix.com> Reviewed by: royger Differential Revision: https://reviews.freebsd.org/D3698 Sponsored by: Citrix Systems R&D
Diffstat (limited to 'sys/dev/xen/console/xencons_ring.h')
-rw-r--r--sys/dev/xen/console/xencons_ring.h31
1 files changed, 0 insertions, 31 deletions
diff --git a/sys/dev/xen/console/xencons_ring.h b/sys/dev/xen/console/xencons_ring.h
deleted file mode 100644
index 7e3a64c..0000000
--- a/sys/dev/xen/console/xencons_ring.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * $FreeBSD$
- *
- */
-#ifndef _XENCONS_RING_H
-#define _XENCONS_RING_H
-
-#define CN_LOCK(l) \
- do { \
- if (panicstr == NULL) \
- mtx_lock_spin(&(l)); \
- } while (0)
-#define CN_UNLOCK(l) \
- do { \
- if (panicstr == NULL) \
- mtx_unlock_spin(&(l)); \
- } while (0)
-
-int xencons_ring_init(void);
-int xencons_ring_send(const char *data, unsigned len);
-void xencons_rx(char *buf, unsigned len);
-void xencons_tx(void);
-
-
-typedef void (xencons_receiver_func)(char *buf, unsigned len);
-void xencons_ring_register_receiver(xencons_receiver_func *f);
-
-void xencons_handle_input(void *unused);
-int xencons_has_input(void);
-
-#endif /* _XENCONS_RING_H */
OpenPOWER on IntegriCloud