[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [linux-2.6.18-xen] linux/x86: set up machine_e820 in copy_e820_map() for it to be usable
# 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |