From 581bf4aad54860ebd07779a848606a7ee613e969 Mon Sep 17 00:00:00 2001 From: Sebastien Boeuf Date: Mon, 8 Mar 2021 18:12:29 +0100 Subject: [PATCH] virtio-devices: vhost-user: Fix device reset There is no need to get the vring base when resetting the vhost-user device. This was mostly ignored, but in some cases, it was causing some actual errors. A reset must simply be a combination of disabling the vrings along with the reset of the owner. Signed-off-by: Sebastien Boeuf --- virtio-devices/src/vhost_user/vu_common_ctrl.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/virtio-devices/src/vhost_user/vu_common_ctrl.rs b/virtio-devices/src/vhost_user/vu_common_ctrl.rs index 567d3a60c..4d42ecceb 100644 --- a/virtio-devices/src/vhost_user/vu_common_ctrl.rs +++ b/virtio-devices/src/vhost_user/vu_common_ctrl.rs @@ -135,10 +135,6 @@ pub fn reset_vhost_user(vu: &mut Master, num_queues: usize) -> Result<()> { // Disable the vrings. vu.set_vring_enable(queue_index, false) .map_err(Error::VhostUserSetVringEnable)?; - - // Stop the vrings. - vu.get_vring_base(queue_index) - .map_err(Error::VhostUserSetFeatures)?; } // Reset the owner.