On 28/12/2018 11:18, Roger Pau Monne wrote: > Current code that allocates memory and populates the p2m for PVH Dom0 > doesn't take the address alignment into account, this can lead to high > order allocations that start on a non-aligned address to be broken > down into lower order entries on the p2m page tables. > > Fix this by taking into account the p2m page sizes and alignment > requirements when allocating the memory and populating the p2m. > > Reported-by: Andrew Cooper <andrew.coop...@citrix.com> > Signed-off-by: Roger Pau Monné <roger....@citrix.com>
Nice. I now get a layout as follows: (XEN) *** Building a PVH Dom0 *** (XEN) pvh_populate_memory_range(d0, 0, a0) (XEN) guest_physmap_add_page(d0, 00000, 100b00, 7 = 512kB) (XEN) guest_physmap_add_page(d0, 00080, 100bc0, 5 = 128kB) (XEN) pvh_populate_memory_range(d0, 100, 360) (XEN) guest_physmap_add_page(d0, 00100, 100a00, 8 = 1024kB) (XEN) guest_physmap_add_page(d0, 00200, 100800, 9 = 2048kB) (XEN) guest_physmap_add_page(d0, 00400, 100b80, 6 = 256kB) (XEN) guest_physmap_add_page(d0, 00440, 1007e0, 5 = 128kB) which looks to be correct. Reviewed-by: Andrew Cooper <andrew.coop...@citrix.com> Tested-by: Andrew Cooper <andrew.coop...@citrix.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel