Skip to content

feat: introduce generic multi-architecture paging/address-space model - #710

Open
DID-Lab-SZU wants to merge 10 commits into
asterinas:mainfrom
DID-Lab-SZU:feat/arch-paging-model
Open

DID-Lab-SZU wants to merge 10 commits into
asterinas:mainfrom
DID-Lab-SZU:feat/arch-paging-model

Conversation

@DID-Lab-SZU

Copy link
Copy Markdown
Collaborator

No description provided.

@DID-Lab-SZU
DID-Lab-SZU requested a review from rikosellic August 18, 2026 09:22
Comment thread ostd/specs/arch/model.rs
/// A physical address that can identify a base-page frame for architecture `A`.
pub open spec fn valid_frame_paddr_for<A: ArchPagingModel>(pa: Paddr) -> bool {
pa % A::C::BASE_PAGE_SIZE() == 0 && pa < A::max_paddr_spec()
}

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.

@Marsman1996 Shall we replace all the original valid_frame_paddr with this new definition?

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 think we should, since the original valid_frame_paddr is only for x86 arch 🤔

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.

It seems they update the valid_frame_paddr to call this valid_frame_paddr_for now.

Comment thread ostd/specs/arch/model.rs
pub open spec fn paddr_to_vaddr_for<A: ArchAddressSpaceModel>(pa: Paddr) -> Vaddr {
(pa + A::linear_mapping_base_vaddr_spec()) as usize
}

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.

Like above, shall we replace all the original paddr_to_vaddr_spec (i.e., paddr_to_vaddr in spec mode ) with this new definition?

@Je5s1e
Je5s1e force-pushed the feat/arch-paging-model branch from fc8e683 to 65c41b5 Compare August 21, 2026 09:35
@Marsman1996

Copy link
Copy Markdown
Collaborator

Why we cannot call the copilot now 😣

@rikosellic

Copy link
Copy Markdown
Collaborator

This PR seems to have some overlap with the ongoing #675. I prefer to finish that first.

@Je5s1e
Je5s1e force-pushed the feat/arch-paging-model branch from 23d9881 to f158f4b Compare September 8, 2026 03:03
DID-Lab-SZU and others added 3 commits September 8, 2026 11:04
Integrate asterinas/vostd main at e3c7e11, including the fractional metadata permission refactor and Rust 1.98.1 update. Preserve the architecture paging model and its generic address proofs while resolving overlapping proof and import changes.

Keep page-table node destruction aligned with the upstream implementation and permission interfaces. Isolate Segment::from_unused in a spinoff prover to resolve the resource-limit failure without changing its contracts or executable body.

Validation: make (1523 verified, 0 errors); cargo dv focus --targets ostd -- --verify-only-module mm::frame::segment; cargo dv fmt --paths on resolved files; git diff --check.
Comment thread ostd/specs/mm/page_table/owners.rs Outdated
@rikosellic

Copy link
Copy Markdown
Collaborator

Please merge the latest main first, there is some change in lemma names.

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