ia64/xen-unstable

changeset 16574:8d5517355aa8

Avoid duplication of domainID in messages.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Dec 10 11:41:40 2007 +0000 (2007-12-10)
parents 38a45b7c6cb5
children d4d3b2f1714d
files xen/arch/x86/hvm/hvm.c xen/arch/x86/mm.c xen/arch/x86/mm/paging.c xen/arch/x86/traps.c xen/common/event_channel.c xen/common/schedule.c
line diff
     1.1 --- a/xen/arch/x86/hvm/hvm.c	Mon Dec 10 11:37:13 2007 +0000
     1.2 +++ b/xen/arch/x86/hvm/hvm.c	Mon Dec 10 11:41:40 2007 +0000
     1.3 @@ -533,8 +533,7 @@ static void hvm_vcpu_down(void)
     1.4      struct domain *d = v->domain;
     1.5      int online_count = 0;
     1.6  
     1.7 -    gdprintk(XENLOG_INFO, "DOM%d/VCPU%d: going offline.\n",
     1.8 -           d->domain_id, v->vcpu_id);
     1.9 +    gdprintk(XENLOG_INFO, "VCPU%d: going offline.\n", v->vcpu_id);
    1.10  
    1.11      /* Doesn't halt us immediately, but we'll never return to guest context. */
    1.12      set_bit(_VPF_down, &v->pause_flags);
    1.13 @@ -550,8 +549,7 @@ static void hvm_vcpu_down(void)
    1.14      /* ... Shut down the domain if not. */
    1.15      if ( online_count == 0 )
    1.16      {
    1.17 -        gdprintk(XENLOG_INFO, "DOM%d: all CPUs offline -- powering off.\n",
    1.18 -                d->domain_id);
    1.19 +        gdprintk(XENLOG_INFO, "all CPUs offline -- powering off.\n");
    1.20          domain_shutdown(d, SHUTDOWN_poweroff);
    1.21      }
    1.22  }
     2.1 --- a/xen/arch/x86/mm.c	Mon Dec 10 11:37:13 2007 +0000
     2.2 +++ b/xen/arch/x86/mm.c	Mon Dec 10 11:41:40 2007 +0000
     2.3 @@ -2028,8 +2028,7 @@ static int set_foreigndom(domid_t domid)
     2.4  
     2.5      if ( unlikely(domid == d->domain_id) )
     2.6      {
     2.7 -        MEM_LOG("Dom %u tried to specify itself as foreign domain",
     2.8 -                d->domain_id);
     2.9 +        MEM_LOG("Cannot specify itself as foreign domain");
    2.10          okay = 0;
    2.11      }
    2.12      else if ( unlikely(paging_mode_translate(d)) )
    2.13 @@ -2045,7 +2044,7 @@ static int set_foreigndom(domid_t domid)
    2.14              info->foreign = rcu_lock_domain(dom_io);
    2.15              break;
    2.16          default:
    2.17 -            MEM_LOG("Dom %u cannot set foreign dom", d->domain_id);
    2.18 +            MEM_LOG("Cannot set foreign dom");
    2.19              okay = 0;
    2.20              break;
    2.21          }
    2.22 @@ -2336,8 +2335,7 @@ int do_mmuext_op(
    2.23  
    2.24              if ( paging_mode_external(d) )
    2.25              {
    2.26 -                MEM_LOG("ignoring SET_LDT hypercall from external "
    2.27 -                        "domain %u", d->domain_id);
    2.28 +                MEM_LOG("ignoring SET_LDT hypercall from external domain");
    2.29                  okay = 0;
    2.30              }
    2.31              else if ( ((ptr & (PAGE_SIZE-1)) != 0) || 
     3.1 --- a/xen/arch/x86/mm/paging.c	Mon Dec 10 11:37:13 2007 +0000
     3.2 +++ b/xen/arch/x86/mm/paging.c	Mon Dec 10 11:41:40 2007 +0000
     3.3 @@ -512,8 +512,7 @@ int paging_domctl(struct domain *d, xen_
     3.4  
     3.5      if ( unlikely(d == current->domain) )
     3.6      {
     3.7 -        gdprintk(XENLOG_INFO, "Dom %u tried to do a paging op on itself.\n",
     3.8 -                 d->domain_id);
     3.9 +        gdprintk(XENLOG_INFO, "Tried to do a paging op on itself.\n");
    3.10          return -EINVAL;
    3.11      }
    3.12  
     4.1 --- a/xen/arch/x86/traps.c	Mon Dec 10 11:37:13 2007 +0000
     4.2 +++ b/xen/arch/x86/traps.c	Mon Dec 10 11:41:40 2007 +0000
     4.3 @@ -408,10 +408,9 @@ static int do_guest_trap(
     4.4          tb->flags |= TBF_INTERRUPT;
     4.5  
     4.6      if ( unlikely(null_trap_bounce(v, tb)) )
     4.7 -        gdprintk(XENLOG_WARNING, "Unhandled %s fault/trap [#%d] in "
     4.8 -                 "domain %d on VCPU %d [ec=%04x]\n",
     4.9 -                 trapstr(trapnr), trapnr, v->domain->domain_id, v->vcpu_id,
    4.10 -                 regs->error_code);
    4.11 +        gdprintk(XENLOG_WARNING, "Unhandled %s fault/trap [#%d] "
    4.12 +                 "on VCPU %d [ec=%04x]\n",
    4.13 +                 trapstr(trapnr), trapnr, v->vcpu_id, regs->error_code);
    4.14  
    4.15      return 0;
    4.16  }
    4.17 @@ -570,8 +569,8 @@ int wrmsr_hypervisor_regs(
    4.18          if ( idx > 0 )
    4.19          {
    4.20              gdprintk(XENLOG_WARNING,
    4.21 -                    "Dom%d: Out of range index %u to MSR %08x\n",
    4.22 -                    d->domain_id, idx, 0x40000000);
    4.23 +                     "Out of range index %u to MSR %08x\n",
    4.24 +                     idx, 0x40000000);
    4.25              return 0;
    4.26          }
    4.27  
    4.28 @@ -581,8 +580,8 @@ int wrmsr_hypervisor_regs(
    4.29               !get_page_and_type(mfn_to_page(mfn), d, PGT_writable_page) )
    4.30          {
    4.31              gdprintk(XENLOG_WARNING,
    4.32 -                    "Dom%d: Bad GMFN %lx (MFN %lx) to MSR %08x\n",
    4.33 -                    d->domain_id, gmfn, mfn, 0x40000000);
    4.34 +                     "Bad GMFN %lx (MFN %lx) to MSR %08x\n",
    4.35 +                     gmfn, mfn, 0x40000000);
    4.36              return 0;
    4.37          }
    4.38  
     5.1 --- a/xen/common/event_channel.c	Mon Dec 10 11:37:13 2007 +0000
     5.2 +++ b/xen/common/event_channel.c	Mon Dec 10 11:41:40 2007 +0000
     5.3 @@ -42,8 +42,16 @@
     5.4  #define ERROR_EXIT(_errno)                                          \
     5.5      do {                                                            \
     5.6          gdprintk(XENLOG_WARNING,                                    \
     5.7 -                "EVTCHNOP failure: domain %d, error %d, line %d\n", \
     5.8 -                current->domain->domain_id, (_errno), __LINE__);    \
     5.9 +                "EVTCHNOP failure: error %d\n",                     \
    5.10 +                (_errno));                                          \
    5.11 +        rc = (_errno);                                              \
    5.12 +        goto out;                                                   \
    5.13 +    } while ( 0 )
    5.14 +#define ERROR_EXIT_DOM(_errno, _dom)                                \
    5.15 +    do {                                                            \
    5.16 +        gdprintk(XENLOG_WARNING,                                    \
    5.17 +                "EVTCHNOP failure: domain %d, error %d\n",          \
    5.18 +                (_dom)->domain_id, (_errno));                       \
    5.19          rc = (_errno);                                              \
    5.20          goto out;                                                   \
    5.21      } while ( 0 )
    5.22 @@ -132,7 +140,7 @@ static long evtchn_alloc_unbound(evtchn_
    5.23      spin_lock(&d->evtchn_lock);
    5.24  
    5.25      if ( (port = get_free_port(d)) < 0 )
    5.26 -        ERROR_EXIT(port);
    5.27 +        ERROR_EXIT_DOM(port, d);
    5.28      chn = evtchn_from_port(d, port);
    5.29  
    5.30      rc = xsm_evtchn_unbound(d, chn, alloc->remote_dom);
    5.31 @@ -186,11 +194,11 @@ static long evtchn_bind_interdomain(evtc
    5.32      lchn = evtchn_from_port(ld, lport);
    5.33  
    5.34      if ( !port_is_valid(rd, rport) )
    5.35 -        ERROR_EXIT(-EINVAL);
    5.36 +        ERROR_EXIT_DOM(-EINVAL, rd);
    5.37      rchn = evtchn_from_port(rd, rport);
    5.38      if ( (rchn->state != ECS_UNBOUND) ||
    5.39           (rchn->u.unbound.remote_domid != ld->domain_id) )
    5.40 -        ERROR_EXIT(-EINVAL);
    5.41 +        ERROR_EXIT_DOM(-EINVAL, rd);
    5.42  
    5.43      rc = xsm_evtchn_interdomain(ld, lchn, rd, rchn);
    5.44      if ( rc )
     6.1 --- a/xen/common/schedule.c	Mon Dec 10 11:37:13 2007 +0000
     6.2 +++ b/xen/common/schedule.c	Mon Dec 10 11:41:40 2007 +0000
     6.3 @@ -524,9 +524,9 @@ long do_set_timer_op(s_time_t timeout)
     6.4           * timeout in this case can burn a lot of CPU. We therefore go for a
     6.5           * reasonable middleground of triggering a timer event in 100ms.
     6.6           */
     6.7 -        gdprintk(XENLOG_INFO, "Warning: huge timeout set by domain %d "
     6.8 -                "(vcpu %d): %"PRIx64"\n",
     6.9 -                v->domain->domain_id, v->vcpu_id, (uint64_t)timeout);
    6.10 +        gdprintk(XENLOG_INFO,
    6.11 +                 "Warning: huge timeout set by vcpu %d: %"PRIx64"\n",
    6.12 +                 v->vcpu_id, (uint64_t)timeout);
    6.13          set_timer(&v->singleshot_timer, NOW() + MILLISECS(100));
    6.14      }
    6.15      else