Struct Vmm
Source pub struct Vmm {
pub plm4_ptr: *mut PageTable,
pub hhdm_offset: u64,
}
Expand description
Kernel page-table state used by all VMM operations.
Virtual address of the active PML4 (the table installed in CR3).
Higher-Half Direct Map offset: add to any physical address to get its virtual address.
Initialize the VMM and install a kernel-owned PML4 into CR3.
§Panics
Panics if the PMM cannot allocate the PML4 frame (out of memory).
Map one 4 KiB virtual page to a physical frame. PRESENT is forced on regardless of flags.
§Safety
The caller must ensure virt is a valid kernel virtual address and phys is a
valid, PMM-allocated frame.
§Panics
Panics if the PMM runs out of frames when allocating an intermediate page table.
Unmap one 4 KiB virtual page and flush its TLB entry.
§Safety
The caller must ensure virt was previously mapped and that no live code or
data references the page after this call returns.
§Panics
Panics if any level of the walk is not present (page was never mapped).
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
Returns the argument unchanged.
Calls U::from(self).
That is, this conversion is whatever the implementation of
[From]<T> for U chooses to do.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.