diff --git a/src/handler.rs b/src/handler.rs index bfaad88..5cba893 100644 --- a/src/handler.rs +++ b/src/handler.rs @@ -396,6 +396,14 @@ where self.vrings[index as usize].set_kick(None); self.vrings[index as usize].set_call(None); + // Strictly speaking, we should do this upon receiving the first kick, + // but it's actually easier to just do it here so we're ready in case + // the vring gets re-initialized by the guest. + self.vrings[index as usize] + .get_mut() + .get_queue_mut() + .reset(); + let next_avail = self.vrings[index as usize].queue_next_avail(); Ok(VhostUserVringState::new(index, u32::from(next_avail)))