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/
Home Products Support Community News


[Xen-changelog] [linux-2.6.18-xen] xen/x86_64: correctly handle mem= red

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] xen/x86_64: correctly handle mem= reducing memory amount
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 01 Dec 2009 06:31:03 -0800
Delivery-date: Tue, 01 Dec 2009 06:33:39 -0800
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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.fraser@xxxxxxxxxx>
# Date 1259676172 0
# Node ID ff5ea1801bd3f5857c095c760f04dfab787f8c1d
# Parent  7ee9b1483445b05a2bab9466d1632f00f868f3c3
xen/x86_64: correctly handle mem= reducing memory amount

When mem= is being used to specify a value below the amount a domain
got passed from Xen, init_memory_mapping() got called with the higher
original value (end_pfn_map), triggering the BUG()s in maddr.h
checking PFNs against end_pfn.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
 arch/x86_64/kernel/e820-xen.c |    2 ++
 include/asm-x86_64/proto.h    |    4 ++++
 2 files changed, 6 insertions(+)

diff -r 7ee9b1483445 -r ff5ea1801bd3 arch/x86_64/kernel/e820-xen.c
--- a/arch/x86_64/kernel/e820-xen.c     Mon Nov 30 10:37:45 2009 +0000
+++ b/arch/x86_64/kernel/e820-xen.c     Tue Dec 01 14:02:52 2009 +0000
@@ -31,12 +31,14 @@ unsigned long end_pfn;
 unsigned long end_pfn; 
+#ifndef CONFIG_XEN
  * end_pfn only includes RAM, while end_pfn_map includes all e820 entries.
  * The direct mapping extends to end_pfn_map, so that we can directly access
  * apertures, ACPI and other tables without having to play with fixmaps.
 unsigned long end_pfn_map; 
  * Last pfn which the user wants to use.
diff -r 7ee9b1483445 -r ff5ea1801bd3 include/asm-x86_64/proto.h
--- a/include/asm-x86_64/proto.h        Mon Nov 30 10:37:45 2009 +0000
+++ b/include/asm-x86_64/proto.h        Tue Dec 01 14:02:52 2009 +0000
@@ -72,7 +72,11 @@ extern void stop_timer_interrupt(void);
 extern void stop_timer_interrupt(void);
 extern void main_timer_handler(struct pt_regs *regs);
+#ifndef CONFIG_XEN
 extern unsigned long end_pfn_map; 
+#define end_pfn_map end_pfn
 extern void show_trace(struct task_struct *, struct pt_regs *, unsigned long * 
 extern void show_registers(struct pt_regs *regs);

Xen-changelog mailing list

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] xen/x86_64: correctly handle mem= reducing memory amount, Xen patchbot-linux-2.6.18-xen <=