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 compiler warnings in shadow mode debugging code

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Fix compiler warnings in shadow mode debugging code
From: Michael Vrable <mvrable@xxxxxxxxxxx>
Date: Thu, 29 Sep 2005 12:49:33 -0700
Delivery-date: Thu, 29 Sep 2005 19:47:11 +0000
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Mail-followup-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
The included patch fixes compilation failure due to a few compiler
warnings when shadow mode debugging/verbose logging is enabled.  It
should have no effect when debugging is disabled.

--Michael Vrable


# HG changeset patch
# User Michael Vrable <mvrable@xxxxxxxxxxx>
# Node ID cf61215c70b8978fdbee60e125b4503f937dafcc
# Parent  7f732bba3ed4a16fa8599a99b8a37ace90add049
Fix compiler warnings when shadow debugging is enabled.

Fix two classes of warnings when debugging of shadow code is enabled:
  - The type_info field in pfn_info is a long, so use a %lx format
    specifier when printing it.
  - Fix a warning about uninitialized use of eff_guest_pte.

Signed-off-by: Michael Vrable <mvrable@xxxxxxxxxxx>

diff -r 7f732bba3ed4 -r cf61215c70b8 xen/arch/x86/shadow32.c
--- a/xen/arch/x86/shadow32.c   Thu Sep 29 18:59:18 2005
+++ b/xen/arch/x86/shadow32.c   Thu Sep 29 19:14:48 2005
@@ -1836,7 +1836,7 @@
     }
 #endif
 
-    FSH_LOG("%s(gpfn=%lx, mfn=%lx) c=%08x t=%08x", __func__,
+    FSH_LOG("%s(gpfn=%lx, mfn=%lx) c=%08x t=%08lx", __func__,
             gpfn, mfn, page->count_info, page->u.inuse.type_info);
 
     // XXX this will require some more thought...  Cross-domain sharing and
@@ -3017,7 +3017,7 @@
     l1_pgentry_t guest_pte = *p_guest_pte;
     l1_pgentry_t shadow_pte = *p_shadow_pte;
     l1_pgentry_t snapshot_pte = p_snapshot_pte ? *p_snapshot_pte : l1e_empty();
-    l1_pgentry_t eff_guest_pte;
+    l1_pgentry_t eff_guest_pte = l1e_empty();
     unsigned long mask, eff_guest_pfn, eff_guest_mfn, shadow_mfn;
     int errors = 0, guest_writable;
     int page_table_page;
@@ -3074,7 +3074,7 @@
 
     if ( (l1e_get_flags(shadow_pte) & _PAGE_RW ) && !guest_writable )
     {
-        printk("eff_guest_pfn=%lx eff_guest_mfn=%lx shadow_mfn=%lx t=0x%08x 
page_table_page=%d\n",
+        printk("eff_guest_pfn=%lx eff_guest_mfn=%lx shadow_mfn=%lx t=%lx 
page_table_page=%d\n",
                eff_guest_pfn, eff_guest_mfn, shadow_mfn,
                frame_table[eff_guest_mfn].u.inuse.type_info,
                page_table_page);
@@ -3085,7 +3085,7 @@
          (l1e_get_flags(shadow_pte) & _PAGE_RW ) &&
          !(guest_writable && (l1e_get_flags(eff_guest_pte) & _PAGE_DIRTY)) )
     {
-        printk("eff_guest_pfn=%lx eff_guest_mfn=%lx shadow_mfn=%lx t=0x%08x 
page_table_page=%d\n",
+        printk("eff_guest_pfn=%lx eff_guest_mfn=%lx shadow_mfn=%lx t=%lx 
page_table_page=%d\n",
                eff_guest_pfn, eff_guest_mfn, shadow_mfn,
                frame_table[eff_guest_mfn].u.inuse.type_info,
                page_table_page);

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] Fix compiler warnings in shadow mode debugging code, Michael Vrable <=