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
|