pub struct QueueConfig {
pub desc_addr: u64,
pub avail_addr: u64,
pub used_addr: u64,
pub size: u16,
pub ready: bool,
pub gpa_base: u64,
}Expand description
Configuration for a single virtqueue, as set by the guest driver via MMIO transport writes.
All addresses are guest physical addresses (GPAs). The memory slice
passed to VirtioDevice::process_queue starts at gpa_base, so
devices must subtract gpa_base to convert a GPA to a slice index.
Device-specific state (e.g. the vsock host connection manager) is
not plumbed through this struct — devices that need such state hold
it directly via their own bind_* setters.
Fields§
§desc_addr: u64Guest physical address of the descriptor table.
avail_addr: u64Guest physical address of the available (driver) ring.
used_addr: u64Guest physical address of the used (device) ring.
size: u16Queue size (number of descriptors).
ready: boolWhether the queue is ready.
gpa_base: u64GPA of the start of the guest memory slice. Devices must subtract this from descriptor addresses to get slice offsets.