aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include
diff options
context:
space:
mode:
authorDaniel De Graaf <dgdegra@tycho.nsa.gov>2013-09-10 16:39:46 +0200
committerJan Beulich <jbeulich@suse.com>2013-09-10 16:39:46 +0200
commit48d50de8e086e6669979889fb58dbf1092d10347 (patch)
tree738132c73e6e78cab75df57e02ada5d8ccd602bb /xen/include
parent30832c06a8d1f9caff0987654ef9e24d59469d9a (diff)
downloadxen-48d50de8e086e6669979889fb58dbf1092d10347.tar.gz
xen-48d50de8e086e6669979889fb58dbf1092d10347.tar.bz2
xen-48d50de8e086e6669979889fb58dbf1092d10347.zip
console: buffer and show origin of guest PV writes
Guests other than domain 0 using the console output have previously been controlled by the VERBOSE #define, but with no designation of which guest's output was on the console. This patch converts the HVM output buffering to be used by all domains except the hardware domain (dom0): stripping non-printable characters, line buffering the output, and prefixing it with the domain ID. This is especially useful for debugging stub domains during early boot. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/include')
-rw-r--r--xen/include/asm-x86/hvm/domain.h6
-rw-r--r--xen/include/xen/lib.h2
-rw-r--r--xen/include/xen/sched.h6
3 files changed, 8 insertions, 6 deletions
diff --git a/xen/include/asm-x86/hvm/domain.h b/xen/include/asm-x86/hvm/domain.h
index 27b3de50dc..b1e31871cc 100644
--- a/xen/include/asm-x86/hvm/domain.h
+++ b/xen/include/asm-x86/hvm/domain.h
@@ -62,12 +62,6 @@ struct hvm_domain {
/* emulated irq to pirq */
struct radix_tree_root emuirq_pirq;
- /* hvm_print_line() logging. */
-#define HVM_PBUF_SIZE 80
- char *pbuf;
- int pbuf_idx;
- spinlock_t pbuf_lock;
-
uint64_t *params;
/* Memory ranges with pinned cache attributes. */
diff --git a/xen/include/xen/lib.h b/xen/include/xen/lib.h
index 74b34eb932..4768b0e1dc 100644
--- a/xen/include/xen/lib.h
+++ b/xen/include/xen/lib.h
@@ -83,6 +83,8 @@ extern void debugtrace_printk(const char *fmt, ...);
#define _p(_x) ((void *)(unsigned long)(_x))
extern void printk(const char *format, ...)
__attribute__ ((format (printf, 1, 2)));
+extern void guest_printk(const struct domain *d, const char *format, ...)
+ __attribute__ ((format (printf, 2, 3)));
extern void panic(const char *format, ...)
__attribute__ ((format (printf, 1, 2)));
extern long vm_assist(struct domain *, unsigned int, unsigned int);
diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
index ae6a3b843b..0013a8d8ce 100644
--- a/xen/include/xen/sched.h
+++ b/xen/include/xen/sched.h
@@ -341,6 +341,12 @@ struct domain
/* Control-plane tools handle for this domain. */
xen_domain_handle_t handle;
+ /* hvm_print_line() and guest_console_write() logging. */
+#define DOMAIN_PBUF_SIZE 80
+ char *pbuf;
+ unsigned pbuf_idx;
+ spinlock_t pbuf_lock;
+
/* OProfile support. */
struct xenoprof *xenoprof;
int32_t time_offset_seconds;