Crate vm_control
source ·Expand description
Handles IPC for controlling the main VM process.
The VM Control IPC protocol is synchronous, meaning that each VmRequest
sent over a connection
will receive a VmResponse
for that request next time data is received over that connection.
The wire message format is a little-endian C-struct of fixed size, along with a file descriptor if the request type expects one.
Re-exports§
pub use sys::FsMappingRequest;
pub use sys::VmMemoryMappingRequest;
pub use sys::VmMemoryMappingResponse;
pub use crate::gdb::VcpuDebug;
pub use crate::gdb::VcpuDebugStatus;
pub use crate::gdb::VcpuDebugStatusMessage;
Modules§
- vm_control API client for use within crosvm
- Balloon related control APIs.
Structs§
- Utility for multiplexing a balloon tube between multiple control tubes. Commands are sent and processed serially.
- Used for VM to control battery properties.
- A guard to guarantee that all devices are sleeping during its scope.
- Request to register or unregister an ioevent.
- Reads snapshots created by
SnapshotWriter
. - Writer of serialized VM snapshots.
- Request to restore a Vcpu from a given snapshot, and report the results back via the provided channel.
- A guard to guarantee that all the vCPUs are suspended during the scope.
- Request to mmap a file to a shared memory. This request is supposed to follow a
VmMemoryRequest::MmapAndRegisterMemory
request that containsSharedMemory
thatfile
is mmaped to. - Identifer for registered memory regions. Globally unique.
- Struct for managing
VmMemoryRequest
s IOMMU related state.
Enums§
- Commands for actions on devices and the devices control thread.
- Commands to control the IRQ handler thread.
- Response for IrqHandlerRequest.
- Data to set up an IRQ event or IRQ route on the IRQ chip. VmIrqRequest::execute can’t take an
IrqChip
argument, because of a dependency cycle between devices and vm_control, so it takes a Fn that processes anIrqSetup
. - Enum that allows remote control of a wait context (used between the Windows GpuDisplay & the GPU worker).
- Net control commands for adding and removing tap devices.
- Result for hotplug and removal of PCI device.
- Message for communicating a suspend or resume to the virtio-pvclock device.
- Message used by virtio-pvclock to communicate command results.
- NOTE: when making any changes to this enum please also update RegisteredEventFfi in crosvm_control/src/lib.rs
- Commands for snapshot feature
- Commands for vmm-swap feature
- Control the state of a particular VM CPU.
- A request to the virtio-iommu process to perform some operations.
- Indication of success or failure of a
VirtioIOMMURequest
. - Destination of a
VmMemoryRequest::RegisterMemory
mapping in guest address space. - Source of a
VmMemoryRequest::RegisterMemory
mapping. - A request to the main process to perform some operation on the VM.
- Indication of success or failure of a
VmRequest
. - Mode of execution for the VM.
Constants§
- The maximum number of devices that can be listed in one
UsbControlCommand
.
Traits§
Functions§
- Restore the VM to the snapshot at
restore_path
. - Snapshot the VM to file at
snapshot_path
- WARNING: descriptor must be a mapping handle on Windows.
- Send VirtioIOMMURequest and wait to get the response
- Send VirtioIOMMURequest without waiting for the response
Type Aliases§
- An index in the list of guest-mapped memory regions.