diff options
author | Daniel De Graaf <dgdegra@tycho.nsa.gov> | 2013-09-10 16:39:46 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2013-09-10 16:39:46 +0200 |
commit | 48d50de8e086e6669979889fb58dbf1092d10347 (patch) | |
tree | 738132c73e6e78cab75df57e02ada5d8ccd602bb /xen/common | |
parent | 30832c06a8d1f9caff0987654ef9e24d59469d9a (diff) | |
download | xen-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/common')
-rw-r--r-- | xen/common/domain.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/xen/common/domain.c b/xen/common/domain.c index 9390a22a6d..59997793a6 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -231,6 +231,8 @@ struct domain *domain_create( spin_lock_init(&d->shutdown_lock); d->shutdown_code = -1; + spin_lock_init(&d->pbuf_lock); + err = -ENOMEM; if ( !zalloc_cpumask_var(&d->domain_dirty_cpumask) ) goto fail; @@ -286,6 +288,10 @@ struct domain *domain_create( d->mem_event = xzalloc(struct mem_event_per_domain); if ( !d->mem_event ) goto fail; + + d->pbuf = xzalloc_array(char, DOMAIN_PBUF_SIZE); + if ( !d->pbuf ) + goto fail; } if ( (err = arch_domain_create(d, domcr_flags)) != 0 ) @@ -318,6 +324,7 @@ struct domain *domain_create( d->is_dying = DOMDYING_dead; atomic_set(&d->refcnt, DOMAIN_DESTROYED); xfree(d->mem_event); + xfree(d->pbuf); if ( init_status & INIT_arch ) arch_domain_destroy(d); if ( init_status & INIT_gnttab ) @@ -730,6 +737,7 @@ static void complete_domain_destroy(struct rcu_head *head) #endif xfree(d->mem_event); + xfree(d->pbuf); for ( i = d->max_vcpus - 1; i >= 0; i-- ) if ( (v = d->vcpu[i]) != NULL ) |