All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Vrable <mvrable@cs.ucsd.edu>
To: xen-devel@lists.xensource.com
Subject: [PATCH] Fix compiler warnings in shadow mode debugging code
Date: Thu, 29 Sep 2005 12:49:33 -0700	[thread overview]
Message-ID: <20050929194933.GA14689@vrable.net> (raw)

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@cs.ucsd.edu>
# 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@cs.ucsd.edu>

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);

                 reply	other threads:[~2005-09-29 19:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050929194933.GA14689@vrable.net \
    --to=mvrable@cs.ucsd.edu \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.