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§

source

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.

source

fn unmap_from_guest(&mut self)

Implementors§