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 <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf 2022-07-20 17:29:19 +02:00
parent 613c60fc6f
commit 5f98710471

View File

@ -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(())