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-unstable] linux/i386: enhance dump_fault_path() in

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] linux/i386: enhance dump_fault_path() in the highpte case
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 17 Jan 2007 10:40:11 -0800
Delivery-date: Wed, 17 Jan 2007 10:40:40 -0800
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 kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1169045100 0
# Node ID 84b7639a3bd4713fac7b92dfea7dcd7835e7fd6b
# Parent  0fd65225e4c637883622f871d9328425a237e12c
linux/i386: enhance dump_fault_path() in the highpte case

As long as the pte page isn't really located in highmem, there is no
reason to not access it, in order to print the complete page table
hierarchy. A functionally similar patch will go to lkml for native
Linux.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 linux-2.6-xen-sparse/arch/i386/mm/fault-xen.c |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

diff -r 0fd65225e4c6 -r 84b7639a3bd4 
linux-2.6-xen-sparse/arch/i386/mm/fault-xen.c
--- a/linux-2.6-xen-sparse/arch/i386/mm/fault-xen.c     Wed Jan 17 14:37:45 
2007 +0000
+++ b/linux-2.6-xen-sparse/arch/i386/mm/fault-xen.c     Wed Jan 17 14:45:00 
2007 +0000
@@ -232,9 +232,12 @@ static void dump_fault_path(unsigned lon
                p += (address >> 21) * 2;
                printk(KERN_ALERT "%08lx -> *pme = %08lx:%08lx\n", 
                       page, p[1], p[0]);
-#ifndef CONFIG_HIGHPTE
+               mfn  = (p[0] >> PAGE_SHIFT) | (p[1] << 20);
+#ifdef CONFIG_HIGHPTE
+               if (mfn_to_pfn(mfn) >= highstart_pfn)
+                       return;
+#endif
                if (p[0] & 1) {
-                       mfn  = (p[0] >> PAGE_SHIFT) | (p[1] << 20);
                        page = mfn_to_pfn(mfn) << PAGE_SHIFT; 
                        p  = (unsigned long *) __va(page);
                        address &= 0x001fffff;
@@ -242,7 +245,6 @@ static void dump_fault_path(unsigned lon
                        printk(KERN_ALERT "%08lx -> *pte = %08lx:%08lx\n",
                               page, p[1], p[0]);
                }
-#endif
        }
 }
 #else
@@ -254,13 +256,16 @@ static void dump_fault_path(unsigned lon
        page = ((unsigned long *) __va(page))[address >> 22];
        printk(KERN_ALERT "*pde = ma %08lx pa %08lx\n", page,
               machine_to_phys(page));
+#ifdef CONFIG_HIGHPTE
        /*
         * We must not directly access the pte in the highpte
-        * case, the page table might be allocated in highmem.
+        * case if the page table is located in highmem.
         * And lets rather not kmap-atomic the pte, just in case
         * it's allocated already.
         */
-#ifndef CONFIG_HIGHPTE
+       if ((page >> PAGE_SHIFT) >= highstart_pfn)
+               return;
+#endif
        if (page & 1) {
                page &= PAGE_MASK;
                address &= 0x003ff000;
@@ -269,7 +274,6 @@ static void dump_fault_path(unsigned lon
                printk(KERN_ALERT "*pte = ma %08lx pa %08lx\n", page,
                       machine_to_phys(page));
        }
-#endif
 }
 #endif
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] linux/i386: enhance dump_fault_path() in the highpte case, Xen patchbot-unstable <=