[PATCH 0/3] Refactor vhost device reset

Michael Qiu posted 3 patches 3 years, 10 months ago
Test checkpatch failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/1648811173-15293-1-git-send-email-qiudayu@archeros.com
Maintainers: "Michael S. Tsirkin" <mst@redhat.com>, Jason Wang <jasowang@redhat.com>, Raphael Norwitz <raphael.norwitz@nutanix.com>, Paolo Bonzini <pbonzini@redhat.com>, Fam Zheng <fam@euphon.net>
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(-)
[PATCH 0/3] Refactor vhost device reset
Posted by Michael Qiu 3 years, 10 months ago
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(-)

-- 
1.8.3.1