Skip to content

[Rebase & FF] Adding "supervisor" feature flag and page table iterator#182

Merged
kuqin12 merged 2 commits into
OpenDevicePartnership:mainfrom
kuqin12:supv_bit
Jun 18, 2026
Merged

[Rebase & FF] Adding "supervisor" feature flag and page table iterator#182
kuqin12 merged 2 commits into
OpenDevicePartnership:mainfrom
kuqin12:supv_bit

Conversation

@kuqin12

@kuqin12 kuqin12 commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

Description

This change adds the mm_supv feature, 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.

  • Impacts functionality?
  • Impacts security?
  • Breaking change?
  • Includes tests?
  • Includes documentation?

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_supv feature flag.

@codecov

codecov Bot commented Mar 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.07692% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/paging.rs 97.70% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@kuqin12 kuqin12 marked this pull request as ready for review June 4, 2026 18:04
@kuqin12 kuqin12 requested review from makubacki and os-d and removed request for os-d June 4, 2026 18:04
Comment thread src/x64/structs.rs Outdated
Comment thread src/x64/structs.rs Outdated
Comment thread src/x64/structs.rs Outdated
Comment thread src/x64.rs Outdated
Comment thread src/x64.rs Outdated
Comment thread Cargo.toml Outdated

@makubacki makubacki left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to review again after the page table iterator is added since that will be a relatively large change for the PR.

Comment thread src/lib.rs Outdated
@kuqin12 kuqin12 force-pushed the supv_bit branch 2 times, most recently from 6faf63b to 992acfa Compare June 10, 2026 09:11
@kuqin12 kuqin12 changed the title Adding "mm_supv" feature Adding "supervisor" feature flag and page table iterator Jun 10, 2026
@kuqin12 kuqin12 changed the title Adding "supervisor" feature flag and page table iterator [Rebase & FF] Adding "supervisor" feature flag and page table iterator Jun 10, 2026
@kuqin12 kuqin12 force-pushed the supv_bit branch 2 times, most recently from 7c4a43b to 03e7877 Compare June 10, 2026 09:29
Comment thread src/paging.rs
Comment thread src/x64.rs Outdated
Comment thread src/paging.rs Outdated
@kuqin12 kuqin12 force-pushed the supv_bit branch 4 times, most recently from e0a1693 to be9db08 Compare June 12, 2026 09:13
Comment thread src/x64/structs.rs Outdated
Comment thread src/x64.rs Outdated
Comment thread src/paging.rs
Comment thread src/paging.rs Outdated
@kuqin12 kuqin12 force-pushed the supv_bit branch 3 times, most recently from 8477b9c to 09526fe Compare June 17, 2026 08:24
kuqin12 added 2 commits June 17, 2026 17:10
This change adds a paging iterator, which walks through the page table
in a depth-first fashion and return the entry in `MappedRegion` struct.

This provides the consumer a function to go over the page table instance
for various needs.

Signed-off-by: Kun Qin <kuqin@microsoft.com>
This change adds a "supervisor" feature, 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.

Signed-off-by: Kun Qin <kuqin@microsoft.com>
@kuqin12 kuqin12 enabled auto-merge (rebase) June 18, 2026 00:10
@kuqin12 kuqin12 merged commit 3b3f014 into OpenDevicePartnership:main Jun 18, 2026
7 checks passed
@kuqin12 kuqin12 deleted the supv_bit branch June 18, 2026 00:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants