Module memory

Module memory 

Source
Expand description

Module with GuestMemory implementation.

Modules§

address
Traits to represent an address within an address space.
test_utils
Test utilities

Structs§

AtomicBitmap
AtomicBitmap implements 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.
FileOffset
Represents the start point within a File that backs a GuestMemoryRegion.
GuestAddress
Represents a guest physical address (GPA).
GuestMemoryRegionState
State of a guest memory region saved to file/buffer.
GuestMemorySlot
A guest memory slot, which is a slice of a guest memory region
GuestMemoryState
Describes guest memory regions and their snapshot file mappings.
GuestRegionMmapExt
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.
MemoryRegionAddress
Represents an offset inside a region.
MmapRegion
Helper structure for working with mmaped memory regions in Unix.
MmapRegionBuilder
A factory struct to build MmapRegion objects.

Enums§

GuestRegionType
Type of the guest region
MemoryError
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 Bitmap trait with a lifetime as well.
BitmapSlice
Trait used to represent that a BitmapSlice is a Bitmap itself, but also satisfies the restriction that slices created from it have the same type as Self.
ByteValued
Types for which it is safe to initialize from raw data.
Bytes
A container to host a range of bytes and access its content.
GuestMemory
GuestMemory represents a container for an immutable collection of GuestMemoryRegion objects. GuestMemory provides the Bytes<GuestAddress> trait to hide the details of accessing guest memory by physical address. Interior mutability is not allowed for implementations of GuestMemory so that they always provide a consistent view of the memory map.
GuestMemoryExtension
Defines the interface for snapshotting memory.
GuestMemoryRegion
Represents a continuous region of guest physical memory.

Functions§

anonymous
Creates a GuestMemoryMmap from raw regions.
create
Creates a Vec of GuestRegionMmap with the given configuration
memfd_backed
Creates a GuestMemoryMmap with size in MiB backed by a memfd.
snapshot_file
Creates a GuestMemoryMmap given a file containing the data and a state containing mapping information.

Type Aliases§

BS
Helper type alias for referring to the BitmapSlice concrete type associated with an object B: WithBitmapSlice<'a>.
GuestMemoryMmap
Type of GuestMemoryMmap.
GuestMmapRegion
Type of GuestMmapRegion.
GuestRegionMmap
Type of GuestRegionMmap.
GuestUsize
Type of the raw value stored in a GuestAddress object.