Expand description
Implements virtio devices, queues, and transport mechanisms.
Re-exportsΒ§
pub use self::block::BlockAsync;pub use self::console::Console;pub use self::gpu::DisplayBackend;pub use self::gpu::Gpu;pub use self::gpu::GpuMode;pub use self::gpu::GpuParameters;pub use self::gpu::GpuWsi;pub use self::net::Net;pub use self::net::NetError;pub use self::net::NetParameters;pub use self::net::NetParametersMode;pub use self::scsi::Controller as ScsiController;pub use self::scsi::DiskConfig as ScsiDiskConfig;pub use self::vhost_user_frontend::VhostUserFrontend;pub use self::DeviceType::Pvclock;pub use self::net::VhostNetParameters;pub use self::net::VHOST_NET_DEFAULT_PATH;pub use self::snd::new_sound;pub use self::wl::Wl;
ModulesΒ§
- async_utils πVirtio device async helper functions.
 - balloon π
 - Virtio console device.
 - descriptor_chain πVirtqueue descriptor chain abstraction
 - descriptor_utils π
 - Contains constants and struct definitions used for implementing vhost-user frontend devices without compile-time dependencies on their corresponding backend devices.
 - interrupt π
 - iommu π
 - Provide utility to communicate with an iommu in another process
 - Support for virtio-media devices in crosvm.
 - MemoryMapper trait and basic impl for virtio-iommu implementation
 - p9 π
 - pmem π
 - Virtio version of a linux pvclock clocksource.
 - queue πvirtqueue interface
 - This module defines the protocol between
virtio-waylandandvirtio-gpufor sharing resources that are backed by file descriptors. - rng π
 - tpm π
 - Wraps VfioContainer for virtio-iommu implementation
 - Implements vhost-based virtio devices.
 - VirtioDevice implementation for the VMM side of a vhost-user connection.
 - video πThis module implements the virtio video encoder and decoder devices. The current implementation uses v3 RFC of the virtio-video protocol.
 - virtio_device π
 - virtio_mmio_device π
 - virtio_pci_device π
 - This module implements the virtio vsock device.
 - This module implements the virtio wayland used by the guest to access the hostβs wayland server.
 
StructsΒ§
- Virtio device for memory balloon inflation/deflation.
 - A single virtio split queue descriptor (
struct virtq_descin the spec). - A virtio descriptor chain.
 - Virtio device for IOMMU memory management.
 - Virtio device for sharing specific directories on the host system with the guest VM.
 - A
DescriptorChainthat has been peeked from aQueuebut not popped yet. - Configuration of a virtio-pmem device.
 - A virtio queueβs parameters.
 - Provides high-level interface over the sequence of memory regions defined by readable descriptors in the descriptor chain.
 - Virtio device for exposing entropy to the guest OS through virtio.
 - Iterator over the descriptors of a split virtqueue descriptor chain.
 - Virtio vTPM device.
 - Implements the MMIO transport for virtio devices.
 - Implements the PCI transport for virtio devices.
 - Provides high-level interface over the sequence of memory regions defined by writable descriptors in the descriptor chain.
 
EnumsΒ§
- Specifies how memory slot is initialized.
 - Virtqueue interface representing different types of virtqueues The struct of each queue type is wrapped in the enum variants
 - Type of Virtio device memory mapping to use.
 - StoppedWorker πWhen we request to stop the worker, this represents the terminal state for the thread (if it exists).
 - Type of virtio transport.
 
ConstantsΒ§
- DEVICE_RESET π
 - VIRTIO_MSI_NO_VECTOR π
 
TraitsΒ§
- Iterator over the descriptors of a descriptor chain.
 - Trait for mapping memory into the deviceβs shared memory region.
 - Trait for virtio devices to be driven by a virtio transport.
 
FunctionsΒ§
- Returns the set of reserved base features common to all virtio devices.
 - Copy virtio device configuration data from a subslice of
srcto a subslice ofdst. Unlike std::slice::copy_from_slice(), this function copies as much as possible within the common subset of the two slices, truncating the requested range instead of panicking if the slices do not match in size. - Test utility function to create a descriptor chain in guest memory.
 - create_stop_oneshot πCreates a oneshot channel, returning the rx end and adding the tx end to the provided
Vec. Useful for creating oneshots that signal a virtqueue future to stop processing and exit.