Re: [PATCH] target/arm: Use signed quantity to represent VMSAv8-64 translation level

2022-11-22 Thread Ard Biesheuvel
On Tue, 22 Nov 2022 at 14:21, Peter Maydell wrote: > > On Mon, 21 Nov 2022 at 19:02, Ard Biesheuvel wrote: > > > > On Mon, 21 Nov 2022 at 19:51, Peter Maydell > > wrote: > > > > > > On Mon, 21 Nov 2022 at 17:43, Ard Biesheuvel wrote: > > > > > > > > The LPA2 extension implements 52-bit

Re: [PATCH] target/arm: Use signed quantity to represent VMSAv8-64 translation level

2022-11-22 Thread Peter Maydell
On Mon, 21 Nov 2022 at 19:02, Ard Biesheuvel wrote: > > On Mon, 21 Nov 2022 at 19:51, Peter Maydell wrote: > > > > On Mon, 21 Nov 2022 at 17:43, Ard Biesheuvel wrote: > > > > > > The LPA2 extension implements 52-bit virtual addressing for 4k and 16k > > > translation granules, and for the

Re: [PATCH] target/arm: Use signed quantity to represent VMSAv8-64 translation level

2022-11-21 Thread Ard Biesheuvel
On Mon, 21 Nov 2022 at 19:51, Peter Maydell wrote: > > On Mon, 21 Nov 2022 at 17:43, Ard Biesheuvel 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.

Re: [PATCH] target/arm: Use signed quantity to represent VMSAv8-64 translation level

2022-11-21 Thread Peter Maydell
On Mon, 21 Nov 2022 at 17:43, Ard Biesheuvel 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

[PATCH] target/arm: Use signed quantity to represent VMSAv8-64 translation level

2022-11-21 Thread Ard Biesheuvel
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