mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 02:30:03 +01:00
libxl: arm: ensure DTB is page aligned
xc_dom_alloc_segment requires this. Since rambase and ramend are both page aligned, rounding up the DTB is sufficient. Reported-by: Julien Grall <julien.grall@linaro.org> Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Julien Grall <julien.grall@linaro.org>
This commit is contained in:
1 parent
45ffa79447
commit
d239c0a68f
1 file changed
+1
-1
@@ -282,7 +282,7 @@ int arch_setup_meminit(struct xc_dom_image *dom)
|
||||
{
|
||||
const uint64_t rambase = dom->rambase_pfn << XC_PAGE_SHIFT;
|
||||
const uint64_t ramend = rambase + ( dom->total_pages << XC_PAGE_SHIFT );
|
||||
const uint64_t dtbsize = ( dom->devicetree_size + 3 ) & ~0x3;
|
||||
const uint64_t dtbsize = ROUNDUP(dom->devicetree_size, XC_PAGE_SHIFT);
|
||||
|
||||
/* Place at 128MB if there is sufficient RAM */
|
||||
if ( ramend >= rambase + 128*1024*1024 + dtbsize )
|
||||
|
||||