On Tue, 22 Nov 2022 at 15:55, Ard Biesheuvel <[email protected]> wrote:
>
> The LPA2 extension implements 52-bit virtual addressing for 4k and 16k
> translation granules, and for the former, this means an additional level
> of translation is needed. This means we start counting at -1 instead of
> 0 when doing a walk, and so 'level' is now a signed quantity, and should
> be typed as such. So turn it from uint32_t into int32_t.
>
> This avoids a level of -1 getting misinterpreted as being >= 3, and
> terminating a page table walk prematurely with a bogus output address.
>
> Cc: Peter Maydell <[email protected]>
> Cc: Philippe Mathieu-Daudé <[email protected]>
> Cc: Richard Henderson <[email protected]>
> Signed-off-by: Ard Biesheuvel <[email protected]>



Applied to target-arm.next for 7.2, thanks.

-- PMM

Reply via email to