mbox series

[0/3] Refactor vhost device reset

Message ID 1648811173-15293-1-git-send-email-qiudayu@archeros.com (mailing list archive)
Headers show
Series Refactor vhost device reset | expand

Message

Michael Qiu April 1, 2022, 11:06 a.m. UTC
Now adays, vhost framework does a misnamed for
vhost_reset_device(), actually we need seperate vhost_reset_device()
and vhost_reset_owner(), this patchset refactor it, and make different
backend call the right function.

Base on those work, fix an issue of vdpa device reset for several times.

Test with kernel vhost, vhost-vdpa, DPDK vhost-user(vdpa), with shutdown
,reboot, and load/unload virtio_net driver in guest.

Michael Qiu (3):
  vhost: Refactor vhost_reset_device() in VhostOps
  vhost: add vhost_dev_reset()
  vdpa: reset the backend device in the end of vhost_net_stop()

 hw/net/vhost_net.c                | 22 +++++++++++++++++++---
 hw/scsi/vhost-user-scsi.c         |  6 +++++-
 hw/virtio/vhost-backend.c         |  4 ++--
 hw/virtio/vhost-user.c            | 22 ++++++++++++++++++----
 hw/virtio/vhost-vdpa.c            | 15 +++++++++------
 hw/virtio/vhost.c                 | 14 ++++++++++++++
 include/hw/virtio/vhost-backend.h |  2 ++
 include/hw/virtio/vhost.h         |  1 +
 8 files changed, 70 insertions(+), 16 deletions(-)