WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] Fix arguments passed to SHADOW_PRINTK

To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] Fix arguments passed to SHADOW_PRINTK
From: Yoshiaki Tamura <tamura.yoshiaki@xxxxxxxxxxxxx>
Date: Thu, 11 Sep 2008 19:44:03 +0900
Cc: Satoshi Moriai <moriai.satoshi@xxxxxxxxxxxxx>
Delivery-date: Thu, 11 Sep 2008 03:44:44 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.4 (Windows/20070604)
Hi.

When I compiled xen-3.3-testing with DEBUG_TRACE_DUMP in xen/include/xen/lib.h
turned on, I got some errors at SHADOW_PRINTK.
The following patch will fix the arguments passed to SHADOW_PRINTK in
xen/arch/x86/mm/shadow/common.c and xen/arch/x86/mm/shadow/multi.c.

Although I haven't tested, it is the same for xen-unstable.hg

Thanks,

Yoshi

Signed-off-by: Yoshi Tamura <tamura.yoshiaki@xxxxxxxxxxxxx>

diff -r bfd1157dd315 xen/arch/x86/mm/shadow/common.c
--- a/xen/arch/x86/mm/shadow/common.c   Thu Sep 11 08:06:48 2008 +0900
+++ b/xen/arch/x86/mm/shadow/common.c   Thu Sep 11 09:25:28 2008 +0900
@@ -701,7 +701,8 @@ static void _sh_resync(struct vcpu *v, m
     ASSERT(!sh_page_has_multiple_shadows(mfn_to_page(gmfn)));

     SHADOW_PRINTK("d=%d, v=%d, gmfn=%05lx, va=%lx\n",
-                  v->domain->domain_id, v->vcpu_id, mfn_x(gmfn), va);
+                  v->domain->domain_id, v->vcpu_id, mfn_x(gmfn),
+                  sh_map_domain_page(gmfn));

     /* Need to pull write access so the page *stays* in sync. */
     if ( oos_remove_write_access(v, gmfn, fixup) )
@@ -953,7 +954,8 @@ int sh_unsync(struct vcpu *v, mfn_t gmfn
     ASSERT(shadow_locked_by_me(v->domain));

     SHADOW_PRINTK("d=%d, v=%d, gmfn=%05lx va %lx\n",
-                  v->domain->domain_id, v->vcpu_id, mfn_x(gmfn), va);
+                  v->domain->domain_id, v->vcpu_id, mfn_x(gmfn),
+                  sh_map_domain_page(gmfn));

     pg = mfn_to_page(gmfn);

diff -r bfd1157dd315 xen/arch/x86/mm/shadow/multi.c
--- a/xen/arch/x86/mm/shadow/multi.c    Thu Sep 11 08:06:48 2008 +0900
+++ b/xen/arch/x86/mm/shadow/multi.c    Thu Sep 11 09:49:09 2008 +0900
@@ -3041,9 +3041,14 @@ static int sh_page_fault(struct vcpu *v,
     int fast_emul = 0;
 #endif

+#ifdef __x86_64__
     SHADOW_PRINTK("d:v=%u:%u va=%#lx err=%u, rip=%lx\n",
                   v->domain->domain_id, v->vcpu_id, va, regs->error_code,
                   regs->rip);
+#elif defined(__i386__)
+    SHADOW_PRINTK("d:v=%u:%u va=%#lx err=%u\n",
+                  v->domain->domain_id, v->vcpu_id, va, regs->error_code);
+#endif /* __i386__ */

     perfc_incr(shadow_fault);

-- 
TAMURA, Yoshiaki

NTT Cyber Space Labs
OSS Computing Project
Kernel Group
E-mail: tamura.yoshiaki@xxxxxxxxxxxxx
TEL: +81-46-859-2771
FAX: +81-46-855-1152
Address: 1-1 Hikarinooka, Yokosuka
         Kanagawa 239-0847 JAPAN

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