|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH] x86-64-paging-init.patch
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 <=
|
|
|
|
|