wire / wire-format / virtio-descriptor

VirtIO descriptor (16 bytes)

A VirtIO device's virtqueue is an array of 16-byte descriptors. Each descriptor: 8-byte guest-physical address of the buffer, 4-byte length, 2-byte flags (NEXT, WRITE, INDIRECT), 2-byte next descriptor index (if NEXT or INDIRECT).

wire-format kind wire-format status standard verification verified tier B wire-format@1

aka: VirtIO descriptor (16 bytes)

wire format

spec: VirtIO specification (OASIS)

A VirtIO device's virtqueue is an array of 16-byte descriptors. Each descriptor: 8-byte guest-physical address of the buffer, 4-byte length, 2-byte flags (NEXT, WRITE, INDIRECT), 2-byte next descriptor index (if NEXT or INDIRECT).

fieldsizemeaning
addr8 bytes (le64)Guest-physical address of the buffer.
len4 bytes (le32)Length of the buffer in bytes.
flags2 bytes (le16)VRING_DESC_F_NEXT (1): next field is valid. VRING_DESC_F_WRITE (2): buffer is device-writable. VRING_DESC_F_INDIRECT (4): buffer contains a list of descriptors.
next2 bytes (le16)Index of the next descriptor (if NEXT) or number of descriptors (if INDIRECT).

example:

00 00 10 00 00 00 00 00 00 10 00 00 03 00 01 00

Descriptor: addr=0x100000, len=0x1000, flags=3 (NEXT|WRITE), next=1


provenance

agent: curl -H 'accept: application/json' wire.phall.io/wire-format/virtio-descriptor or /wire-format/virtio-descriptor.json