Expand description
Kernel-side one-step-soundness store for the kernel virtual area API
([crate::mm::kspace::kvirt_area::KVirtArea]) — the kernel analog of
super::VmStore.
§Why a separate, kernel store
super::VmStore models a caller of the user VmSpace API: it
holds a Map<VmSpaceId, VmSpaceOwner>, each wrapping an
OwnerSubtree<UserPtConfig>, plus user-space cursors
(CursorOwner<'rcu, UserPtConfig>). KVirtArea instead maps frames
into the single, global kernel page table
(crate::mm::kspace::KERNEL_PAGE_TABLE, a KernelPtConfig table),
so the kernel store differs in three ways:
- one page table, not a map: a single
PageTableOwner<KernelPtConfig>(kernel_pt) rather thanMap<VmSpaceId, _>; - it tracks the allocated kernel virtual areas
(
kvirt_areas) — eachKVirtAreais just aRange<Vaddr>handle, since itsKVirtAreaOwneris consumed into the page table at construction (map_frames/map_untracked_framestake it by value); - cursors and owners are over
KernelPtConfig, notUserPtConfig(added when the mutating ops land).
§Roadmap
Landed: the store + invariant. Next: step_query (read-only) over
kernel_pt, then map_frames / map_untracked_frames (the
mapping-creating ops; their exec ensures may need strengthening
first). Accounting (the rc == H + P + cover_count equation
super::VmStore carries) is deferred — KVirtArea is
mapping-focused, not reference-count-focused.
Structs§
- KVmStore
- One-step-soundness store for the kernel virtual area API. Holds the
shared
regions, the single global kernel page tablekernel_pt, and the set of allocated kernel virtual areas (each aRange<Vaddr>handle — see the module docs).
Functions§
Type Aliases§
- KVirtId
- Logical identifier for an allocated [
KVirtArea] in the store.