Remove multikernel stubs - #511
Merged
Merged
Conversation
mkroening
force-pushed
the
no-multikernel
branch
from
July 27, 2022 10:53
30e5857 to
36c375b
Compare
Member
Author
|
bors r=stlankes |
Contributor
stlankes
added a commit
to stlankes/kernel
that referenced
this pull request
Jul 12, 2026
Mirrors the existing x86_64 common-os support in arch/aarch64/mm: * New software-defined PT-entry flag COW_MARKER (bit 58) plus the `copy_on_write()`, `user()`, `kernel()`, `execute_enable()` helpers on PageTableEntryFlags, and a PageTableEntryFlagsExt trait that matches the x86_64 API so common-os callers compile unchanged. * `mark_user_pages_copy_on_write()` walks the active TTBR0_EL1 user L0 entry and marks every writable user page READ_ONLY+COW_MARKER — the prep step before duplicating a page table for fork(). * `create_new_root_page_table` / `copy_current_root_page_table` / `drop_user_space` / `clear_user_space` / `copy_kernel_stack_to` manage per-process root tables. Kernel L0 entries (#0 kernel image, hermit-os#256+ kernel heap, hermit-os#511 self-ref) are SHARED across every task; only the user slot (#2 = LOADER_START >> 39) is private and deep-copied on fork. clear_l0 only walks the user slot and only frees a sub-table when the user-page sweep leaves it fully empty, so the kernel's own heap and stacks (which live in shared L0 entries) stay mapped. * L0 self-reference at 0x0000_FFFF_FFFF_F000 lets PT walks reach any level via virtual addresses, matching the existing x86_64 recursive PML4 idiom. mm/physicalmem.rs and scheduler/{mod,task/mod}.rs lift the `x86_64 + common-os` cfg-gates around frame_ref_inc/dec, copy_page, RootPageTable, Heap and the related Task fields to plain `feature = "common-os"`. Items still architecturally x86_64-only (fork(), spawn_thread, prepare_fork_child_stack, sys_fork/sys_waitpid) remain re-gated; aarch64 picks them up incrementally in the later stages of this series.
stlankes
added a commit
to stlankes/kernel
that referenced
this pull request
Jul 15, 2026
Mirrors the existing x86_64 common-os support in arch/aarch64/mm: * New software-defined PT-entry flag COW_MARKER (bit 58) plus the `copy_on_write()`, `user()`, `kernel()`, `execute_enable()` helpers on PageTableEntryFlags, and a PageTableEntryFlagsExt trait that matches the x86_64 API so common-os callers compile unchanged. * `mark_user_pages_copy_on_write()` walks the active TTBR0_EL1 user L0 entry and marks every writable user page READ_ONLY+COW_MARKER — the prep step before duplicating a page table for fork(). * `create_new_root_page_table` / `copy_current_root_page_table` / `drop_user_space` / `clear_user_space` / `copy_kernel_stack_to` manage per-process root tables. Kernel L0 entries (#0 kernel image, hermit-os#256+ kernel heap, hermit-os#511 self-ref) are SHARED across every task; only the user slot (#2 = LOADER_START >> 39) is private and deep-copied on fork. clear_l0 only walks the user slot and only frees a sub-table when the user-page sweep leaves it fully empty, so the kernel's own heap and stacks (which live in shared L0 entries) stay mapped. * L0 self-reference at 0x0000_FFFF_FFFF_F000 lets PT walks reach any level via virtual addresses, matching the existing x86_64 recursive PML4 idiom. mm/physicalmem.rs and scheduler/{mod,task/mod}.rs lift the `x86_64 + common-os` cfg-gates around frame_ref_inc/dec, copy_page, RootPageTable, Heap and the related Task fields to plain `feature = "common-os"`. Items still architecturally x86_64-only (fork(), spawn_thread, prepare_fork_child_stack, sys_fork/sys_waitpid) remain re-gated; aarch64 picks them up incrementally in the later stages of this series.
stlankes
added a commit
to stlankes/kernel
that referenced
this pull request
Aug 13, 2026
Mirrors the existing x86_64 common-os support in arch/aarch64/mm: * New software-defined PT-entry flag COW_MARKER (bit 58) plus the `copy_on_write()`, `user()`, `kernel()`, `execute_enable()` helpers on PageTableEntryFlags, and a PageTableEntryFlagsExt trait that matches the x86_64 API so common-os callers compile unchanged. * `mark_user_pages_copy_on_write()` walks the active TTBR0_EL1 user L0 entry and marks every writable user page READ_ONLY+COW_MARKER — the prep step before duplicating a page table for fork(). * `create_new_root_page_table` / `copy_current_root_page_table` / `drop_user_space` / `clear_user_space` / `copy_kernel_stack_to` manage per-process root tables. Kernel L0 entries (#0 kernel image, hermit-os#256+ kernel heap, hermit-os#511 self-ref) are SHARED across every task; only the user slot (#2 = LOADER_START >> 39) is private and deep-copied on fork. clear_l0 only walks the user slot and only frees a sub-table when the user-page sweep leaves it fully empty, so the kernel's own heap and stacks (which live in shared L0 entries) stay mapped. * L0 self-reference at 0x0000_FFFF_FFFF_F000 lets PT walks reach any level via virtual addresses, matching the existing x86_64 recursive PML4 idiom. mm/physicalmem.rs and scheduler/{mod,task/mod}.rs lift the `x86_64 + common-os` cfg-gates around frame_ref_inc/dec, copy_page, RootPageTable, Heap and the related Task fields to plain `feature = "common-os"`. Items still architecturally x86_64-only (fork(), spawn_thread, prepare_fork_child_stack, sys_fork/sys_waitpid) remain re-gated; aarch64 picks them up incrementally in the later stages of this series.
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.
Since multikernel support is nonexistent as far as I know, we might remove any remains of older multikernel plans.