wire / wire-format / virtio-descriptor
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).
aka: VirtIO descriptor (16 bytes)
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).
| field | size | meaning |
|---|---|---|
| addr | 8 bytes (le64) | Guest-physical address of the buffer. |
| len | 4 bytes (le32) | Length of the buffer in bytes. |
| flags | 2 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. |
| next | 2 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
agent: curl -H 'accept: application/json' wire.phall.io/wire-format/virtio-descriptor
or /wire-format/virtio-descriptor.json