Skip to content

Remove multikernel stubs - #511

Merged
bors[bot] merged 1 commit into
hermit-os:masterfrom
mkroening:no-multikernel
Jul 27, 2022
Merged

bors[bot] merged 1 commit into
hermit-os:masterfrom
mkroening:no-multikernel

Conversation

@mkroening

Copy link
Copy Markdown
Member

Since multikernel support is nonexistent as far as I know, we might remove any remains of older multikernel plans.

@mkroening
mkroening requested a review from stlankes July 26, 2022 22:22
@mkroening

Copy link
Copy Markdown
Member Author

bors r=stlankes

@bors

bors Bot commented Jul 27, 2022

Copy link
Copy Markdown
Contributor

@bors
bors Bot merged commit afbcfde into hermit-os:master Jul 27, 2022
@mkroening
mkroening deleted the no-multikernel branch July 27, 2022 11:22
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant