Crate vm_memory

Source
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§

Modules§

  • Traits to represent an address within an address space.
  • atomicbackend-atomic
    A wrapper over an ArcSwap<GuestMemory> struct to support RCU-style mutability.
  • 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 entire GuestMemory 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.
  • Module containing versions of the standard library’s Read and Write traits compatible with volatile memory accesses.
  • mmapbackend-mmap
    The default implementation for the GuestMemory trait.
  • Types for volatile access to memory.

Traits§