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

Re: [Xen-devel] [PATCH] xen/arm: setup: initialize xenheap mappings after boot pages avaiable



Hi Peng,

On 27/05/2016 06:31, Peng Fan wrote:
To ARM64, setup_xenheap_mappings may call alloc_boot_pages to allocate
first level page table, if there is a big chunk memory (ie, >512GB).

Out of interest, have you found the bug by testing Xen on a platform with 512GB of RAM? :)

So, need to make sure boot pages are ready before setup xenheap mappings.

init_boot_pages is using mfn_to_virt (see bootmem_region_add), which cannot work until xenheap_mfn_start is initialized. This is done by setup_xenheap_mappings.

I would be happy to give you hint on how to solve this, but I am not sure to fully understand your issue. Can you give more details?

Regards,


Signed-off-by: Peng Fan <van.freenix@xxxxxxxxx>
Cc: Julien Grall <julien.grall@xxxxxxx>
Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>
---
 xen/arch/arm/setup.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index dcb23b7..24cf9d3 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -641,8 +641,6 @@ static void __init setup_mm(unsigned long dtb_paddr, size_t 
dtb_size)
         ram_start = min(ram_start,bank_start);
         ram_end = max(ram_end,bank_end);

-        setup_xenheap_mappings(bank_start>>PAGE_SHIFT, bank_size>>PAGE_SHIFT);
-
         s = bank_start;
         while ( s < bank_end )
         {
@@ -663,6 +661,8 @@ static void __init setup_mm(unsigned long dtb_paddr, size_t 
dtb_size)
             dt_unreserved_regions(s, e, init_boot_pages, 0);
             s = n;
         }
+
+        setup_xenheap_mappings(bank_start>>PAGE_SHIFT, bank_size>>PAGE_SHIFT);
     }

     total_pages += ram_size >> PAGE_SHIFT;


--
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

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