Commit 05bd51b
kvm: pagetables: Refactor amd64 pg walker for 5-level paging
Prepares for 5-level page support w/ P4D folding.
This implementation mirrors Linux's style of boundary-aware pg walking. This
new model is an improvement over our old model of incremental address
advancement because it makes it easier to fold an extra page level.
The core change is logic for traversing the tree:
- Each level is now responsible for calculating and passing the address
boundary for the level below.
Crucially, the logic for handling the entries (superpages, splitting and
visit-action) at each level is preserved.
The minor change is extracting logic through PTEs, PMDs, and PUDs into
dedicated helper functions (walkPTEs, walkPMDs, walkPUDs).
PiperOrigin-RevId: 7998148821 parent 99d6c94 commit 05bd51b
1 file changed
+241
-168
lines changed
0 commit comments