@@ -576,6 +576,22 @@ pub enum SpaceAwareMapping {
576576 AnotherSpace ( SpaceReferenceMapping ) ,
577577}
578578
579+ /// Counterpart of [`walk_va_spaces`]'s `AnotherSpace` entries on the
580+ /// write side: installs a link in `op`'s root PT tree at `ref_map.our_va`
581+ /// that points at whatever intermediate table the owning space ended
582+ /// up with at `ref_map.their_va` (in `built_roots[ref_map.space]`).
583+ ///
584+ /// Callers must process [`SpaceAwareMapping`]s in the order returned
585+ /// by `walk_va_spaces`, populating `built_roots` with each space's
586+ /// rebuilt root PA before moving on to the next space — that way, by
587+ /// the time we see an `AnotherSpace` entry, the owning space's
588+ /// rebuilt root is guaranteed to be in `built_roots`.
589+ ///
590+ /// # Safety
591+ /// Same invariants as [`map`]: the caller owns the concurrency story
592+ /// around the page tables being written, and must invalidate TLBs
593+ /// afterwards if they were live.
594+ pub use arch:: space_aware_map;
579595/// Walk multiple page-table roots together, emitting either a normal
580596/// leaf mapping (`ThisSpace`) or a reference to an alias that was
581597/// already seen via an earlier root (`AnotherSpace`).
@@ -597,20 +613,3 @@ pub enum SpaceAwareMapping {
597613/// Same invariants as [`virt_to_phys`]. Callers must ensure the page
598614/// tables are not being mutated concurrently.
599615pub use arch:: walk_va_spaces;
600-
601- /// Counterpart of [`walk_va_spaces`]'s `AnotherSpace` entries on the
602- /// write side: installs a link in `op`'s root PT tree at `ref_map.our_va`
603- /// that points at whatever intermediate table the owning space ended
604- /// up with at `ref_map.their_va` (in `built_roots[ref_map.space]`).
605- ///
606- /// Callers must process [`SpaceAwareMapping`]s in the order returned
607- /// by `walk_va_spaces`, populating `built_roots` with each space's
608- /// rebuilt root PA before moving on to the next space — that way, by
609- /// the time we see an `AnotherSpace` entry, the owning space's
610- /// rebuilt root is guaranteed to be in `built_roots`.
611- ///
612- /// # Safety
613- /// Same invariants as [`map`]: the caller owns the concurrency story
614- /// around the page tables being written, and must invalidate TLBs
615- /// afterwards if they were live.
616- pub use arch:: space_aware_map;
0 commit comments