Struct project3::keos_vm::pager::KernelVmPager
source · pub struct KernelVmPager {
pub loaders: BTreeMap<Gpa, PageLoader>,
/* private fields */
}
Expand description
Vm Pager of the kernel.
Fields§
§loaders: BTreeMap<Gpa, PageLoader>
Implementations§
source§impl KernelVmPager
impl KernelVmPager
sourcepub fn from_image(kernel: File, ram_in_kb: usize) -> Option<Self>
pub fn from_image(kernel: File, ram_in_kb: usize) -> Option<Self>
Create a new vm pager from the kernel image.
sourcepub fn finalize_mem(&mut self) -> Option<usize>
pub fn finalize_mem(&mut self) -> Option<usize>
Setup the page for mbinfo.
sourcepub fn map_mmio_page(
&mut self,
gpa: Gpa,
page: Page
) -> Result<(), EptMappingError>
pub fn map_mmio_page( &mut self, gpa: Gpa, page: Page ) -> Result<(), EptMappingError>
Attach a mmio page at gpa
.
sourcepub fn map_page(&mut self, gpa: Gpa, loader: PageLoader) -> bool
pub fn map_page(&mut self, gpa: Gpa, loader: PageLoader) -> bool
Attach a page at gpa
.
sourcepub fn try_lazy_paging(
&mut self,
reason: ExitReason
) -> Result<VmexitResult, VmError>
pub fn try_lazy_paging( &mut self, reason: ExitReason ) -> Result<VmexitResult, VmError>
Handle the ept violation and load the corresponding page.
Trait Implementations§
source§impl Probe for KernelVmPager
impl Probe for KernelVmPager
source§fn gpa2hpa(&self, vmcs: &ActiveVmcs, gpa: Gpa) -> Option<Pa>
fn gpa2hpa(&self, vmcs: &ActiveVmcs, gpa: Gpa) -> Option<Pa>
Translate guest physical address to host physical address
source§fn gva2hpa(&self, vmcs: &ActiveVmcs, gva: Gva) -> Option<Pa>
fn gva2hpa(&self, vmcs: &ActiveVmcs, gva: Gva) -> Option<Pa>
Translate guest virtual address to host physical address
Auto Trait Implementations§
impl !RefUnwindSafe for KernelVmPager
impl Send for KernelVmPager
impl Sync for KernelVmPager
impl Unpin for KernelVmPager
impl !UnwindSafe for KernelVmPager
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
const: unstable§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more