diff --git a/crates/virtio-queue/src/lib.rs b/crates/virtio-queue/src/lib.rs index 4a886d17..d28524a4 100644 --- a/crates/virtio-queue/src/lib.rs +++ b/crates/virtio-queue/src/lib.rs @@ -155,11 +155,19 @@ pub trait QueueStateT: for<'a> QueueStateGuard<'a> { fn set_event_idx(&mut self, enabled: bool); /// Read the `idx` field from the available ring. + /// + /// # Panics + /// + /// Panics if order is Release or AcqRel. fn avail_idx(&self, mem: &M, order: Ordering) -> Result, Error> where M: GuestMemory + ?Sized; /// Read the `idx` field from the used ring. + /// + /// # Panics + /// + /// Panics if order is Release or AcqRel. fn used_idx(&self, mem: &M, order: Ordering) -> Result, Error>; /// Put a used descriptor head into the used ring.