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§
- Virtio device async helper functions.
- balloon 🔒
- Virtio console device.
- Virtqueue descriptor chain abstraction
- Contains constants and struct definitions used for implementing vhost-user frontend devices without compile-time dependencies on their corresponding backend devices.
- 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-wayland
andvirtio-gpu
for 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.
- 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_desc
in 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
DescriptorChain
that has been peeked from aQueue
but 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.
- When we request to stop the worker, this represents the terminal state for the thread (if it exists).
- Type of virtio transport.
Constants§
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
src
to 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.
- 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.