Skip to main content

Crate guestmem

Crate guestmem 

Source
Expand description

Interfaces to read and write guest memory.

Modules§

ranges
GuestMemory-backed readers and writers for guest memory ranges.

Structs§

AlignedHeapMemory
A page-aligned heap allocation for use with GuestMemory.
BitmapInfo
Returned by GuestMemoryAccess::access_bitmap.
GuestMemory
A wrapper around a GuestMemoryAccess that provides methods for safely reading and writing guest memory.
GuestMemoryBackingError
A memory access error returned by a GuestMemoryAccess trait method.
GuestMemoryError
A memory access error returned by one of the GuestMemory methods.
GuestMemorySharing
Opaque control object for accessing the shareable backing of guest memory. Not all GuestMemory instances support this — those backed by private memory or heap allocations return None.
InvalidGpn
Limit
Wraps a MemoryRead / MemoryWrite with a byte cap.
LockedPages
LockedRangeImpl
PageFaultError
An error returned by a page fault handler in GuestMemoryAccess::page_fault.
ShareableRegion
A shareable region of guest memory backed by a file (Unix) or section handle (Windows).

Enums§

AccessError
An error accessing byte-oriented guest memory via MemoryRead or MemoryWrite.
AccessType
The type of access that guest memory will be used for.
GuestMemoryErrorKind
The kind of memory access error.
GuestMemoryOperation
Describes the guest-memory operation that failed.
MultiRegionError
PageFaultAction
The action to take after GuestMemoryAccess::page_fault returns to continue the operation.

Constants§

PAGE_SIZE
Effective page size for page-related operations shared with guestmem.

Traits§

DoorbellRegistration
Doorbell provides a mechanism to register for notifications on writes to specific addresses in guest memory.
GuestMemoryAccess
A trait for a guest memory backing.
LinearGuestMemory
A trait for a guest memory backing that is fully available via a virtual address mapping, as opposed to the fallback functions such as GuestMemoryAccess::read_fallback.
LockedRange
Represents a range of locked guest pages as an ordered list of the VA sub-ranges to which the guest pages are mapped. The range may only partially span the first and last page and must fully span all intermediate pages.
MapRom
Trait to map a ROM at one or more locations in guest memory.
MappableGuestMemory
Trait implemented to allow mapping and unmapping a region of memory at a particular guest address.
MappedMemoryRegion
Trait implemented for a region of memory that can have memory mapped into it.
MemoryMapper
Trait implemented to allow the creation of memory regions.
MemoryRead
MemoryWrite
A trait for sequentially updating a region of memory.
ProvideShareableRegions
Trait for providing shareable region information.
UnmapRom
Trait to unmap a ROM from guest memory.

Functions§

rcu
The RCU domain memory accesses occur under. Updates to any memory access bitmaps must be synchronized under this domain.

Type Aliases§

Page
The [AtomicU8; PAGE_SIZE] representation of a single page.
ShareableRegionError
Error type for ProvideShareableRegions::get_regions.