pub trait GuestMemory: Send + Sync {
// Required methods
fn read(&self, gpa: u64, buf: &mut [u8]) -> Result<()>;
fn write(&self, gpa: u64, data: &[u8]) -> Result<()>;
// Provided methods
fn read_u64(&self, gpa: u64) -> Result<u64> { ... }
fn read_u32(&self, gpa: u64) -> Result<u32> { ... }
}Expand description
Access to guest-physical memory.
Implement this for whatever owns the guest RAM. The crate ships
MappedMemory, which covers the common case where guest RAM is
mapped into the tracer’s own address space (your own VMM, or QEMU via
the LD_PRELOAD interposer).
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".