Expand description
Module with GuestMemory implementation.
Modules§
- address
- Traits to represent an address within an address space.
- test_
utils - Test utilities
Structs§
- Atomic
Bitmap AtomicBitmapimplements a simple bit map on the page level with test and set operations. It is page-size aware, so it converts addresses to page numbers before setting or clearing the bits.- File
Offset - Represents the start point within a
Filethat backs aGuestMemoryRegion. - Guest
Address - Represents a guest physical address (GPA).
- Guest
Memory Region State - State of a guest memory region saved to file/buffer.
- Guest
Memory Slot - A guest memory slot, which is a slice of a guest memory region
- Guest
Memory State - Describes guest memory regions and their snapshot file mappings.
- Guest
Region Mmap Ext - An extension to GuestMemoryRegion that can be split into multiple KVM slots of the same slot_size, and stores the type of region, and the starting KVM slot number.
- Memory
Region Address - Represents an offset inside a region.
- Mmap
Region - Helper structure for working with mmaped memory regions in Unix.
- Mmap
Region Builder - A factory struct to build
MmapRegionobjects.
Enums§
- Guest
Region Type - Type of the guest region
- Memory
Error - Errors associated with dumping guest memory to file.
Traits§
- Address
- Trait to represent an address within an address space.
- Bitmap
- Common bitmap operations. Using Higher-Rank Trait Bounds (HRTBs) to effectively define
an associated type that has a lifetime parameter, without tagging the
Bitmaptrait with a lifetime as well. - Bitmap
Slice - Trait used to represent that a
BitmapSliceis aBitmapitself, but also satisfies the restriction that slices created from it have the same type asSelf. - Byte
Valued - Types for which it is safe to initialize from raw data.
- Bytes
- A container to host a range of bytes and access its content.
- Guest
Memory GuestMemoryrepresents a container for an immutable collection ofGuestMemoryRegionobjects.GuestMemoryprovides theBytes<GuestAddress>trait to hide the details of accessing guest memory by physical address. Interior mutability is not allowed for implementations ofGuestMemoryso that they always provide a consistent view of the memory map.- Guest
Memory Extension - Defines the interface for snapshotting memory.
- Guest
Memory Region - Represents a continuous region of guest physical memory.
Functions§
- anonymous
- Creates a GuestMemoryMmap from raw regions.
- create
- Creates a
VecofGuestRegionMmapwith the given configuration - memfd_
backed - Creates a GuestMemoryMmap with
sizein MiB backed by a memfd. - snapshot_
file - Creates a GuestMemoryMmap given a
filecontaining the data and astatecontaining mapping information.
Type Aliases§
- BS
- Helper type alias for referring to the
BitmapSliceconcrete type associated with an objectB: WithBitmapSlice<'a>. - Guest
Memory Mmap - Type of GuestMemoryMmap.
- Guest
Mmap Region - Type of GuestMmapRegion.
- Guest
Region Mmap - Type of GuestRegionMmap.
- Guest
Usize - Type of the raw value stored in a
GuestAddressobject.