Crate hypervisor

Source
Expand description

A crate for abstracting the underlying kernel hypervisor used in crosvm.

Re-exports§

pub use crate::caps::*;
pub use crate::x86_64::*;

Modules§

caps
kvm
x86_64

Structs§

ClockState
The state of the paravirtual clock.
Config
IoParams
Parameters describing an MMIO or PIO from the guest.
IrqRoute
A single route for an IRQ.
MemRegion
Range of GPA space. Starting from guest_address up to size.
VcpuShutdownError
A Vcpu shutdown may signify an error, such as a double or triple fault, or hypervisor specific reasons. This error covers all such cases.
VcpuSignalHandle
Handle to a virtual CPU that may be used to request a VM exit from within a signal handler.

Enums§

BalloonEvent
This is intended for use with virtio-balloon, where a guest driver determines unused ranges and requests they be freed. Use without the guest’s knowledge is sure to break something.
Datamatch
Used in Vm::register_ioevent to indicate a size and optionally value to match.
DeviceKind
A device type to create with Vm.create_device.
HypervisorKind
Supported hypervisors.
IoEventAddress
An address either in programmable I/O space or in memory mapped I/O space.
IoOperation
Operation for Io and Mmio
IrqSource
A source of IRQs in an IrqRoute.
IrqSourceChip
The source chip of an IrqSource
MPState
The MPState represents the state of a processor.
MemCacheType
Signal to the hypervisor on kernels that support the KVM_CAP_USER_CONFIGURE_NONCOHERENT_DMA (or equivalent) that during user memory region (memslot) configuration, a guest page’s memtype should be considered in SLAT effective memtype determination rather than implicitly respecting only the host page’s memtype.
ProtectionType
Whether the VM should be run in protected mode or not.
VcpuExit
A reason why a VCPU exited. One of these returns every time Vcpu::run is called.
VcpuShutdownErrorKind

Traits§

Hypervisor
A trait for checking hypervisor capabilities.
Vcpu
A virtual CPU holding a virtualized hardware thread’s state, such as registers and interrupt state, which may be used to execute virtual machines.
VcpuSignalHandleInner 🔒
Signal-safe mechanism for requesting an immediate VCPU exit.
Vm
A wrapper for using a VM and getting/setting its state.

Type Aliases§

MemSlot
An index in the list of guest-mapped memory regions.