Skip to main content

space_aware_map

Function space_aware_map 

Source
pub unsafe fn space_aware_map<Op: TableOps>(
    _op: &Op,
    _ref_map: SpaceReferenceMapping,
    _built_roots: &BTreeMap<SpaceId, Op::TableAddr>,
)
Expand description

Counterpart of walk_va_spaces’s AnotherSpace entries on the write side: installs a link in op’s root PT tree at ref_map.our_va that points at whatever intermediate table the owning space ended up with at ref_map.their_va (in built_roots[ref_map.space]).

Callers must ensure that built_roots contains populated page tables for any other space referenced by the mapping.

§Safety

Same invariants as map: the caller owns the concurrency story around the page tables being written, and must invalidate TLBs afterwards if they were live. See walk_va_spaces: amd64 never emits AnotherSpace, so this is unreachable in practice. It silently no-ops (rather than panicking) to keep the architecture-independent re-export usable.