Skip to main content

Module vmem

Module vmem 

Source

Structs§

BasicMapping
CowMapping
Mapping
MayMoveTable
A marker struct, used by an implementation of TableOps to indicate that it may need to move existing page tables
MayNotMoveTable
A marker struct, used by an implementation of TableOps to indicate that it will be able to update existing page tables in-place, without moving them.
UpdateParentNone
A struct implementing UpdateParent that is impossible to use (since its UpdateParent::update_parent method takes Void), used when it is statically known that a table operation cannot result in a need to update ancestors.

Enums§

MappingKind
Void
Our own version of ! until it is stable. Used to avoid needing to implement TableOps::update_root for ops that never need to move a table.

Constants§

PAGE_PRESENT
Page is Present
PAGE_SIZE
This is always the page size that the /guest/ is being compiled for, which may or may not be the same as the host page size.
PAGE_TABLE_ENTRIES_PER_TABLE
PAGE_TABLE_SIZE
PTE_ADDR_MASK
Mask to extract the physical address from a PTE (bits 51:12) This masks out the lower 12 flag bits AND the upper bits including NX (bit 63)

Traits§

TableMovability
A sealed trait used to collect some information about the marker structures MayMoveTable and MayNotMoveTable
TableOps
The operations used to actually access the page table structures that involve writing to them, used to allow the same code to be used in the host and the guest for page table setup.
TableReadOps
The read-only operations used to actually access the page table structures, used to allow the same code to be used in the host and the guest for page table setup. This is distinct from TableWriteOps, since there are some implementations for which writing does not make sense, and only reading is required.
UpdateParent
A helper trait that allows us to move a page table (e.g. from the snapshot to the scratch region), keeping track of the context that needs to be updated when that is moved (and potentially recursively updating, if necessary).

Functions§

map
Assumption: all are page-aligned
virt_to_phys
This function is presently used for reading the tracing data, also it is useful for debugging

Type Aliases§

PageTableEntry
PhysAddr
VirtAddr