[xen stable-4.5] xen/page_alloc: Cover memory unreserved after boot in first_valid_mfn
Author: Julien Grall <[hidden email]>
AuthorDate: Fri Oct 6 15:22:08 2017 +0200
Commit: Jan Beulich <[hidden email]>
CommitDate: Fri Oct 6 15:22:08 2017 +0200
xen/page_alloc: Cover memory unreserved after boot in first_valid_mfn
On Arm, some regions (e.g Initramfs, Dom0 Kernel...) are marked as
reserved until the hardware domain is built and they are copied into its
memory. Therefore, they will not be added in the boot allocator via
Instead, init_xenheap_pages will be called once the region are not used
Update first_valid_mfn in both init_heap_pages and init_boot_pages
(already exist) to cover all the cases.
+ * Some pages may not go through the boot allocator (e.g reserved
+ * memory at boot but released just after --- kernel, initramfs,
+ * etc.).
+ * Update first_valid_mfn to ensure those regions are covered.
+ first_valid_mfn = min_t(unsigned long, page_to_mfn(pg), first_valid_mfn);
for ( i = 0; i < nr_pages; i++ )
unsigned int nid = phys_to_nid(page_to_maddr(pg+i));
generated by git-patchbot for /home/xen/git/xen.git#stable-4.5