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.
Trait Implementations§
Source§impl Debug for QueueConfig
impl Debug for QueueConfig
Source§impl Default for QueueConfig
impl Default for QueueConfig
Source§fn default() -> QueueConfig
fn default() -> QueueConfig
Auto Trait Implementations§
impl Freeze for QueueConfig
impl RefUnwindSafe for QueueConfig
impl Send for QueueConfig
impl Sync for QueueConfig
impl Unpin for QueueConfig
impl UnsafeUnpin for QueueConfig
impl UnwindSafe for QueueConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more