vm-virtio: vhost-user-blk: Add support for reset

If we expect the vhost-user-blk device to be used for booting a VMM
along with the firmware, then need the device to support being reset.

In the vhost-user context, this means the backend needs to be informed
the vrings are disabled and stopped, and the owner needs to be reset
too.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf
2019-09-19 09:14:55 -07:00
committed by Samuel Ortiz
parent 0a229ef4f5
commit d723b7dae8
4 changed files with 72 additions and 11 deletions

View File

@@ -132,6 +132,8 @@ pub enum ActivateError {
VhostUserNetSetup(vhost_user::Error),
/// Failed to setup vhost-user daemon.
VhostUserBlkSetup(vhost_user::Error),
/// Failed to reset vhost-user daemon.
VhostUserReset(vhost_user::Error),
}
pub type ActivateResult = std::result::Result<(), ActivateError>;