Repository navigation
[CHERRY-PICK][Rebase & FF] Cherry-pick non-present page fix from edk2 - #1997
Merged
Merged
Conversation
Contributor
✅ QEMU Validation PassedSource Dependencies
Results
Workflow run: https://github.com/microsoft/mu_basecore/actions/runs/40402056302 This comment was automatically generated by the Mu QEMU PR Validation workflow. |
… non-present pages. [202405] (microsoft#1081)" This reverts commit b785338.
…r non-present pages Current page table logic skips the content population when the attribute is RP. This is problematic when a smaller page is marked present from a big non-present page. The remainder of the non-present pages will drop their address and attribute bits. Page table consumers treat such zero entries as unmapped. For example, GetMemoryAttributes of `EDKII_SMM_MEMORY_ATTRIBUTE_PROTOCOL` in PiSmmCpuDxeSmm returns `EFI_UNSUPPORTED` for those ranges instead of reporting EFI_MEMORY_RP. This change adds logic to populate the address and propagate attribute bits for the non-present pages. This was tested on QEMU Q35 platform and booted to OS. Co-authored-by: Kun Qin <kun.qin@microsoft.com> Signed-off-by: Kun Qin <kun.qin@microsoft.com> (cherry picked from commit 0d6d87f99485a1a3cfa7e27c74941f0f13beee66)
…on-present table This change adds a unit test for mapping a small page from a large non- present page. The expected operation is that the test should trigger the large page table entry to split and marking the newly mapped entry properly while the rest of the smaller entries remain unmapped. Signed-off-by: Kun Qin <kun.qin@microsoft.com> (cherry picked from commit 71e8a50308b8d7bde0d103a955d877b0e6e447a8)
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release/202608 #1997 +/- ##
================================================
Coverage ? 4.70%
================================================
Files ? 148
Lines ? 27592
Branches ? 527
================================================
Hits ? 1297
Misses ? 26271
Partials ? 24
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
kuqin12
marked this pull request as ready for review
October 26, 2026 21:32
Aaron (apop5)
self-requested a review
October 26, 2026 22:00
Aaron (apop5)
approved these changes
Oct 26, 2026
Oliver Smith-Denny (os-d)
approved these changes
Oct 26, 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
This change picks up the upstreamed fix of non-present page handling from edk2 in favor of mu specific changes.
For details on how to complete these options and their meaning refer to CONTRIBUTING.md.
How This Was Tested
This was verified on QEMU Q35 and booted to OS desktop.
Integration Instructions
N/A