On 5/27/20 3:05 AM, Alex Bennée wrote: > @@ -2145,7 +2145,7 @@ static uintptr_t pgd_find_hole_fallback(uintptr_t > guest_size, uintptr_t brk, lon > > /* Return value for guest_base, or -1 if no hole found. */ > static uintptr_t pgb_find_hole(uintptr_t guest_loaddr, uintptr_t guest_size, > - long align) > + long align, uintptr_t offset) > { > GSList *maps, *iter; > uintptr_t this_start, this_end, next_start, brk; > @@ -2171,7 +2171,7 @@ static uintptr_t pgb_find_hole(uintptr_t guest_loaddr, > uintptr_t guest_size, > > this_end = ((MapInfo *)iter->data)->start; > next_start = ((MapInfo *)iter->data)->end; > - align_start = ROUND_UP(this_start, align); > + align_start = ROUND_UP(this_start + offset, align); > > /* Skip holes that are too small. */
I suppose offset is supposed to mean we start from -offset? You didn't update pgb_find_hole_fallback. > - loaddr = ARM_COMMPAGE & -align; > + offset = (128 * KiB); Why 128K? Surely this should be an expression against ARM_COMMPAGE. r~