qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v1 2/3] linux-user: deal with address wrap for ARM_COMMPAGE o


From: Richard Henderson
Subject: Re: [PATCH v1 2/3] linux-user: deal with address wrap for ARM_COMMPAGE on 32 bit
Date: Mon, 1 Jun 2020 17:28:47 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0

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~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]