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-devel

[Xen-devel] [PATCH] x86-64-paging-init.patch

To: Ian Pratt <Ian.Pratt@xxxxxxxxxxxx>, Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] x86-64-paging-init.patch
From: Arun Sharma <arun.sharma@xxxxxxxxx>
Date: Mon, 21 Mar 2005 16:42:36 -0800
Cc: xen-devel@xxxxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 22 Mar 2005 00:42:27 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.1i
Calling alloc_boot_pages() after end_boot_allocator() could result in
double allocation of the same page.

Signed-off-by: Chengyuan Li <chengyuan.li@xxxxxxxxx>
Signed-off-by: Arun Sharma <arun.sharma@xxxxxxxxx>

--- 1.21/xen/arch/x86/x86_64/mm.c       2005-03-19 11:36:41 -08:00
+++ edited/xen/arch/x86/x86_64/mm.c     2005-03-21 15:53:23 -08:00
@@ -118,6 +118,7 @@
 {
     unsigned long i, p, max;
     l3_pgentry_t *l3rw, *l3ro;
+    struct pfn_info *pg;
 
     /* Map all of physical memory. */
     max = ((max_page + L1_PAGETABLE_ENTRIES - 1) & 
@@ -130,10 +131,11 @@
      */
     for ( i = 0; i < max_page; i += ((1UL << L2_PAGETABLE_SHIFT) / 8) )
     {
-        p = alloc_boot_pages(1UL << L2_PAGETABLE_SHIFT,
-                             1UL << L2_PAGETABLE_SHIFT);
-        if ( p == 0 )
+        pg = alloc_domheap_pages(NULL, 
+                                 (L2_PAGETABLE_SHIFT - L1_PAGETABLE_SHIFT));
+        if ( pg == 0 )
             panic("Not enough memory for m2p table\n");
+        p = page_to_phys(pg);
         map_pages(idle_pg_table, RDWR_MPT_VIRT_START + i*8, p, 
                   1UL << L2_PAGETABLE_SHIFT, PAGE_HYPERVISOR | _PAGE_USER);
         memset((void *)(RDWR_MPT_VIRT_START + i*8), 0x55,


-------------------------------------------------------
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-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] x86-64-paging-init.patch, Arun Sharma <=