Adding "mm_supv" feature#182
Draft
kuqin12 wants to merge 12 commits intoOpenDevicePartnership:mainfrom
Draft
Conversation
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>
This change adds a mm_supv flag to prepare for the usage of supervisor bit in the page table entries. Note that supervisor will map the MEMORY_SP bit to be supervisor pages and otherwise it will be user pages. Signed-off-by: Kun Qin <kun.qin@microsoft.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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
This change adds the
mm_supvfeature, which will honor the supervisor mask definition and apply the appropriate supervisor bit in the page table entries (leaf level only).In addition, this feature also assumes the page table is marked as read only, which means paging protection needs to be disabled when the content is updated.
How This Was Tested
This was tested with QEMU Q35 platform + rust supervisor and booted to Windows desktop.
Integration Instructions
For modules that works with supervisor level paging, one needs to build with
mm_supvfeature flag.