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] Specifying 'mem=' as Linux boot parameter disables the d

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Specifying 'mem=' as Linux boot parameter disables the default
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 04 Nov 2005 12:14:07 +0000
Delivery-date: Fri, 04 Nov 2005 12:14:18 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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 6a2d93c2b32d332366cc5e8d11e85c476afa8f9b
# Parent  21d175472d55522cdbecd2a1018ad5eb35e7d487
Specifying 'mem=' as Linux boot parameter disables the default
8MB slack in the mem_map and the p2m table.

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r 21d175472d55 -r 6a2d93c2b32d 
linux-2.6-xen-sparse/arch/xen/i386/kernel/setup.c
--- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/setup.c Fri Nov  4 10:08:45 2005
+++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/setup.c Fri Nov  4 10:46:10 2005
@@ -936,11 +936,15 @@
 /* We don't use the fake e820 because we need to respond to user override. */
 void __init find_max_pfn(void)
 {
-       if ( xen_override_max_pfn < xen_start_info->nr_pages )
-               xen_override_max_pfn = xen_start_info->nr_pages;
-       max_pfn = xen_override_max_pfn;
-       /* 8MB slack, to make up for address space allocations in backends. */
-       max_pfn += 8 << (20 - PAGE_SHIFT);
+       if (xen_override_max_pfn == 0) {
+               max_pfn = xen_start_info->nr_pages;
+               /* Default 8MB slack (to balance backend allocations). */
+               max_pfn += 8 << (20 - PAGE_SHIFT);
+       } else if (xen_override_max_pfn > xen_start_info->nr_pages) {
+               max_pfn = xen_override_max_pfn;
+       } else {
+               max_pfn = xen_start_info->nr_pages;
+       }
 }
 #endif /* XEN */
 
diff -r 21d175472d55 -r 6a2d93c2b32d 
linux-2.6-xen-sparse/arch/xen/x86_64/kernel/e820.c
--- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/e820.c        Fri Nov  4 
10:08:45 2005
+++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/e820.c        Fri Nov  4 
10:46:10 2005
@@ -526,15 +526,19 @@
 
 unsigned long __init e820_end_of_ram(void)
 {
-        unsigned long max_end_pfn = xen_start_info->nr_pages;
-
-       if ( xen_override_max_pfn < max_end_pfn)
-               xen_override_max_pfn = max_end_pfn;
-
-       /* 8MB slack, to make up for address space allocations in backends. */
-       xen_override_max_pfn += 8 << (20 - PAGE_SHIFT);
-
-       return xen_override_max_pfn;
+        unsigned long max_end_pfn;
+
+       if (xen_override_max_pfn == 0) {
+               max_end_pfn = xen_start_info->nr_pages;
+               /* Default 8MB slack (to balance backend allocations). */
+               max_end_pfn += 8 << (20 - PAGE_SHIFT);
+       } else if (xen_override_max_pfn > xen_start_info->nr_pages) {
+               max_end_pfn = xen_override_max_pfn;
+       } else {
+               max_end_pfn = xen_start_info->nr_pages;
+       }
+
+       return max_end_pfn;
 }
 
 void __init e820_reserve_resources(void) 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Specifying 'mem=' as Linux boot parameter disables the default, Xen patchbot -unstable <=