[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] Avoid duplication of domainID in messages.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1197286900 0
# Node ID 8d5517355aa8acac51491ddac4a5aab4a0044221
# Parent  38a45b7c6cb59da250ff08235a007894310c3f3f
Avoid duplication of domainID in messages.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 xen/arch/x86/hvm/hvm.c     |    6 ++----
 xen/arch/x86/mm.c          |    8 +++-----
 xen/arch/x86/mm/paging.c   |    3 +--
 xen/arch/x86/traps.c       |   15 +++++++--------
 xen/common/event_channel.c |   18 +++++++++++++-----
 xen/common/schedule.c      |    6 +++---
 6 files changed, 29 insertions(+), 27 deletions(-)

diff -r 38a45b7c6cb5 -r 8d5517355aa8 xen/arch/x86/hvm/hvm.c
--- a/xen/arch/x86/hvm/hvm.c    Mon Dec 10 11:37:13 2007 +0000
+++ b/xen/arch/x86/hvm/hvm.c    Mon Dec 10 11:41:40 2007 +0000
@@ -533,8 +533,7 @@ static void hvm_vcpu_down(void)
     struct domain *d = v->domain;
     int online_count = 0;
 
-    gdprintk(XENLOG_INFO, "DOM%d/VCPU%d: going offline.\n",
-           d->domain_id, v->vcpu_id);
+    gdprintk(XENLOG_INFO, "VCPU%d: going offline.\n", v->vcpu_id);
 
     /* Doesn't halt us immediately, but we'll never return to guest context. */
     set_bit(_VPF_down, &v->pause_flags);
@@ -550,8 +549,7 @@ static void hvm_vcpu_down(void)
     /* ... Shut down the domain if not. */
     if ( online_count == 0 )
     {
-        gdprintk(XENLOG_INFO, "DOM%d: all CPUs offline -- powering off.\n",
-                d->domain_id);
+        gdprintk(XENLOG_INFO, "all CPUs offline -- powering off.\n");
         domain_shutdown(d, SHUTDOWN_poweroff);
     }
 }
diff -r 38a45b7c6cb5 -r 8d5517355aa8 xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c Mon Dec 10 11:37:13 2007 +0000
+++ b/xen/arch/x86/mm.c Mon Dec 10 11:41:40 2007 +0000
@@ -2028,8 +2028,7 @@ static int set_foreigndom(domid_t domid)
 
     if ( unlikely(domid == d->domain_id) )
     {
-        MEM_LOG("Dom %u tried to specify itself as foreign domain",
-                d->domain_id);
+        MEM_LOG("Cannot specify itself as foreign domain");
         okay = 0;
     }
     else if ( unlikely(paging_mode_translate(d)) )
@@ -2045,7 +2044,7 @@ static int set_foreigndom(domid_t domid)
             info->foreign = rcu_lock_domain(dom_io);
             break;
         default:
-            MEM_LOG("Dom %u cannot set foreign dom", d->domain_id);
+            MEM_LOG("Cannot set foreign dom");
             okay = 0;
             break;
         }
@@ -2336,8 +2335,7 @@ int do_mmuext_op(
 
             if ( paging_mode_external(d) )
             {
-                MEM_LOG("ignoring SET_LDT hypercall from external "
-                        "domain %u", d->domain_id);
+                MEM_LOG("ignoring SET_LDT hypercall from external domain");
                 okay = 0;
             }
             else if ( ((ptr & (PAGE_SIZE-1)) != 0) || 
diff -r 38a45b7c6cb5 -r 8d5517355aa8 xen/arch/x86/mm/paging.c
--- a/xen/arch/x86/mm/paging.c  Mon Dec 10 11:37:13 2007 +0000
+++ b/xen/arch/x86/mm/paging.c  Mon Dec 10 11:41:40 2007 +0000
@@ -512,8 +512,7 @@ int paging_domctl(struct domain *d, xen_
 
     if ( unlikely(d == current->domain) )
     {
-        gdprintk(XENLOG_INFO, "Dom %u tried to do a paging op on itself.\n",
-                 d->domain_id);
+        gdprintk(XENLOG_INFO, "Tried to do a paging op on itself.\n");
         return -EINVAL;
     }
 
diff -r 38a45b7c6cb5 -r 8d5517355aa8 xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c      Mon Dec 10 11:37:13 2007 +0000
+++ b/xen/arch/x86/traps.c      Mon Dec 10 11:41:40 2007 +0000
@@ -408,10 +408,9 @@ static int do_guest_trap(
         tb->flags |= TBF_INTERRUPT;
 
     if ( unlikely(null_trap_bounce(v, tb)) )
-        gdprintk(XENLOG_WARNING, "Unhandled %s fault/trap [#%d] in "
-                 "domain %d on VCPU %d [ec=%04x]\n",
-                 trapstr(trapnr), trapnr, v->domain->domain_id, v->vcpu_id,
-                 regs->error_code);
+        gdprintk(XENLOG_WARNING, "Unhandled %s fault/trap [#%d] "
+                 "on VCPU %d [ec=%04x]\n",
+                 trapstr(trapnr), trapnr, v->vcpu_id, regs->error_code);
 
     return 0;
 }
@@ -570,8 +569,8 @@ int wrmsr_hypervisor_regs(
         if ( idx > 0 )
         {
             gdprintk(XENLOG_WARNING,
-                    "Dom%d: Out of range index %u to MSR %08x\n",
-                    d->domain_id, idx, 0x40000000);
+                     "Out of range index %u to MSR %08x\n",
+                     idx, 0x40000000);
             return 0;
         }
 
@@ -581,8 +580,8 @@ int wrmsr_hypervisor_regs(
              !get_page_and_type(mfn_to_page(mfn), d, PGT_writable_page) )
         {
             gdprintk(XENLOG_WARNING,
-                    "Dom%d: Bad GMFN %lx (MFN %lx) to MSR %08x\n",
-                    d->domain_id, gmfn, mfn, 0x40000000);
+                     "Bad GMFN %lx (MFN %lx) to MSR %08x\n",
+                     gmfn, mfn, 0x40000000);
             return 0;
         }
 
diff -r 38a45b7c6cb5 -r 8d5517355aa8 xen/common/event_channel.c
--- a/xen/common/event_channel.c        Mon Dec 10 11:37:13 2007 +0000
+++ b/xen/common/event_channel.c        Mon Dec 10 11:41:40 2007 +0000
@@ -42,8 +42,16 @@
 #define ERROR_EXIT(_errno)                                          \
     do {                                                            \
         gdprintk(XENLOG_WARNING,                                    \
-                "EVTCHNOP failure: domain %d, error %d, line %d\n", \
-                current->domain->domain_id, (_errno), __LINE__);    \
+                "EVTCHNOP failure: error %d\n",                     \
+                (_errno));                                          \
+        rc = (_errno);                                              \
+        goto out;                                                   \
+    } while ( 0 )
+#define ERROR_EXIT_DOM(_errno, _dom)                                \
+    do {                                                            \
+        gdprintk(XENLOG_WARNING,                                    \
+                "EVTCHNOP failure: domain %d, error %d\n",          \
+                (_dom)->domain_id, (_errno));                       \
         rc = (_errno);                                              \
         goto out;                                                   \
     } while ( 0 )
@@ -132,7 +140,7 @@ static long evtchn_alloc_unbound(evtchn_
     spin_lock(&d->evtchn_lock);
 
     if ( (port = get_free_port(d)) < 0 )
-        ERROR_EXIT(port);
+        ERROR_EXIT_DOM(port, d);
     chn = evtchn_from_port(d, port);
 
     rc = xsm_evtchn_unbound(d, chn, alloc->remote_dom);
@@ -186,11 +194,11 @@ static long evtchn_bind_interdomain(evtc
     lchn = evtchn_from_port(ld, lport);
 
     if ( !port_is_valid(rd, rport) )
-        ERROR_EXIT(-EINVAL);
+        ERROR_EXIT_DOM(-EINVAL, rd);
     rchn = evtchn_from_port(rd, rport);
     if ( (rchn->state != ECS_UNBOUND) ||
          (rchn->u.unbound.remote_domid != ld->domain_id) )
-        ERROR_EXIT(-EINVAL);
+        ERROR_EXIT_DOM(-EINVAL, rd);
 
     rc = xsm_evtchn_interdomain(ld, lchn, rd, rchn);
     if ( rc )
diff -r 38a45b7c6cb5 -r 8d5517355aa8 xen/common/schedule.c
--- a/xen/common/schedule.c     Mon Dec 10 11:37:13 2007 +0000
+++ b/xen/common/schedule.c     Mon Dec 10 11:41:40 2007 +0000
@@ -524,9 +524,9 @@ 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.
          */
-        gdprintk(XENLOG_INFO, "Warning: huge timeout set by domain %d "
-                "(vcpu %d): %"PRIx64"\n",
-                v->domain->domain_id, v->vcpu_id, (uint64_t)timeout);
+        gdprintk(XENLOG_INFO,
+                 "Warning: huge timeout set by vcpu %d: %"PRIx64"\n",
+                 v->vcpu_id, (uint64_t)timeout);
         set_timer(&v->singleshot_timer, NOW() + MILLISECS(100));
     }
     else

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.