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

[Xen-bugs] [Bug 1087] New: message on console for level> 2 recursive pag

To: xen-bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-bugs] [Bug 1087] New: message on console for level> 2 recursive page table entry
From: bugzilla-daemon@xxxxxxxxxxxxxxxxxxx
Date: Wed, 17 Oct 2007 01:49:35 -0700
Delivery-date: Wed, 17 Oct 2007 01:50:06 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-bugs-request@lists.xensource.com?subject=help>
List-id: Xen Bugzilla <xen-bugs.lists.xensource.com>
List-post: <mailto:xen-bugs@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-bugs>, <mailto:xen-bugs-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-bugs>, <mailto:xen-bugs-request@lists.xensource.com?subject=unsubscribe>
Reply-to: bugs@xxxxxxxxxxxxxxxxxx
Sender: xen-bugs-bounces@xxxxxxxxxxxxxxxxxxx
http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1087

           Summary: message on console for level> 2 recursive page table
                    entry
           Product: Xen
           Version: unspecified
          Platform: x86-64
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Hypervisor
        AssignedTo: xen-bugs@xxxxxxxxxxxxxxxxxxx
        ReportedBy: bouyer@xxxxxxxxxx


Hi,
while working on NetBSD/amd64 support for Xen, I've found that Xen emits a
message on the serial console every time a L4 page table with recursive
mappings is checked:
(XEN) mm.c:1753:d10 Bad type (saw 0000000098000004 != exp 0000000060000000) for
mfn 23f5 (pfn 3da2)
On NetBSD, this means a message on every context switch.
I found that mm.c already had a check for L2 recursive mapping (which is
why I didn't see the problem with NetBSD/i386), but not for L3 or L4.
The patch below (now part of NetBSD pkgsrc) extends the check for L3 and L4
page tables.


$NetBSD: patch-ae,v 1.1 2007/10/16 20:31:57 bouyer Exp $

--- xen/arch/x86/mm.c.orig      2007-05-18 16:45:21.000000000 +0200
+++ xen/arch/x86/mm.c   2007-10-17 05:03:09.000000000 +0200
@@ -1741,15 +1741,26 @@
                     nx |= PGT_validated;
             }
         }
-        else if ( unlikely((x & (PGT_type_mask|PGT_pae_xen_l2)) != type) )
+        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)));
+           /*
+            * if it's a recursive mapping failure here is expected.
+            * Don't log it
+            */
+           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)) )


-- 
Configure bugmail: 
http://bugzilla.xensource.com/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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

<Prev in Thread] Current Thread [Next in Thread>