mbox series

[v5,00/16] add virtio_blk device support to vdpa/ifc

Message ID 1648451862-123318-1-git-send-email-andy.pei@intel.com (mailing list archive)
Headers
Series add virtio_blk device support to vdpa/ifc |

Message

Pei, Andy March 28, 2022, 7:17 a.m. UTC
  This patch set add virtio_blk device support to vdpa/ifc driver.
With a lot of similarities, I re-use part of vdpa/ifc driver.
Distinguish the virtio net and blk device by device id, and implement 
specific features and ops.
Add example to vdpa to support virtio_blk device.
To support blk device live migration, some modification to vhost lib.
Perform dev_conf op only under VHOST_USER_SET_VRING_CALL msg.

v5:
 fix some coding style issues.
v4:
 add args "isblk" to vdpa example to specify a block device, fix some
 issue in example.
 Make sure code specify for block device does not affect net device.
v3:
 Fix some compile issues.
v2:
 Fix some coding style issues.

Andy Pei (16):
  vdpa/ifc: add support for virtio blk device
  vhost: add vdpa ops for blk device
  vhost: add support for VHOST_USER_GET_CONFIG and VHOST_USER_SET_CONFIG
  vdpa/ifc: add blk ops for ifc device
  vdpa/ifc: add vdpa interrupt for blk device
  vdpa/ifc: add block device SW live-migration
  example/vdpa:add vdpa blk support in example
  usertools: add support for virtio blk device
  vdpa/ifc: set_vring_state op is mandatory, add set_vring_state for blk
    device
  vdpa/ifc: add some log at VDPA launch before qemu connect
  vdpa/ifc: read virtio max_queues from hardware
  vdpa: add config space change interrupt register and handle for
    virtio_blk
  vdpa/ifc: add is_blk flag to ifcvf_hw, and init is_blk during probe
  vdpa/ifc/base: for blk device, live migration register is different
    from net device
  vdpa/ifc: make sure hardware last_avail_idx and last_used_idx is the
    same when blk device pause
  vhost: make sure each queue callfd is configured

 drivers/vdpa/ifc/base/ifcvf.c    |  42 +++-
 drivers/vdpa/ifc/base/ifcvf.h    |  29 ++-
 drivers/vdpa/ifc/ifcvf_vdpa.c    | 521 ++++++++++++++++++++++++++++++++++++---
 examples/vdpa/main.c             |  61 ++++-
 examples/vdpa/vdpa_blk_compact.h |  72 ++++++
 examples/vdpa/vhost_user.h       | 169 +++++++++++++
 lib/vhost/vdpa_driver.h          |   8 +-
 lib/vhost/vhost_user.c           |  64 +++++
 lib/vhost/vhost_user.h           |  15 ++
 usertools/dpdk-devbind.py        |   8 +
 10 files changed, 934 insertions(+), 55 deletions(-)
 create mode 100644 examples/vdpa/vdpa_blk_compact.h
 create mode 100644 examples/vdpa/vhost_user.h