[FEATURE] Own hardware page-table roots for native address-space switching #22
Labels
No labels
alpha-1
bug
ci
docs
duplicate
enhancement
help wanted
invalid
performance
phase-6
question
refactor
security
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
erix/kernel#22
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem and motivation
Native VSpace switches currently replay recorded mappings in the shared active page-table hierarchy. This makes each switch depend on the size of the participating address spaces, including during IPC. The executed-code investigation in Integration #3 identifies Kernel mapping batching and permission switching as leading code candidates. Those counts do not establish elapsed-time ownership or a speedup. Growing compiler heaps and threaded runtimes make this a relevant prerequisite for runtime memory and threading and complete native toolchain self-hosting.
Proposed behavior and scope
Give each native VSpace an owned hardware page-table root. Switching between already prepared address spaces must select the exact live root without replaying every recorded user mapping. Mapping creation, permission changes and revocation still update the authorized VSpace and complete required invalidation. Shared threads retain their existing VSpace identity; switching threads must preserve independent stack/TLS and process lifetime rules.
Kernel owns root construction, activation, table-page ownership and retirement. Coordinate existing Memd, Vspaced, Pagerd, Procd and Rootd consumers only where their contracts need changes. Integration owns native isolation/failure scenarios, exact-source images and profiling; Docs owns the memory, lifecycle and testing manual contracts. Preserve the native capability ABI unless a separately specified change is necessary. This is not a POSIX identity-based authority mechanism.
Authority, security and reliability
Acceptance criteria
Checklist
Alternatives and tradeoffs
Further bit-expression rewrites are insufficient evidence: the first isolated permission-encoder comparison produces the same 17 instructions and 63 bytes. Scoped batching and live table hints remain useful for actual mutations, but preserving a shared hierarchy still requires per-page work on a switch. Independent roots add table ownership and invalidation complexity, so security and failure semantics precede performance. Root-layout sharing, bootstrap migration and CPU residency need explicit implementation evidence; no speedup or isolation claim follows from this proposal alone.
Tracking and rollout
Coordinate with target-memory ownership, native process switching, and runtime memory and threading. Integration owns matching images and profiling; Docs owns the technical manual. This remains part of Alpha 1 completion.
erikinkinen referenced this issue2026-09-21 23:56:11 +02:00
erikinkinen referenced this issue from erix/integration2026-09-22 00:24:42 +02:00
erikinkinen referenced this issue from erix/docs2026-09-22 06:47:49 +02:00
erikinkinen referenced this issue from erix/bootloader2026-09-24 14:43:22 +02:00