virtio-devices: Remove deprecated call to VHOST_USER_RESET_OWNER

The latest vhost-user specification describes VHOST_USER_RESET_OWNER
command as deprecated with the following explanation:

  This is no longer used. Used to be sent to request disabling all
  rings, but some back-ends interpreted it to also discard connection
  state (this interpretation would lead to bugs). It is recommended that
  back-ends either ignore this message, or use it to disable all rings.

Also, it's been observed that when using either Rust Hypervisor Firmware
or EDK2 OVMF firmware with SPDK (using the block device as the boot
disk), the virtio reset that happens when the firmware no longer needs
to access the block device caused a failure by triggering the command
VHOST_USER_RESET_OWNER.

For all these reasons, this patch simplifies the virtio reset
implementation by simply disabling the virtqueues and no longer calling
into VHOST_USER_RESET_OWNER.

Partially fixes #4285

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf 2022-07-06 14:28:14 +02:00 committed by Rob Bradford
parent 0b311f6c4c
commit 00800b8499

View File

@ -290,10 +290,7 @@ impl VhostUserHandle {
}
pub fn reset_vhost_user(&mut self, num_queues: usize) -> Result<()> {
self.enable_vhost_user_vrings(num_queues, false)?;
// Reset the owner.
self.vu.reset_owner().map_err(Error::VhostUserResetOwner)
self.enable_vhost_user_vrings(num_queues, false)
}
pub fn set_protocol_features_vhost_user(