[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] libxl: arm: ensure DTB is page aligned
commit d239c0a68fb32716da8d2585cc2470ea4e8df3bd Author: Ian Campbell <ian.campbell@xxxxxxxxxx> AuthorDate: Wed Nov 20 09:45:32 2013 +0000 Commit: Ian Campbell <ian.campbell@xxxxxxxxxx> CommitDate: Thu Nov 21 10:45:29 2013 +0000 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@xxxxxxxxxx> Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> Acked-by: Julien Grall <julien.grall@xxxxxxxxxx> --- tools/libxc/xc_dom_arm.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/libxc/xc_dom_arm.c b/tools/libxc/xc_dom_arm.c index ffe575b..a40e04d 100644 --- a/tools/libxc/xc_dom_arm.c +++ b/tools/libxc/xc_dom_arm.c @@ -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 ) -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |