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] [linux-2.6.18-xen] linux/x86: set up machine_e820 in cop

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] linux/x86: set up machine_e820 in copy_e820_map() for it to be usable
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 22 Apr 2008 07:10:57 -0700
Delivery-date: Tue, 22 Apr 2008 07:36:48 -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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1208871711 -3600
# Node ID f128849f9e78a355f10bb510f6aed06f592d0903
# Parent  7f8b544237bf70b05d0ac2b2ee9d537b6fa50100
linux/x86: set up machine_e820 in copy_e820_map() for it to be usable
earlier (and also for being placed more logically).

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 arch/i386/kernel/setup-xen.c   |   27 ++++++++++++++++-----------
 arch/x86_64/kernel/e820-xen.c  |   15 +++++++++++++++
 arch/x86_64/kernel/setup-xen.c |   12 +-----------
 3 files changed, 32 insertions(+), 22 deletions(-)

diff -r 7f8b544237bf -r f128849f9e78 arch/i386/kernel/setup-xen.c
--- a/arch/i386/kernel/setup-xen.c      Tue Apr 15 15:18:58 2008 +0100
+++ b/arch/i386/kernel/setup-xen.c      Tue Apr 22 14:41:51 2008 +0100
@@ -736,6 +736,21 @@ int __init copy_e820_map(struct e820entr
 #endif
                add_memory_region(start, size, type);
        } while (biosmap++,--nr_map);
+
+#ifdef CONFIG_XEN
+       if (is_initial_xendomain()) {
+               struct xen_memory_map memmap;
+
+               memmap.nr_entries = E820MAX;
+               set_xen_guest_handle(memmap.buffer, machine_e820.map);
+
+               if (HYPERVISOR_memory_op(XENMEM_machine_memory_map, &memmap))
+                       BUG();
+               machine_e820.nr_map = memmap.nr_entries;
+       } else
+               machine_e820 = e820;
+#endif
+
        return 0;
 }
 
@@ -1569,18 +1584,8 @@ static void __init register_memory(void)
 static void __init register_memory(void)
 {
 #ifdef CONFIG_XEN
-       if (is_initial_xendomain()) {
-               struct xen_memory_map memmap;
-
-               memmap.nr_entries = E820MAX;
-               set_xen_guest_handle(memmap.buffer, machine_e820.map);
-
-               if (HYPERVISOR_memory_op(XENMEM_machine_memory_map, &memmap))
-                       BUG();
-
-               machine_e820.nr_map = memmap.nr_entries;
+       if (is_initial_xendomain())
                e820_setup_gap(machine_e820.map, machine_e820.nr_map);
-       }
        else
 #endif
                e820_setup_gap(e820.map, e820.nr_map);
diff -r 7f8b544237bf -r f128849f9e78 arch/x86_64/kernel/e820-xen.c
--- a/arch/x86_64/kernel/e820-xen.c     Tue Apr 15 15:18:58 2008 +0100
+++ b/arch/x86_64/kernel/e820-xen.c     Tue Apr 22 14:41:51 2008 +0100
@@ -604,6 +604,21 @@ static int __init copy_e820_map(struct e
 
                add_memory_region(start, size, type);
        } while (biosmap++,--nr_map);
+
+#ifdef CONFIG_XEN
+       if (is_initial_xendomain()) {
+               struct xen_memory_map memmap;
+
+               memmap.nr_entries = E820MAX;
+               set_xen_guest_handle(memmap.buffer, machine_e820.map);
+
+               if (HYPERVISOR_memory_op(XENMEM_machine_memory_map, &memmap))
+                       BUG();
+               machine_e820.nr_map = memmap.nr_entries;
+       } else
+               machine_e820 = e820;
+#endif
+
        return 0;
 }
 
diff -r 7f8b544237bf -r f128849f9e78 arch/x86_64/kernel/setup-xen.c
--- a/arch/x86_64/kernel/setup-xen.c    Tue Apr 15 15:18:58 2008 +0100
+++ b/arch/x86_64/kernel/setup-xen.c    Tue Apr 22 14:41:51 2008 +0100
@@ -903,18 +903,8 @@ void __init setup_arch(char **cmdline_p)
         */
        probe_roms();
 #ifdef CONFIG_XEN
-       if (is_initial_xendomain()) {
-               struct xen_memory_map memmap;
-
-               memmap.nr_entries = E820MAX;
-               set_xen_guest_handle(memmap.buffer, machine_e820.map);
-
-               if (HYPERVISOR_memory_op(XENMEM_machine_memory_map, &memmap))
-                       BUG();
-               machine_e820.nr_map = memmap.nr_entries;
-
+       if (is_initial_xendomain())
                e820_reserve_resources(machine_e820.map, machine_e820.nr_map);
-       }
 #else
        e820_reserve_resources(e820.map, e820.nr_map);
 #endif

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] linux/x86: set up machine_e820 in copy_e820_map() for it to be usable, Xen patchbot-linux-2.6.18-xen <=