aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkaf24@localhost.localdomain <kaf24@localhost.localdomain>2006-10-27 18:55:16 +0100
committerkaf24@localhost.localdomain <kaf24@localhost.localdomain>2006-10-27 18:55:16 +0100
commit3d4d4e683ac1c37d525ffdc19470c1f8fc103ab9 (patch)
tree7b51831eadb8e970043de81e257324a23f5e812e
parent909fc982871a8887ee5b171d3e36f0f33af07e19 (diff)
downloadxen-3d4d4e683ac1c37d525ffdc19470c1f8fc103ab9.tar.gz
xen-3d4d4e683ac1c37d525ffdc19470c1f8fc103ab9.tar.bz2
xen-3d4d4e683ac1c37d525ffdc19470c1f8fc103ab9.zip
[XEN] Logging parameters for common code.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
-rw-r--r--xen/common/event_channel.c3
-rw-r--r--xen/common/grant_table.c50
-rw-r--r--xen/common/memory.c10
-rw-r--r--xen/common/multicall.c2
-rw-r--r--xen/common/page_alloc.c5
-rw-r--r--xen/common/schedule.c2
-rw-r--r--xen/common/trace.c2
7 files changed, 42 insertions, 32 deletions
diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c
index e333144cf2..d929fbcf41 100644
--- a/xen/common/event_channel.c
+++ b/xen/common/event_channel.c
@@ -40,7 +40,8 @@
#define ERROR_EXIT(_errno) \
do { \
- DPRINTK("EVTCHNOP failure: domain %d, error %d, line %d\n", \
+ DPRINTK(XENLOG_G_WARNING \
+ "EVTCHNOP failure: domain %d, error %d, line %d\n", \
current->domain->domain_id, (_errno), __LINE__); \
rc = (_errno); \
goto out; \
diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c
index 0e98628bd2..c31bf5f4b9 100644
--- a/xen/common/grant_table.c
+++ b/xen/common/grant_table.c
@@ -47,7 +47,7 @@ union grant_combo {
#define PIN_FAIL(_lbl, _rc, _f, _a...) \
do { \
- DPRINTK( _f, ## _a ); \
+ DPRINTK( XENLOG_G_WARNING _f, ## _a ); \
rc = (_rc); \
goto _lbl; \
} while ( 0 )
@@ -109,7 +109,8 @@ __gnttab_map_grant_ref(
if ( unlikely(op->ref >= NR_GRANT_ENTRIES) ||
unlikely((op->flags & (GNTMAP_device_map|GNTMAP_host_map)) == 0) )
{
- DPRINTK("Bad ref (%d) or flags (%x).\n", op->ref, op->flags);
+ DPRINTK(XENLOG_G_INFO "Bad ref (%d) or flags (%x).\n",
+ op->ref, op->flags);
op->status = GNTST_bad_gntref;
return;
}
@@ -124,7 +125,7 @@ __gnttab_map_grant_ref(
{
if ( rd != NULL )
put_domain(rd);
- DPRINTK("Could not find domain %d\n", op->dom);
+ DPRINTK(XENLOG_G_INFO "Could not find domain %d\n", op->dom);
op->status = GNTST_bad_domain;
return;
}
@@ -139,7 +140,7 @@ __gnttab_map_grant_ref(
if ( (lgt->maptrack_limit << 1) > MAPTRACK_MAX_ENTRIES )
{
put_domain(rd);
- DPRINTK("Maptrack table is at maximum size.\n");
+ DPRINTK(XENLOG_G_INFO "Maptrack table is at maximum size.\n");
op->status = GNTST_no_device_space;
return;
}
@@ -149,7 +150,7 @@ __gnttab_map_grant_ref(
if ( new_mt == NULL )
{
put_domain(rd);
- DPRINTK("No more map handles available.\n");
+ DPRINTK(XENLOG_G_INFO "No more map handles available.\n");
op->status = GNTST_no_device_space;
return;
}
@@ -166,7 +167,7 @@ __gnttab_map_grant_ref(
lgt->maptrack_order += 1;
lgt->maptrack_limit <<= 1;
- DPRINTK("Doubled maptrack size\n");
+ DPRINTK(XENLOG_G_INFO "Doubled maptrack size\n");
handle = get_maptrack_handle(ld->grant_table);
}
@@ -353,7 +354,7 @@ __gnttab_unmap_grant_ref(
if ( unlikely(op->handle >= ld->grant_table->maptrack_limit) ||
unlikely(!map->flags) )
{
- DPRINTK("Bad handle (%d).\n", op->handle);
+ DPRINTK(XENLOG_G_INFO "Bad handle (%d).\n", op->handle);
op->status = GNTST_bad_handle;
return;
}
@@ -366,7 +367,7 @@ __gnttab_unmap_grant_ref(
{
if ( rd != NULL )
put_domain(rd);
- DPRINTK("Could not find domain %d\n", dom);
+ DPRINTK(XENLOG_G_INFO "Could not find domain %d\n", dom);
op->status = GNTST_bad_domain;
return;
}
@@ -486,13 +487,14 @@ gnttab_setup_table(
if ( unlikely(copy_from_guest(&op, uop, 1) != 0) )
{
- DPRINTK("Fault while reading gnttab_setup_table_t.\n");
+ DPRINTK(XENLOG_G_INFO "Fault while reading gnttab_setup_table_t.\n");
return -EFAULT;
}
if ( unlikely(op.nr_frames > NR_GRANT_FRAMES) )
{
- DPRINTK("Xen only supports up to %d grant-table frames per domain.\n",
+ DPRINTK(XENLOG_G_INFO "Xen only supports up to %d grant-table frames"
+ " per domain.\n",
NR_GRANT_FRAMES);
op.status = GNTST_general_error;
goto out;
@@ -511,7 +513,7 @@ gnttab_setup_table(
if ( unlikely((d = find_domain_by_id(dom)) == NULL) )
{
- DPRINTK("Bad domid %d.\n", dom);
+ DPRINTK(XENLOG_G_INFO "Bad domid %d.\n", dom);
op.status = GNTST_bad_domain;
goto out;
}
@@ -549,7 +551,7 @@ gnttab_prepare_for_transfer(
if ( unlikely((rgt = rd->grant_table) == NULL) ||
unlikely(ref >= NR_GRANT_ENTRIES) )
{
- DPRINTK("Dom %d has no g.t., or ref is bad (%d).\n",
+ DPRINTK(XENLOG_G_INFO "Dom %d has no g.t., or ref is bad (%d).\n",
rd->domain_id, ref);
return 0;
}
@@ -565,7 +567,8 @@ gnttab_prepare_for_transfer(
if ( unlikely(scombo.shorts.flags != GTF_accept_transfer) ||
unlikely(scombo.shorts.domid != ld->domain_id) )
{
- DPRINTK("Bad flags (%x) or dom (%d). (NB. expected dom %d)\n",
+ DPRINTK(XENLOG_G_INFO "Bad flags (%x) or dom (%d). "
+ "(NB. expected dom %d)\n",
scombo.shorts.flags, scombo.shorts.domid,
ld->domain_id);
goto fail;
@@ -581,7 +584,7 @@ gnttab_prepare_for_transfer(
if ( retries++ == 4 )
{
- DPRINTK("Shared grant entry is unstable.\n");
+ DPRINTK(XENLOG_G_WARNING "Shared grant entry is unstable.\n");
goto fail;
}
@@ -613,7 +616,8 @@ gnttab_transfer(
/* Read from caller address space. */
if ( unlikely(__copy_from_guest_offset(&gop, uop, i, 1)) )
{
- DPRINTK("gnttab_transfer: error reading req %d/%d\n", i, count);
+ DPRINTK(XENLOG_G_INFO "gnttab_transfer: error reading req %d/%d\n",
+ i, count);
return -EFAULT;
}
@@ -622,7 +626,7 @@ gnttab_transfer(
/* Check the passed page frame for basic validity. */
if ( unlikely(!mfn_valid(mfn)) )
{
- DPRINTK("gnttab_transfer: out-of-range %lx\n",
+ DPRINTK(XENLOG_G_INFO "gnttab_transfer: out-of-range %lx\n",
(unsigned long)gop.mfn);
gop.status = GNTST_bad_page;
goto copyback;
@@ -631,7 +635,7 @@ gnttab_transfer(
page = mfn_to_page(mfn);
if ( unlikely(IS_XEN_HEAP_FRAME(page)) )
{
- DPRINTK("gnttab_transfer: xen frame %lx\n",
+ DPRINTK(XENLOG_G_INFO "gnttab_transfer: xen frame %lx\n",
(unsigned long)gop.mfn);
gop.status = GNTST_bad_page;
goto copyback;
@@ -646,7 +650,8 @@ gnttab_transfer(
/* Find the target domain. */
if ( unlikely((e = find_domain_by_id(gop.domid)) == NULL) )
{
- DPRINTK("gnttab_transfer: can't find domain %d\n", gop.domid);
+ DPRINTK(XENLOG_G_INFO "gnttab_transfer: can't find domain %d\n",
+ gop.domid);
page->count_info &= ~(PGC_count_mask|PGC_allocated);
free_domheap_page(page);
gop.status = GNTST_bad_domain;
@@ -665,7 +670,8 @@ gnttab_transfer(
unlikely(!gnttab_prepare_for_transfer(e, d, gop.ref)) )
{
if ( !test_bit(_DOMF_dying, &e->domain_flags) )
- DPRINTK("gnttab_transfer: Transferee has no reservation "
+ DPRINTK(XENLOG_G_INFO "gnttab_transfer: "
+ "Transferee has no reservation "
"headroom (%d,%d) or provided a bad grant ref (%08x) "
"or is dying (%lx)\n",
e->tot_pages, e->max_pages, gop.ref, e->domain_flags);
@@ -701,7 +707,8 @@ gnttab_transfer(
copyback:
if ( unlikely(__copy_to_guest_offset(uop, i, &gop, 1)) )
{
- DPRINTK("gnttab_transfer: error writing resp %d/%d\n", i, count);
+ DPRINTK(XENLOG_G_INFO "gnttab_transfer: error writing resp %d/%d\n",
+ i, count);
return -EFAULT;
}
}
@@ -1090,7 +1097,8 @@ gnttab_release_mappings(
ref = map->ref;
- DPRINTK("Grant release (%hu) ref:(%hu) flags:(%x) dom:(%hu)\n",
+ DPRINTK(XENLOG_G_INFO "Grant release (%hu) ref:(%hu) "
+ "flags:(%x) dom:(%hu)\n",
handle, ref, map->flags, map->domid);
rd = find_domain_by_id(map->domid);
diff --git a/xen/common/memory.c b/xen/common/memory.c
index 9ab62a48ec..6f80cd2ff8 100644
--- a/xen/common/memory.c
+++ b/xen/common/memory.c
@@ -63,7 +63,7 @@ increase_reservation(
if ( unlikely((page = __alloc_domheap_pages( d, cpu,
extent_order, memflags )) == NULL) )
{
- DPRINTK("Could not allocate order=%d extent: "
+ DPRINTK(XENLOG_G_INFO "Could not allocate order=%d extent: "
"id=%d memflags=%x (%ld of %d)\n",
extent_order, d->domain_id, memflags, i, nr_extents);
return i;
@@ -118,7 +118,7 @@ populate_physmap(
if ( unlikely((page = __alloc_domheap_pages( d, cpu,
extent_order, memflags )) == NULL) )
{
- DPRINTK("Could not allocate order=%d extent: "
+ DPRINTK(XENLOG_G_INFO "Could not allocate order=%d extent: "
"id=%d memflags=%x (%ld of %d)\n",
extent_order, d->domain_id, memflags, i, nr_extents);
goto out;
@@ -157,7 +157,7 @@ guest_remove_page(
mfn = gmfn_to_mfn(d, gmfn);
if ( unlikely(!mfn_valid(mfn)) )
{
- DPRINTK("Domain %u page number %lx invalid\n",
+ DPRINTK(XENLOG_G_INFO "Domain %u page number %lx invalid\n",
d->domain_id, gmfn);
return 0;
}
@@ -165,7 +165,7 @@ guest_remove_page(
page = mfn_to_page(mfn);
if ( unlikely(!get_page(page, d)) )
{
- DPRINTK("Bad page free for domain %u\n", d->domain_id);
+ DPRINTK(XENLOG_G_INFO "Bad page free for domain %u\n", d->domain_id);
return 0;
}
@@ -178,7 +178,7 @@ guest_remove_page(
if ( unlikely(!page_is_removable(page)) )
{
/* We'll make this a guest-visible error in future, so take heed! */
- DPRINTK("Dom%d freeing in-use page %lx (pseudophys %lx):"
+ DPRINTK(XENLOG_G_INFO "Dom%d freeing in-use page %lx (pseudophys %lx):"
" count=%lx type=%lx\n",
d->domain_id, mfn, get_gpfn_from_mfn(mfn),
(unsigned long)page->count_info, page->u.inuse.type_info);
diff --git a/xen/common/multicall.c b/xen/common/multicall.c
index 7ba43ebd64..0b54889cf6 100644
--- a/xen/common/multicall.c
+++ b/xen/common/multicall.c
@@ -24,7 +24,7 @@ do_multicall(
if ( unlikely(__test_and_set_bit(_MCSF_in_multicall, &mcs->flags)) )
{
- DPRINTK("Multicall reentry is disallowed.\n");
+ DPRINTK(XENLOG_G_INFO "Multicall reentry is disallowed.\n");
return -EINVAL;
}
diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
index f4a1adc274..8db7ea9b68 100644
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -599,7 +599,8 @@ int assign_pages(
if ( unlikely(test_bit(_DOMF_dying, &d->domain_flags)) )
{
- DPRINTK("Cannot assign page to domain%d -- dying.\n", d->domain_id);
+ DPRINTK(XENLOG_G_INFO "Cannot assign page to domain%d -- dying.\n",
+ d->domain_id);
goto fail;
}
@@ -607,7 +608,7 @@ int assign_pages(
{
if ( unlikely((d->tot_pages + (1 << order)) > d->max_pages) )
{
- DPRINTK("Over-allocation for domain %u: %u > %u\n",
+ DPRINTK(XENLOG_G_INFO "Over-allocation for domain %u: %u > %u\n",
d->domain_id, d->tot_pages + (1 << order), d->max_pages);
goto fail;
}
diff --git a/xen/common/schedule.c b/xen/common/schedule.c
index fc2a927e2b..aa36ac849d 100644
--- a/xen/common/schedule.c
+++ b/xen/common/schedule.c
@@ -468,7 +468,7 @@ long do_set_timer_op(s_time_t timeout)
* timeout in this case can burn a lot of CPU. We therefore go for a
* reasonable middleground of triggering a timer event in 100ms.
*/
- DPRINTK("Warning: huge timeout set by domain %d (vcpu %d):"
+ DPRINTK(XENLOG_G_INFO "Warning: huge timeout set by domain %d (vcpu %d):"
" %"PRIx64"\n",
v->domain->domain_id, v->vcpu_id, (uint64_t)timeout);
set_timer(&v->timer, NOW() + MILLISECS(100));
diff --git a/xen/common/trace.c b/xen/common/trace.c
index 5f40a6b9d2..3c367dd54e 100644
--- a/xen/common/trace.c
+++ b/xen/common/trace.c
@@ -131,7 +131,7 @@ static int tb_set_size(int size)
*/
if ( (opt_tbuf_size != 0) || (size <= 0) )
{
- DPRINTK("tb_set_size from %d to %d not implemented\n",
+ DPRINTK(XENLOG_G_INFO "tb_set_size from %d to %d not implemented\n",
opt_tbuf_size, size);
return -EINVAL;
}