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] Revert 630:9c730ffb48f. Crashes on bo

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] Revert 630:9c730ffb48f. Crashes on boot.
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 11 Aug 2008 05:51:10 -0700
Delivery-date: Mon, 11 Aug 2008 05:56:40 -0700
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 1218458340 -3600
# Node ID 1c928f28914a7b8b9e061f0f04d97664cb7f421d
# Parent  cdd156cb645bc1ea1dce7b1b4ed42e2b4928383d
Revert 630:9c730ffb48f. Crashes on boot.
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 arch/i386/kernel/setup-xen.c              |   21 +++++++--------------
 arch/x86_64/kernel/e820-xen.c             |   21 ---------------------
 arch/x86_64/kernel/setup-xen.c            |   25 +++++++------------------
 arch/x86_64/mm/init-xen.c                 |    7 -------
 drivers/xen/core/machine_reboot.c         |    2 +-
 include/asm-x86_64/mach-xen/asm/pgtable.h |    4 ++--
 6 files changed, 17 insertions(+), 63 deletions(-)

diff -r cdd156cb645b -r 1c928f28914a arch/i386/kernel/setup-xen.c
--- a/arch/i386/kernel/setup-xen.c      Mon Aug 11 11:05:57 2008 +0900
+++ b/arch/i386/kernel/setup-xen.c      Mon Aug 11 13:39:00 2008 +0100
@@ -405,7 +405,7 @@ EXPORT_SYMBOL(HYPERVISOR_shared_info);
 EXPORT_SYMBOL(HYPERVISOR_shared_info);
 
 unsigned long *phys_to_machine_mapping;
-unsigned long *pfn_to_mfn_frame_list_list, **pfn_to_mfn_frame_list;
+unsigned long *pfn_to_mfn_frame_list_list, *pfn_to_mfn_frame_list[16];
 EXPORT_SYMBOL(phys_to_machine_mapping);
 
 /* Raw start-of-day parameters from the hypervisor. */
@@ -831,7 +831,6 @@ static void __init parse_cmdline_early (
                        }
                }
 
-#ifndef CONFIG_XEN
                else if (!memcmp(from, "memmap=", 7)) {
                        if (to != command_line)
                                to--;
@@ -873,7 +872,6 @@ static void __init parse_cmdline_early (
                                }
                        }
                }
-#endif
 
                else if (!memcmp(from, "noexec=", 7))
                        noexec_setup(from + 7);
@@ -1619,7 +1617,7 @@ void __init setup_arch(char **cmdline_p)
        int i, j, k, fpp;
        struct physdev_set_iopl set_iopl;
        unsigned long max_low_pfn;
-       unsigned long p2m_pages, size;
+       unsigned long p2m_pages;
 
        /* Force a quick death if the kernel panics (not domain 0). */
        extern int panic_timeout;
@@ -1781,11 +1779,11 @@ void __init setup_arch(char **cmdline_p)
        if (!xen_feature(XENFEAT_auto_translated_physmap)) {
                phys_to_machine_mapping = alloc_bootmem_low_pages(
                     max_pfn * sizeof(unsigned long));
+               memset(phys_to_machine_mapping, ~0,
+                      max_pfn * sizeof(unsigned long));
                memcpy(phys_to_machine_mapping,
                       (unsigned long *)xen_start_info->mfn_list,
                       p2m_pages * sizeof(unsigned long));
-               memset(phys_to_machine_mapping + p2m_pages, ~0,
-                      (max_pfn - p2m_pages) * sizeof(unsigned long));
                free_bootmem(
                     __pa(xen_start_info->mfn_list),
                     PFN_PHYS(PFN_UP(xen_start_info->nr_pages *
@@ -1795,18 +1793,13 @@ void __init setup_arch(char **cmdline_p)
                 * Initialise the list of the frames that specify the list of
                 * frames that make up the p2m table. Used by save/restore
                 */
+               pfn_to_mfn_frame_list_list = alloc_bootmem_low_pages(PAGE_SIZE);
+
                fpp = PAGE_SIZE/sizeof(unsigned long);
-               size = (max_pfn + fpp - 1) / fpp;
-               size = (size + fpp - 1) / fpp;
-               size *= sizeof(unsigned long);
-               BUG_ON(size > PAGE_SIZE);
-               pfn_to_mfn_frame_list_list = alloc_bootmem_low_pages(size);
-               pfn_to_mfn_frame_list = alloc_bootmem_low(size);
-
                for (i=0, j=0, k=-1; i< max_pfn; i+=fpp, j++) {
                        if ((j % fpp) == 0) {
                                k++;
-                               BUG_ON(k * sizeof(unsigned long) >= size);
+                               BUG_ON(k>=16);
                                pfn_to_mfn_frame_list[k] =
                                        alloc_bootmem_low_pages(PAGE_SIZE);
                                pfn_to_mfn_frame_list_list[k] =
diff -r cdd156cb645b -r 1c928f28914a arch/x86_64/kernel/e820-xen.c
--- a/arch/x86_64/kernel/e820-xen.c     Mon Aug 11 11:05:57 2008 +0900
+++ b/arch/x86_64/kernel/e820-xen.c     Mon Aug 11 13:39:00 2008 +0100
@@ -16,7 +16,6 @@
 #include <linux/string.h>
 #include <linux/kexec.h>
 #include <linux/module.h>
-#include <linux/mm.h>
 
 #include <asm/pgtable.h>
 #include <asm/page.h>
@@ -704,24 +703,6 @@ void __init parse_memopt(char *p, char *
        i = e820.nr_map-1;
        current_end = e820.map[i].addr + e820.map[i].size;
 
-       /*
-        * A little less than 2% of available memory are needed for page
-        * tables, p2m map, and mem_map. Hence the maximum amount of memory
-        * we can potentially balloon up to cannot exceed about 50 times
-        * what we've been given initially.
-        */
-#define PAGE_OVERHEAD (PAGE_SIZE \
-                      / (sizeof(pte_t) + sizeof(long) + sizeof(struct page)))
-       if (end_user_pfn / (PAGE_OVERHEAD - 1) > xen_start_info->nr_pages) {
-               end = (xen_start_info->nr_pages * (PAGE_OVERHEAD - 1))
-                     << PAGE_SHIFT;
-               printk(KERN_WARNING "mem=%lu is invalid for an initial"
-                                   " allocation of %lu, using %lu\n",
-                      end_user_pfn << PAGE_SHIFT,
-                      xen_start_info->nr_pages << PAGE_SHIFT, end);
-               end_user_pfn = end >> PAGE_SHIFT;
-       }
-
        if (current_end < end) {
                /*
                  * The e820 map ends before our requested size so
@@ -734,7 +715,6 @@ void __init parse_memopt(char *p, char *
        }
 } 
 
-#ifndef CONFIG_XEN
 void __init parse_memmapopt(char *p, char **from)
 {
        unsigned long long start_at, mem_size;
@@ -755,7 +735,6 @@ void __init parse_memmapopt(char *p, cha
        }
        p = *from;
 }
-#endif
 
 unsigned long pci_mem_start = 0xaeedbabe;
 EXPORT_SYMBOL(pci_mem_start);
diff -r cdd156cb645b -r 1c928f28914a arch/x86_64/kernel/setup-xen.c
--- a/arch/x86_64/kernel/setup-xen.c    Mon Aug 11 11:05:57 2008 +0900
+++ b/arch/x86_64/kernel/setup-xen.c    Mon Aug 11 13:39:00 2008 +0100
@@ -97,7 +97,7 @@ static struct notifier_block xen_panic_b
 };
 
 unsigned long *phys_to_machine_mapping;
-unsigned long *pfn_to_mfn_frame_list_list, **pfn_to_mfn_frame_list;
+unsigned long *pfn_to_mfn_frame_list_list, *pfn_to_mfn_frame_list[512];
 
 EXPORT_SYMBOL(phys_to_machine_mapping);
 
@@ -419,7 +419,6 @@ static __init void parse_cmdline_early (
                if (!memcmp(from, "mem=", 4))
                        parse_memopt(from+4, &from); 
 
-#ifndef CONFIG_XEN
                if (!memcmp(from, "memmap=", 7)) {
                        /* exactmap option is for used defined memory */
                        if (!memcmp(from+7, "exactmap", 8)) {
@@ -441,7 +440,6 @@ static __init void parse_cmdline_early (
                                userdef = 1;
                        }
                }
-#endif
 
 #ifdef CONFIG_NUMA
                if (!memcmp(from, "numa=", 5))
@@ -778,7 +776,7 @@ void __init setup_arch(char **cmdline_p)
 #ifdef CONFIG_XEN
        {
                int i, j, k, fpp;
-               unsigned long p2m_pages, size;
+               unsigned long p2m_pages;
 
                p2m_pages = end_pfn;
                if (xen_start_info->nr_pages > end_pfn) {
@@ -810,11 +808,11 @@ void __init setup_arch(char **cmdline_p)
                        /* Make sure we have a large enough P->M table. */
                        phys_to_machine_mapping = alloc_bootmem_pages(
                                end_pfn * sizeof(unsigned long));
+                       memset(phys_to_machine_mapping, ~0,
+                              end_pfn * sizeof(unsigned long));
                        memcpy(phys_to_machine_mapping,
                               (unsigned long *)xen_start_info->mfn_list,
                               p2m_pages * sizeof(unsigned long));
-                       memset(phys_to_machine_mapping + p2m_pages, ~0,
-                              (end_pfn - p2m_pages) * sizeof(unsigned long));
                        free_bootmem(
                                __pa(xen_start_info->mfn_list),
                                PFN_PHYS(PFN_UP(xen_start_info->nr_pages *
@@ -825,22 +823,13 @@ void __init setup_arch(char **cmdline_p)
                         * list of frames that make up the p2m table. Used by
                          * save/restore.
                         */
+                       pfn_to_mfn_frame_list_list = 
alloc_bootmem_pages(PAGE_SIZE);
+
                        fpp = PAGE_SIZE/sizeof(unsigned long);
-                       size = (max_pfn + fpp - 1) / fpp;
-                       size = (size + fpp - 1) / fpp;
-                       size *= sizeof(unsigned long);
-                       pfn_to_mfn_frame_list_list = alloc_bootmem_pages(size);
-                       if (size > PAGE_SIZE
-                           && xen_create_contiguous_region((unsigned long)
-                                                           
pfn_to_mfn_frame_list_list,
-                                                           get_order(size), 0))
-                               BUG();
-                       pfn_to_mfn_frame_list = alloc_bootmem(size);
-
                        for (i=0, j=0, k=-1; i< end_pfn; i+=fpp, j++) {
                                if ((j % fpp) == 0) {
                                        k++;
-                                       BUG_ON(k * sizeof(unsigned long) >= 
size);
+                                       BUG_ON(k>=fpp);
                                        pfn_to_mfn_frame_list[k] =
                                                alloc_bootmem_pages(PAGE_SIZE);
                                        pfn_to_mfn_frame_list_list[k] =
diff -r cdd156cb645b -r 1c928f28914a arch/x86_64/mm/init-xen.c
--- a/arch/x86_64/mm/init-xen.c Mon Aug 11 11:05:57 2008 +0900
+++ b/arch/x86_64/mm/init-xen.c Mon Aug 11 13:39:00 2008 +0100
@@ -610,13 +610,6 @@ static void __init extend_init_mapping(u
        while (va < (__START_KERNEL_map
                     + (start_pfn << PAGE_SHIFT)
                     + tables_space)) {
-               if (!pmd_index(va) && !pte_index(va)) {
-                       page = (unsigned long *)init_level4_pgt;
-                       addr = page[pgd_index(va)];
-                       addr_to_page(addr, page);
-                       addr = page[pud_index(va)];
-                       addr_to_page(addr, page);
-               }
                pmd = (pmd_t *)&page[pmd_index(va)];
                if (pmd_none(*pmd)) {
                        pte_page = alloc_static_page(&phys);
diff -r cdd156cb645b -r 1c928f28914a drivers/xen/core/machine_reboot.c
--- a/drivers/xen/core/machine_reboot.c Mon Aug 11 11:05:57 2008 +0900
+++ b/drivers/xen/core/machine_reboot.c Mon Aug 11 13:39:00 2008 +0100
@@ -74,7 +74,7 @@ static void post_suspend(int suspend_can
        unsigned long shinfo_mfn;
        extern unsigned long max_pfn;
        extern unsigned long *pfn_to_mfn_frame_list_list;
-       extern unsigned long **pfn_to_mfn_frame_list;
+       extern unsigned long *pfn_to_mfn_frame_list[];
 
        if (suspend_cancelled) {
                xen_start_info->store_mfn =
diff -r cdd156cb645b -r 1c928f28914a include/asm-x86_64/mach-xen/asm/pgtable.h
--- a/include/asm-x86_64/mach-xen/asm/pgtable.h Mon Aug 11 11:05:57 2008 +0900
+++ b/include/asm-x86_64/mach-xen/asm/pgtable.h Mon Aug 11 13:39:00 2008 +0100
@@ -135,11 +135,11 @@ static inline void pgd_clear (pgd_t * pg
 #define FIRST_USER_ADDRESS     0
 
 #ifndef __ASSEMBLY__
-#define MAXMEM          0xdfffffffffUL
+#define MAXMEM          0x3fffffffffffUL
 #define VMALLOC_START    0xffffc20000000000UL
 #define VMALLOC_END      0xffffe1ffffffffffUL
 #define MODULES_VADDR    0xffffffff88000000UL
-#define MODULES_END      0xffffffffff000000UL
+#define MODULES_END      0xfffffffffff00000UL
 #define MODULES_LEN   (MODULES_END - MODULES_VADDR)
 
 #define _PAGE_BIT_PRESENT      0

_______________________________________________
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] Revert 630:9c730ffb48f. Crashes on boot., Xen patchbot-linux-2.6.18-xen <=