Hi Andrew, On 11/3/20 4:39 PM, Andrew Jones wrote: > On Tue, Nov 03, 2020 at 04:25:15PM +0000, Alexandru Elisei wrote: >> Hi, >> >> On 11/3/20 4:10 PM, Andrew Jones wrote: >>> On Tue, Nov 03, 2020 at 03:49:32PM +0000, Nikos Nikoleris wrote: >>>>>> diff --git a/lib/arm64/asm/page.h b/lib/arm64/asm/page.h >>>>>> index 46af552..2a06207 100644 >>>>>> --- a/lib/arm64/asm/page.h >>>>>> +++ b/lib/arm64/asm/page.h >>>>>> @@ -10,38 +10,51 @@ >>>>>> * This work is licensed under the terms of the GNU GPL, version 2. >>>>>> */ >>>>>> +#include <config.h> >>>>>> #include <linux/const.h> >>>>>> -#define PGTABLE_LEVELS 2 >>>>>> #define VA_BITS 42 >>>>> Let's bump VA_BITS to 48 while we're at it. >>> I tried my suggestion to go to 48 VA bits, but it seems to break >>> things for 64K pages. >> I believe that is because we end up with PGTABLE_LEVELS=3 and in >> mmu_set_ranges_sect() we try to install a block mapping at the PUD level, which is >> forbidden by the architecture. >> >> I think the easiest fix for that is to always try to install block mapping at the >> pmd level. The diff below fixed all errors (with 16k and 64k pages): >> [..] > Let's use 48. > Yes, that was a typo. Thanks, Alex