Expand description
Define communication messages for the vhost-user protocol.
For message definition, please refer to the vhost-user spec.
Structs§
- Desc
State Packed - Inflight I/O descriptor state for packed virtqueues
- Desc
State Split - Inflight I/O descriptor state for split virtqueues
- Device
State Transfer Parameters - VHOST_USER_SET_DEVICE_STATE_FD request payload.
- Queue
Region Packed - Inflight I/O queue region for packed virtqueues
- Queue
Region Split - Inflight I/O queue region for split virtqueues
- Vhost
Shared Memory Region - Virtio shared memory descriptor.
- Vhost
User Config - Message to read/write device configuration space.
- Vhost
User Config Flags - Flags for the device configuration message.
- Vhost
User Empty Message - A generic message for empty message. ZST in repr(C) has same type layout as repr(rust)
- Vhost
User Empty Msg - An empty message.
- Vhost
User External MapMsg - Backend request message to map external memory into a shared memory region.
- Vhost
User GpuMap Msg - Backend request message to map GPU memory into a shared memory region.
- Vhost
User Header Flag - Common message flags for vhost-user requests and replies.
- Vhost
User Inflight - Single memory region descriptor as payload for ADD_MEM_REG and REM_MEM_REG requests. This struct is defined by qemu and compiles with arch-dependent padding. Interestingly, all our supported archs (arm, aarch64, x86_64) has same data layout for this type.
- Vhost
User Memory - Memory region descriptor for the SET_MEM_TABLE request.
- Vhost
User Memory Region - Memory region descriptors as payload for the SET_MEM_TABLE request.
- Vhost
User MsgHeader - Common message header for vhost-user requests and replies. A vhost-user message consists of 3 header fields and an optional payload. All numbers are in the machine native byte order.
- Vhost
User Protocol Features - Vhost-user protocol feature flags.
- Vhost
User Shmem MapMsg - Backend request message to map a file into a shared memory region.
- Vhost
User Shmem MapMsg Flags - Flags for SHMEM_MAP messages.
- Vhost
User Shmem Unmap Msg - Backend request message to unmap part of a shared memory region.
- Vhost
User Single Memory Region - Single memory region descriptor as payload for ADD_MEM_REG and REM_MEM_REG requests.
- Vhost
User U64 - A generic message to encapsulate a 64-bit value.
- Vhost
User Vring Addr - Vring address descriptor.
- Vhost
User Vring Addr Flags - Flags for vring address.
- Vhost
User Vring State - Vring state descriptor.
Enums§
- Backend
Req - Type of requests sending from backends to frontends.
- Frontend
Req - Type of requests sent to the backend.
- ReqError
- Error when converting an integer to an enum value.
- Vhost
User Migration Phase - Vhost
User Transfer Direction
Constants§
- MAX_
ATTACHED_ FD_ ENTRIES - The VhostUserMemory message has variable message size and variable number of attached file descriptors. Each user memory region entry in the message payload occupies 32 bytes, so setting maximum number of attached file descriptors based on the maximum message size. But rust only implements Default and AsMut traits for arrays with 0 - 32 entries, so further reduce the maximum number…
- VHOST_
USER_ CONFIG_ OFFSET - Starting position (inclusion) of the device configuration space in virtio devices.
- VHOST_
USER_ CONFIG_ SIZE - Ending position (exclusion) of the device configuration space in virtio devices.
- VHOST_
USER_ F_ PROTOCOL_ FEATURES - Virtio feature flag for the vhost-user protocol features.
- VHOST_
USER_ MAX_ VRINGS - Maximum number of vrings supported.
- VIRTIO_
F_ RING_ PACKED
Traits§
- Req
- Message type. Either [FrontendReq] or [BackendReq].
- Vhost
User MsgValidator - Vhost message Validator.
Type Aliases§
- Vhost
User Config Payload - Payload for the VhostUserConfig message.
- Vhost
User Memory Payload - Payload of the VhostUserMemory message.