[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] manualmerge



ChangeSet 1.1795, 2005/03/18 13:06:04+00:00, iap10@xxxxxxxxxxxxxxxxxxx

        manualmerge



 setup.c |   28 ++++++++++++++++++++--------
 1 files changed, 20 insertions(+), 8 deletions(-)


diff -Nru a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/setup.c 
b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/setup.c
--- a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/setup.c      2005-03-21 
05:03:06 -05:00
+++ b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/setup.c      2005-03-21 
05:03:06 -05:00
@@ -1491,16 +1491,28 @@
 #endif
        paging_init();
 
-       /* Make sure we have a large enough P->M table. */
-       if (max_pfn > xen_start_info.nr_pages) {
+       /* 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));
-               /* set to IVALID_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));
+
+               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 {
+                       memcpy(phys_to_machine_mapping,
+                               (unsigned long *)xen_start_info.mfn_list,
+                               max_pfn * sizeof(unsigned long));
+                       if (HYPERVISOR_dom_mem_op(
+                               MEMOP_decrease_reservation,
+                               (unsigned long *)xen_start_info.mfn_list + 
max_pfn,
+                               xen_start_info.nr_pages - max_pfn, 0) !=
+                           (xen_start_info.nr_pages - max_pfn)) BUG();
+               }
                free_bootmem(
                        __pa(xen_start_info.mfn_list), 
                        PFN_PHYS(PFN_UP(xen_start_info.nr_pages *


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.