On Tue, Jan 24, 2023 at 08:46:58AM -0800, Ricardo Koller wrote: > On Mon, Jan 23, 2023 at 05:03:23PM -0800, Ben Gardon wrote: [...] > > Would it be accurate to say: > > /* No huge pages can exist at the root level, so there's nothing to > > split here. */ > > > > I think of "last level" as the lowest/leaf/4k level but > > KVM_PGTABLE_MAX_LEVELS - 1 is 3? > > Right, this is the 4k level. > > > Does ARM do the level numbering in > > reverse order to x86? > > Yes, it does. Interesting, x86 does > > iter->level--; > > while arm does: > > ret = __kvm_pgtable_walk(data, mm_ops, childp, level + 1); > > I don't think this numbering scheme is encoded anywhere in the PTEs, so > either architecture could use the other. The numbering we use in the page table walkers is deliberate, as it directly matches the Arm ARM. While we can certainly use either scheme I'd prefer we keep aligned with the architecture. -- Thanks, Oliver