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] Extend the 'badpage' boot option to parse inclusive

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Extend the 'badpage' boot option to parse inclusive
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 05 Apr 2006 19:38:11 +0000
Delivery-date: Wed, 05 Apr 2006 14:29:09 -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 kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID bb316b4df46f0dc436859de52ac68b4fd798f582
# Parent  02e8dd5e4c572dac62750ccd7e8dd93829a79e0c
Extend the 'badpage' boot option to parse inclusive
ranges of bad panges '<start_page>-<end_page>'.

Signed-off-by: Erik Bosman <ebosman@xxxxxxxxx>

diff -r 02e8dd5e4c57 -r bb316b4df46f xen/common/page_alloc.c
--- a/xen/common/page_alloc.c   Wed Apr  5 11:23:49 2006
+++ b/xen/common/page_alloc.c   Wed Apr  5 12:38:54 2006
@@ -170,7 +170,7 @@
 
 void init_boot_pages(paddr_t ps, paddr_t pe)
 {
-    unsigned long bad_pfn;
+    unsigned long bad_spfn, bad_epfn, i;
     char *p;
 
     ps = round_pgup(ps);
@@ -184,18 +184,31 @@
     p = opt_badpage;
     while ( *p != '\0' )
     {
-        bad_pfn = simple_strtoul(p, &p, 0);
+        bad_spfn = simple_strtoul(p, &p, 0);
+        bad_epfn = bad_spfn;
+
+        if ( *p == '-' )
+        {
+            p++;
+            bad_epfn = simple_strtoul(p, &p, 0);
+            if ( bad_epfn < bad_spfn )
+                bad_epfn = bad_spfn;
+        }
 
         if ( *p == ',' )
             p++;
         else if ( *p != '\0' )
             break;
 
-        if ( (bad_pfn < max_page) && !allocated_in_map(bad_pfn) )
-        {
-            printk("Marking page %lx as bad\n", bad_pfn);
-            map_alloc(bad_pfn, 1);
-        }
+        if ( bad_epfn == bad_spfn )
+            printk("Marking page %lx as bad\n", bad_spfn);
+        else
+            printk("Marking pages %lx through %lx as bad\n",
+                   bad_spfn, bad_epfn);
+
+        for ( i = bad_spfn; i <= bad_epfn; i++ )
+            if ( (i < max_page) && !allocated_in_map(i) )
+                map_alloc(i, 1);
     }
 }
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Extend the 'badpage' boot option to parse inclusive, Xen patchbot -unstable <=