Re: [PATCH 1/3] mini-os: mm: introduce generic page table walk function

2024-07-31 Thread Jürgen Groß
On 31.07.24 23:33, Samuel Thibault wrote: Juergen Gross, le mer. 31 juil. 2024 15:00:24 +0200, a ecrit: +ptindex[lvl] = (va >> ptdata[lvl].shift) & + (ptdata[lvl].entries - 1); It seems that this kind of va+lvl-to-index computation happens several times? I

Re: [PATCH 1/3] mini-os: mm: introduce generic page table walk function

2024-07-31 Thread Samuel Thibault
Juergen Gross, le mer. 31 juil. 2024 15:00:24 +0200, a ecrit: > +ptindex[lvl] = (va >> ptdata[lvl].shift) & > + (ptdata[lvl].entries - 1); It seems that this kind of va+lvl-to-index computation happens several times? It's probably worth making it a macro. Sam

[PATCH 1/3] mini-os: mm: introduce generic page table walk function

2024-07-31 Thread Juergen Gross
In x86 mm code there are multiple instances of page table walks for different purposes. Introduce a generic page table walker being able to cover the current use cases. It will be used for other cases in future, too. The page table walker needs some per-level data, so add a table for that data. M