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] Merge.

# HG changeset patch
# User emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID b0f61c2c07462185096aa1708f0b49c2399304fe
# Parent  4ba11726df733522f0eb5aca5b068672b8670466
# Parent  41489189b19e20b3fda4222e1787821d990206bc
Merge.

diff -r 4ba11726df73 -r b0f61c2c0746 buildconfigs/Rules.mk
--- a/buildconfigs/Rules.mk     Wed Oct 19 12:59:22 2005
+++ b/buildconfigs/Rules.mk     Wed Oct 19 13:00:37 2005
@@ -80,11 +80,12 @@
        rm -f patches/*/.makedep
 
 ref-%/.valid-ref: pristine-%/.valid-pristine
+       set -e
        rm -rf $(@D)
        cp -al $(<D) $(@D)
-       which patch || exit 1
-       ([ -d patches/$* ] && \
-         for i in patches/$*/*.patch ; do ( cd $(@D) ; patch -p1 <../$$i || 
exit 1 ) ; done) || true
+       if [ -d patches/$* ] ; then \
+           for i in patches/$*/*.patch ; do ( cd $(@D) ; patch -p1 <../$$i || 
exit 1 ) ; done ; \
+       fi
        touch $@ # update timestamp to avoid rebuild
 endif
 
diff -r 4ba11726df73 -r b0f61c2c0746 
linux-2.6-xen-sparse/arch/xen/i386/kernel/setup.c
--- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/setup.c Wed Oct 19 12:59:22 2005
+++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/setup.c Wed Oct 19 13:00:37 2005
@@ -939,6 +939,8 @@
        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);
 }
 #endif /* XEN */
 
@@ -1638,39 +1640,17 @@
 #endif
 
        /* Make sure we have a correctly sized P->M table. */
-       if (max_pfn != xen_start_info->nr_pages) {
-               phys_to_machine_mapping = alloc_bootmem_low_pages(
-                       max_pfn * sizeof(unsigned long));
-
-               if (max_pfn > xen_start_info->nr_pages) {
-                       /* set to INVALID_P2M_ENTRY */
-                       memset(phys_to_machine_mapping, ~0,
-                               max_pfn * sizeof(unsigned long));
-                       memcpy(phys_to_machine_mapping,
-                               (unsigned long *)xen_start_info->mfn_list,
-                               xen_start_info->nr_pages * sizeof(unsigned 
long));
-               } else {
-                       struct xen_memory_reservation reservation = {
-                               .extent_start = (unsigned long 
*)xen_start_info->mfn_list + max_pfn,
-                               .nr_extents   = xen_start_info->nr_pages - 
max_pfn,
-                               .extent_order = 0,
-                               .domid        = DOMID_SELF
-                       };
-
-                       memcpy(phys_to_machine_mapping,
-                               (unsigned long *)xen_start_info->mfn_list,
-                               max_pfn * sizeof(unsigned long));
-                       BUG_ON(HYPERVISOR_memory_op(
-                               XENMEM_decrease_reservation,
-                               &reservation) !=
-                           (xen_start_info->nr_pages - max_pfn));
-               }
-               free_bootmem(
-                       __pa(xen_start_info->mfn_list), 
-                       PFN_PHYS(PFN_UP(xen_start_info->nr_pages *
-                       sizeof(unsigned long))));
-       }
-
+       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,
+               xen_start_info->nr_pages * sizeof(unsigned long));
+       free_bootmem(
+               __pa(xen_start_info->mfn_list), 
+               PFN_PHYS(PFN_UP(xen_start_info->nr_pages *
+               sizeof(unsigned long))));
 
        /* 
         * Initialise the list of the frames that specify the list of 
diff -r 4ba11726df73 -r b0f61c2c0746 
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        Wed Oct 19 
12:59:22 2005
+++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/e820.c        Wed Oct 19 
13:00:37 2005
@@ -528,10 +528,13 @@
 {
         unsigned long max_end_pfn = xen_start_info->nr_pages;
 
-       if ( xen_override_max_pfn <  max_end_pfn)
+       if ( xen_override_max_pfn < max_end_pfn)
                xen_override_max_pfn = max_end_pfn;
-       
-        return xen_override_max_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;
 }
 
 void __init e820_reserve_resources(void) 
diff -r 4ba11726df73 -r b0f61c2c0746 
linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup.c
--- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup.c       Wed Oct 19 
12:59:22 2005
+++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup.c       Wed Oct 19 
13:00:37 2005
@@ -429,7 +429,7 @@
 static void __init contig_initmem_init(void)
 {
         unsigned long bootmap_size = init_bootmem(start_pfn, end_pfn);
-        free_bootmem(0, end_pfn << PAGE_SHIFT);   
+        free_bootmem(0, xen_start_info->nr_pages << PAGE_SHIFT);
         reserve_bootmem(HIGH_MEMORY,
                         (PFN_PHYS(start_pfn) + bootmap_size + PAGE_SIZE-1)
                         - HIGH_MEMORY);
@@ -734,19 +734,17 @@
        {
                int i, j, k, fpp;
                /* Make sure we have a large enough P->M table. */
-               if (end_pfn > xen_start_info->nr_pages) {
-                       phys_to_machine_mapping = alloc_bootmem(
-                               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,
-                              xen_start_info->nr_pages * sizeof(unsigned 
long));
-                       free_bootmem(
-                               __pa(xen_start_info->mfn_list), 
-                               PFN_PHYS(PFN_UP(xen_start_info->nr_pages *
-                                               sizeof(unsigned long))));
-               }
+               phys_to_machine_mapping = alloc_bootmem(
+                       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,
+                      xen_start_info->nr_pages * sizeof(unsigned long));
+               free_bootmem(
+                       __pa(xen_start_info->mfn_list), 
+                       PFN_PHYS(PFN_UP(xen_start_info->nr_pages *
+                                       sizeof(unsigned long))));
 
                /* 
                 * Initialise the list of the frames that specify the list of 
diff -r 4ba11726df73 -r b0f61c2c0746 
linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c
--- a/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c        Wed Oct 19 
12:59:22 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c        Wed Oct 19 
13:00:37 2005
@@ -502,7 +502,7 @@
                .extent_order = 0,
                .domid        = DOMID_SELF
        };
-       set_pte(pte, __pte_ma(0));
+       set_pte_at(&init_mm, addr, pte, __pte_ma(0));
        phys_to_machine_mapping[__pa(addr) >> PAGE_SHIFT] =
                INVALID_P2M_ENTRY;
        BUG_ON(HYPERVISOR_memory_op(
@@ -521,10 +521,9 @@
 
        scrub_pages(vstart, 1 << order);
 
+       balloon_lock(flags);
        BUG_ON(generic_page_range(
                &init_mm, vstart, PAGE_SIZE << order, dealloc_pte_fn, NULL));
-
-       balloon_lock(flags);
        current_pages -= 1UL << order;
        balloon_unlock(flags);
 

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

<Prev in Thread] Current Thread [Next in Thread>