From 5f987104717ed3f18d0e4c35162d6eb0c287f8ee Mon Sep 17 00:00:00 2001 From: Sebastien Boeuf Date: Wed, 20 Jul 2022 17:29:19 +0200 Subject: [PATCH] virtio-devices: vhost-user: Stop the vrings on a virtio reset Whenever a virtio reset happens, the vhost-user backend should be notified that the vring should be stopped. This is performed by calling GET_VRING_BASE on the appropriate queue indexes. Signed-off-by: Sebastien Boeuf --- virtio-devices/src/vhost_user/vu_common_ctrl.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/virtio-devices/src/vhost_user/vu_common_ctrl.rs b/virtio-devices/src/vhost_user/vu_common_ctrl.rs index ecdc3b9bb..6bbe0b3a7 100644 --- a/virtio-devices/src/vhost_user/vu_common_ctrl.rs +++ b/virtio-devices/src/vhost_user/vu_common_ctrl.rs @@ -294,6 +294,11 @@ impl VhostUserHandle { self.vu .set_vring_enable(queue_index, false) .map_err(Error::VhostUserSetVringEnable)?; + + let _ = self + .vu + .get_vring_base(queue_index) + .map_err(Error::VhostUserGetVringBase)?; } Ok(())