Crate virtio_spec

Source
Expand description

This crate contains the Rust equivalents of the definitions from the Virtual I/O Device (VIRTIO) Specification. This crate aims to be unopinionated regarding actual VIRTIO drivers that are implemented on top of this crate.

§Usage

We recommend to rename this crate to virtio when adding the dependency. This allows closely matching the specification when using definitions:

Either run

cargo add virtio-spec --rename virtio

or manually edit your Cargo.toml:

[dependencies]
virtio = { package = "virtio-spec", version = "x.y.z" }

§Features

This crate has the following Cargo features:

§Implementation Status

This crate adds new modules by demand. If you need anything that is not available yet, please open an issue.

§Virtqueues

VirtqueueAvailableModule
Split Virtqueuesvirtq
Packed Virtqueuespvirtq

§Transport Options

Transport OptionAvailableModule
PCI Buspci
MMIOmmio
Channel I/O

§Device Types

Device TypeAvailableModule
Network Devicenet
Block Device
Console Device
Entropy Device
Traditional Memory Balloon Device
SCSI Host Device
GPU Device
Input Device
Crypto Device
Socket Devicevsock
File System Devicefs
RPMB Device
IOMMU Device
Sound Device
Memory Device
I2C Adapter Device
SCMI Device
GPIO Device
PMEM Device

Modules§

fs
File System Device
mmiommio
Definitions for Virtio over MMIO.
net
Network Device
pcipci
Definitions for Virtio over PCI bus.
pvirtq
Packed virtqueue definitions
virtq
Virtqueue definitions
volatile
Volatile Pointer Types.
vsock
Socket Device

Structs§

Be
An integer stored in big-endian byte order.
DeviceStatus
Device Status Field
F
Device-independent Feature Bits
Le
An integer stored in little-endian byte order.

Enums§

Id
Virtio Device IDs
RingEventFlags
Descriptor Ring Change Event Flags

Traits§

DeviceConfigSpace
Common device configuration space functionality.
FeatureBits
Feature Bits

Type Aliases§

be16
A 16-bit unsigned integer stored in big-endian byte order.
be32
A 32-bit unsigned integer stored in big-endian byte order.
be64
A 64-bit unsigned integer stored in big-endian byte order.
be128
A 128-bit unsigned integer stored in big-endian byte order.
le16
A 16-bit unsigned integer stored in little-endian byte order.
le32
A 32-bit unsigned integer stored in little-endian byte order.
le64
A 64-bit unsigned integer stored in little-endian byte order.
le128
A 128-bit unsigned integer stored in little-endian byte order.