From: "Jan Beulich" Subject: [PATCH] avoid duplication of domain ID in messages Date: Mon, 10 Dec 2007 09:27:00 +0000 Message-ID: <475D1474.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org text doesn't need to repeat that. Signed-off-by: Jan Beulich Index: 2007-12-10/xen/arch/x86/hvm/hvm.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 2007-12-10.orig/xen/arch/x86/hvm/hvm.c 2007-12-10 09:19:12.0000000= 00 +0100 +++ 2007-12-10/xen/arch/x86/hvm/hvm.c 2007-12-10 09:22:53.000000000 = +0100 @@ -533,8 +533,7 @@ static void hvm_vcpu_down(void) struct domain *d =3D v->domain; int online_count =3D 0; =20 - 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); =20 /* 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 =3D=3D 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); } } Index: 2007-12-10/xen/arch/x86/mm.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 2007-12-10.orig/xen/arch/x86/mm.c 2007-12-05 17:13:57.000000000 = +0100 +++ 2007-12-10/xen/arch/x86/mm.c 2007-12-10 09:22:53.000000000 = +0100 @@ -2028,8 +2028,7 @@ static int set_foreigndom(domid_t domid) =20 if ( unlikely(domid =3D=3D 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 =3D 0; } else if ( unlikely(paging_mode_translate(d)) ) @@ -2045,7 +2044,7 @@ static int set_foreigndom(domid_t domid) info->foreign =3D 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 =3D 0; break; } @@ -2336,8 +2335,7 @@ int do_mmuext_op( =20 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 =3D 0; } else if ( ((ptr & (PAGE_SIZE-1)) !=3D 0) ||=20 Index: 2007-12-10/xen/arch/x86/mm/paging.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 2007-12-10.orig/xen/arch/x86/mm/paging.c 2007-11-26 16:57:03.0000000= 00 +0100 +++ 2007-12-10/xen/arch/x86/mm/paging.c 2007-12-10 09:22:53.000000000 = +0100 @@ -512,8 +512,7 @@ int paging_domctl(struct domain *d, xen_ =20 if ( unlikely(d =3D=3D 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; } =20 Index: 2007-12-10/xen/arch/x86/traps.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 2007-12-10.orig/xen/arch/x86/traps.c 2007-12-10 09:19:12.0000000= 00 +0100 +++ 2007-12-10/xen/arch/x86/traps.c 2007-12-10 09:24:04.000000000 = +0100 @@ -408,10 +408,9 @@ static int do_guest_trap( tb->flags |=3D TBF_INTERRUPT; =20 if ( unlikely(null_trap_bounce(v, tb)) ) - gdprintk(XENLOG_WARNING, "Unhandled %s fault/trap [#%d] in " - "domain %d on VCPU %d [ec=3D%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=3D%04x]\n", + trapstr(trapnr), trapnr, v->vcpu_id, regs->error_code); =20 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; } =20 @@ -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; } =20 Index: 2007-12-10/xen/common/event_channel.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 2007-12-10.orig/xen/common/event_channel.c 2007-09-10 09:59:37.0000000= 00 +0200 +++ 2007-12-10/xen/common/event_channel.c 2007-12-10 09:22:53.0000000= 00 +0100 @@ -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 =3D (_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 =3D (_errno); \ goto out; \ } while ( 0 ) @@ -132,7 +140,7 @@ static long evtchn_alloc_unbound(evtchn_ spin_lock(&d->evtchn_lock); =20 if ( (port =3D get_free_port(d)) < 0 ) - ERROR_EXIT(port); + ERROR_EXIT_DOM(port, d); chn =3D evtchn_from_port(d, port); =20 rc =3D xsm_evtchn_unbound(d, chn, alloc->remote_dom); @@ -186,11 +194,11 @@ static long evtchn_bind_interdomain(evtc lchn =3D evtchn_from_port(ld, lport); =20 if ( !port_is_valid(rd, rport) ) - ERROR_EXIT(-EINVAL); + ERROR_EXIT_DOM(-EINVAL, rd); rchn =3D evtchn_from_port(rd, rport); if ( (rchn->state !=3D ECS_UNBOUND) || (rchn->u.unbound.remote_domid !=3D ld->domain_id) ) - ERROR_EXIT(-EINVAL); + ERROR_EXIT_DOM(-EINVAL, rd); =20 rc =3D xsm_evtchn_interdomain(ld, lchn, rd, rchn); if ( rc ) Index: 2007-12-10/xen/common/schedule.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 2007-12-10.orig/xen/common/schedule.c 2007-09-27 10:42:44.0000000= 00 +0200 +++ 2007-12-10/xen/common/schedule.c 2007-12-10 09:22:53.000000000 = +0100 @@ -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