Mark promoted PDEs with the new PG_PROMOTED flag so that the amd64 pmap knows whether lingering 4K page mappings need to be flushed on a PDE change that restricts or destroys the mapping. This allows the amd64 pmap to avoid unnecessary and costly range invalidations.
|1858 ↗||(On Diff #25361)|
There are 2M page mappings that are not the result of promotion, e.g., pmap_enter_pde() and an upcoming patch that adds support for "psind == 1" to pmap_enter(). That said, the bug fixed by r312954 involved PG_G mappings and currently pmap_enter_pde() never creates PG_G mappings, so we would not yet call this function on anything but a promoted mapping. However, that is going to change before too long.
Apply similar changes to the i386 pmap. There PG_AVAIL3 is unused, and we don't support EPT, so there is no potential conflict from using PG_AVAIL3.
Tweak the "spelling" in some comments for consistency with other parts of the amd64/i386 pmap.