Trait guestmem::MappableGuestMemory
source · pub trait MappableGuestMemory: Send + Sync {
// Required methods
fn map_to_guest(&mut self, gpa: u64, writable: bool) -> Result<()>;
fn unmap_from_guest(&mut self);
}
Expand description
Trait implemented to allow mapping and unmapping a region of memory at a particular guest address.
Required Methods§
sourcefn map_to_guest(&mut self, gpa: u64, writable: bool) -> Result<()>
fn map_to_guest(&mut self, gpa: u64, writable: bool) -> Result<()>
Maps the memory into the guest.
writable
specifies whether the guest can write to the memory region.
If a guest tries to write to a non-writable region, the virtual
processor will exit for MMIO handling.