[Rebase & FF] Inherit page table attribute from parent entries#175
Merged
kuqin12 merged 2 commits intoOpenDevicePartnership:mainfrom Feb 25, 2026
Merged
[Rebase & FF] Inherit page table attribute from parent entries#175kuqin12 merged 2 commits intoOpenDevicePartnership:mainfrom
kuqin12 merged 2 commits intoOpenDevicePartnership:mainfrom
Conversation
os-d
reviewed
Feb 24, 2026
ba90ece to
eef6eb7
Compare
os-d
approved these changes
Feb 24, 2026
This change adds the special-purpose memory region bit in paging crate. This bit may be used for specific device drivers or applications. Signed-off-by: Kun Qin <kun.qin@microsoft.com>
The original page table query logic assumed that all parent-level entries were marked with the most permissive attributes, allowing the leaf entry to directly reflect the effective attributes during a query. However, since patina-paging also supports initialization from an existing page table, this assumption does not always hold. The query logic must instead accurately model attribute inheritance across the page table hierarchy. This change fixes the issue by introducing an additional input parameter to the internal helper, allowing the query to correctly propagate and reflect parent attributes. Signed-off-by: Kun Qin <kun.qin@microsoft.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
cfernald
approved these changes
Feb 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The original page table query logic assumed that all parent-level entries were marked with the most permissive attributes, allowing the leaf entry to directly reflect the effective attributes during a query.
However, since patina-paging also supports initialization from an existing page table, this assumption does not always hold. The query logic must instead accurately model attribute inheritance across the page table hierarchy.
This change fixes the issue by introducing an additional input parameter to the internal helper, allowing the query to correctly propagate and reflect parent attributes.
This change also adds a bit definition of
EFI_MEMORY_SPfor completeness.How This Was Tested
This was tested on QEMU Q35 and booted to UEFI shell, as well as on physical AArch64 platform and booted to Windows desktop.
Integration Instructions
N/A