Expand description
Traits for allocating, handling and interacting with the VM’s physical memory.
For a typical hypervisor, there are several components, such as boot loader, virtual device drivers, virtio backend drivers and vhost drivers etc, that need to access VM’s physical memory. This crate aims to provide a set of stable traits to decouple VM memory consumers from VM memory providers. Based on these traits, VM memory consumers could access VM’s physical memory without knowing the implementation details of the VM memory provider. Thus hypervisor components, such as boot loader, virtual device drivers, virtio backend drivers and vhost drivers etc, could be shared and reused by multiple hypervisors.
Re-exports§
pub use address::Address;
pub use address::AddressValue;
pub use bytes::AtomicAccess;
pub use bytes::ByteValued;
pub use bytes::Bytes;
pub use endian::Be16;
pub use endian::Be32;
pub use endian::Be64;
pub use endian::BeSize;
pub use endian::Le16;
pub use endian::Le32;
pub use endian::Le64;
pub use endian::LeSize;
pub use guest_memory::Error as GuestMemoryError;
pub use guest_memory::FileOffset;
pub use guest_memory::GuestAddress;
pub use guest_memory::GuestAddressSpace;
pub use guest_memory::GuestMemory;
pub use guest_memory::GuestMemoryRegion;
pub use guest_memory::GuestUsize;
pub use guest_memory::MemoryRegionAddress;
pub use guest_memory::Result as GuestMemoryResult;
pub use mmap::Error;
pub use mmap::GuestMemoryMmap;
pub use mmap::GuestRegionMmap;
pub use mmap::MmapRegion;
pub use volatile_memory::Error as VolatileMemoryError;
pub use volatile_memory::Result as VolatileMemoryResult;
pub use volatile_memory::VolatileArrayRef;
pub use volatile_memory::VolatileMemory;
pub use volatile_memory::VolatileRef;
pub use volatile_memory::VolatileSlice;
Modules§
- Traits to represent an address within an address space.
- This module holds abstractions that enable tracking the areas dirtied by writes of a specified length to a given offset. In particular, this is used to track write accesses within a
GuestMemoryRegion
object, and the resulting bitmaps can then be aggregated to build the global view for an entireGuestMemory
object. - Define the
ByteValued
trait to mark that it is safe to instantiate the struct with random data. - Explicit endian types useful for embedding in structs or reinterpreting data.
- Traits to track and access the physical memory of the guest.
- The default implementation for the
GuestMemory
trait. - Types for volatile access to memory.
Traits§
- Safety