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-changelog

[Xen-changelog] [xen-3.1-testing] x86: Reduce logging about get_page_typ

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.1-testing] x86: Reduce logging about get_page_type() failures.
From: "Xen patchbot-3.1-testing" <patchbot-3.1-testing@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 19 Oct 2007 11:00:32 -0700
Delivery-date: Fri, 19 Oct 2007 11:01:35 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir@xxxxxxxxxxxxx>
# Date 1192616273 -3600
# Node ID f46b48179d84c00ce534002e63162e529883511d
# Parent  8296e765fa6800144550dc2b000a0073e803e985
x86: Reduce logging about get_page_type() failures.

We shouldn't log if the cause could be a recursive-mapping attempt --
we expect a get_page_type() failure in that case.

Based on a patch maintained for NetBSD.

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
xen-unstable changeset:   16124:d994e6d3136de94f50aeb86c4a060ee06ecfbf6d
xen-unstable date:        Wed Oct 17 11:17:53 2007 +0100
---
 xen/arch/x86/mm.c |   21 ++++++++++++++-------
 1 files changed, 14 insertions(+), 7 deletions(-)

diff -r 8296e765fa68 -r f46b48179d84 xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c Wed Oct 17 10:02:49 2007 +0100
+++ b/xen/arch/x86/mm.c Wed Oct 17 11:17:53 2007 +0100
@@ -1760,13 +1760,20 @@ int get_page_type(struct page_info *page
         }
         else if ( unlikely((x & (PGT_type_mask|PGT_pae_xen_l2)) != type) )
         {
-            if ( ((x & PGT_type_mask) != PGT_l2_page_table) ||
-                 (type != PGT_l1_page_table) )
-                MEM_LOG("Bad type (saw %" PRtype_info
-                        " != exp %" PRtype_info ") "
-                        "for mfn %lx (pfn %lx)",
-                        x, type, page_to_mfn(page),
-                        get_gpfn_from_mfn(page_to_mfn(page)));
+            /* Don't log failure if it could be a recursive-mapping attempt. */
+            if ( ((x & PGT_type_mask) == PGT_l2_page_table) &&
+                 (type == PGT_l1_page_table) )
+                return 0;
+            if ( ((x & PGT_type_mask) == PGT_l3_page_table) &&
+                 (type == PGT_l2_page_table) )
+                return 0;
+            if ( ((x & PGT_type_mask) == PGT_l4_page_table) &&
+                 (type == PGT_l3_page_table) )
+                return 0;
+            MEM_LOG("Bad type (saw %" PRtype_info " != exp %" PRtype_info ") "
+                    "for mfn %lx (pfn %lx)",
+                    x, type, page_to_mfn(page),
+                    get_gpfn_from_mfn(page_to_mfn(page)));
             return 0;
         }
         else if ( unlikely(!(x & PGT_validated)) )

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-3.1-testing] x86: Reduce logging about get_page_type() failures., Xen patchbot-3.1-testing <=