Expand description
Define communication messages for the vhost-user protocol.
For message definition, please refer to the vhost-user spec.
Structs§
- Inflight I/O descriptor state for packed virtqueues
- Inflight I/O descriptor state for split virtqueues
- VHOST_USER_SET_DEVICE_STATE_FD request payload.
- Inflight I/O queue region for packed virtqueues
- Inflight I/O queue region for split virtqueues
- Virtio shared memory descriptor.
- Message to read/write device configuration space.
- Flags for the device configuration message.
- A generic message for empty message. ZST in repr(C) has same type layout as repr(rust)
- An empty message.
- Backend request message to map external memory into a shared memory region.
- Backend request message to map GPU memory into a shared memory region.
- Common message flags for vhost-user requests and replies.
- 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.
- Memory region descriptor for the SET_MEM_TABLE request.
- Memory region descriptors as payload for the SET_MEM_TABLE request.
- 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 feature flags.
- Backend request message to map a file into a shared memory region.
- Flags for SHMEM_MAP messages.
- Backend request message to unmap part of a shared memory region.
- Single memory region descriptor as payload for ADD_MEM_REG and REM_MEM_REG requests.
- A generic message to encapsulate a 64-bit value.
- Vring address descriptor.
- Flags for vring address.
- Vring state descriptor.
Enums§
- Type of requests sending from backends to frontends.
- Type of requests sent to the backend.
- Error when converting an integer to an enum value.
Constants§
- 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…
- Starting position (inclusion) of the device configuration space in virtio devices.
- Ending position (exclusion) of the device configuration space in virtio devices.
- Virtio feature flag for the vhost-user protocol features.
- Maximum number of vrings supported.
Traits§
- Message type. Either [FrontendReq] or [BackendReq].
- Vhost message Validator.
Type Aliases§
- Payload for the VhostUserConfig message.
- Payload of the VhostUserMemory message.