pub struct PageTable<C: PageTableConfig> {
pub root: PageTableNode<C>,
}Expand description
A handle to a page table. A page table can track the lifetime of the mapped physical pages.
Fields§
§root: PageTableNode<C>Implementations§
Source§impl<C: PageTableConfig> PageTable<C>
impl<C: PageTableConfig> PageTable<C>
Sourcepub uninterp fn root_paddr_spec(&self) -> Paddr
pub uninterp fn root_paddr_spec(&self) -> Paddr
Sourcepub exec fn empty() -> Self
pub exec fn empty() -> Self
Create a new empty page table.
Useful for the IOMMU page tables only.
Sourcepub exec fn root_paddr(&self) -> r : Paddr
pub exec fn root_paddr(&self) -> r : Paddr
The physical address of the root page table.
Obtaining the physical address of the root page table is safe, however, using it or providing it to the hardware will be unsafe since the page table node may be dropped, resulting in UAF.
Sourcepub exec fn cursor_mut<'rcu, G: InAtomicMode>(
&'rcu self,
guard: &'rcu G,
va: &Range<Vaddr>,
) -> Result<(CursorMut<'rcu, C, G>, Tracked<CursorOwner<'rcu, C>>), PageTableError>
pub exec fn cursor_mut<'rcu, G: InAtomicMode>( &'rcu self, guard: &'rcu G, va: &Range<Vaddr>, ) -> Result<(CursorMut<'rcu, C, G>, Tracked<CursorOwner<'rcu, C>>), PageTableError>
Create a new cursor exclusively accessing the virtual address range for mapping.
If another cursor is already accessing the range, the new cursor may wait until the previous cursor is dropped.
Sourcepub exec fn cursor<'rcu, G: InAtomicMode>(
&'rcu self,
guard: &'rcu G,
va: &Range<Vaddr>,
) -> Result<(Cursor<'rcu, C, G>, Tracked<CursorOwner<'rcu, C>>), PageTableError>
pub exec fn cursor<'rcu, G: InAtomicMode>( &'rcu self, guard: &'rcu G, va: &Range<Vaddr>, ) -> Result<(Cursor<'rcu, C, G>, Tracked<CursorOwner<'rcu, C>>), PageTableError>
Tracked(owner): Tracked <& mut OwnerSubtree <C>>,
Tracked(guard_perm): Tracked <& vstd ::simple_pptr ::PointsTo <PageTableGuard <'rcu,C>>>,Create a new cursor exclusively accessing the virtual address range for querying.
If another cursor is already accessing the range, the new cursor may wait until the previous cursor is dropped. The modification to the mapping by the cursor may also block or be overridden by the mapping of another cursor.