- Use a vmparam.h constant to indicate support for non-transparent largepage mappings. Use it in the shm code.
- Enable on arm64.
manu alc kib
- Group Reviewers
- rS366090: Add a vmparam.h constant indicating pmap support for large pages.
Why does the current scheme not require such assertions? I don't mind adding them to this diff, or simply extending the ifdef in kern_shm_open2(). I just prefer having a central place to indicate PMAP_ENTER_LARGEPAGE support.
I am not advocating keeping the current scheme, but for me its advantage was that there is simple place where the support for LARGEPAGE is specified per-arch. With PMAP_HAS_LARGEPAGE I need to inspect all <arch>/include/vmparam.h.
If switching to this scheme, we should provide a pattern for pmap_enter() where somebody copying current implementation to a new architecture clearly see that the flag is handled or not. My scheme makes it correct without any action from the porter.
How about we just assert PMAP_HAS_LARGEPAGES == 1 in the bdry_idx != 0 case in vm_fault_populate()? Then, if a porter defines a new arch without PMAP_ENTER_LARGEPAGE support but defines PMAP_HAS_LARGEPAGES == 1, it will be easily found by regression tests.