[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2] target/arm: Use signed quantity to represent VMSAv8-64 tr
|
From: |
Peter Maydell |
|
Subject: |
Re: [PATCH v2] target/arm: Use signed quantity to represent VMSAv8-64 translation level |
|
Date: |
Tue, 22 Nov 2022 16:10:50 +0000 |
On Tue, 22 Nov 2022 at 15:55, Ard Biesheuvel <ardb@kernel.org> 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 <peter.maydell@linaro.org>
> Cc: Philippe Mathieu-Daudé <f4bug@amsat.org>
> Cc: Richard Henderson <richard.henderson@linaro.org>
> Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Applied to target-arm.next for 7.2, thanks.
-- PMM