pub struct PageTableMapPlan<T, A>where
T: TableMeta,
A: FrameAllocator,{ /* private fields */ }Expand description
Allocation-free description of where one absent leaf may be installed.
This is captured while the caller has a stable page-table view. It owns no
frames and may cross a lock boundary so allocation can happen before the
page-table mutation critical section, like Linux’s vmf->prealloc_pte.
Implementations§
Source§impl<T, A> PageTableMapPlan<T, A>where
T: TableMeta,
A: FrameAllocator,
impl<T, A> PageTableMapPlan<T, A>where
T: TableMeta,
A: FrameAllocator,
pub const fn vaddr(&self) -> VirtAddr
pub const fn page_size(&self) -> usize
Sourcepub fn prepare_path(
self,
) -> Result<Option<PageTablePathDeposit<T, A>>, PagingError>
pub fn prepare_path( self, ) -> Result<Option<PageTablePathDeposit<T, A>>, PagingError>
Prepares only the missing intermediate directories for this leaf.
Ok(None) means the complete directory path already exists. A
returned deposit owns an unreachable, zeroed suffix; publishing it is
one bounded parent-entry store and never installs the leaf itself.
Sourcepub fn prepare(
self,
paddr: PhysAddr,
config: <<T as TableMeta>::P as PageTableEntry>::PteConfig,
) -> Result<PageTableMapDeposit<T, A>, PagingError>
pub fn prepare( self, paddr: PhysAddr, config: <<T as TableMeta>::P as PageTableEntry>::PteConfig, ) -> Result<PageTableMapDeposit<T, A>, PagingError>
Allocates and initializes every missing table below the captured parent.
No live page-table entry is changed. Failure drops the unpublished partial suffix, so callers either receive a complete move-only deposit or retain the exact pre-prepare page table.