[PATCH v1 0/5] vhost-user-blk: dynamically resize config space based on features

Daniil Tatianin posted 5 patches 1 year, 8 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20220824091837.301708-1-d-tatianin@yandex-team.ru
Maintainers: Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Raphael Norwitz <raphael.norwitz@nutanix.com>, Stefan Hajnoczi <stefanha@redhat.com>
There is a newer version of this series
MAINTAINERS                           |  4 +++
hw/block/meson.build                  |  4 +--
hw/block/vhost-user-blk.c             | 29 +++++++++---------
hw/block/virtio-blk-common.c          | 42 +++++++++++++++++++++++++++
hw/block/virtio-blk.c                 | 25 ++--------------
include/hw/virtio/vhost-user-blk.h    |  4 ++-
include/hw/virtio/virtio-blk-common.h | 21 ++++++++++++++
7 files changed, 90 insertions(+), 39 deletions(-)
create mode 100644 hw/block/virtio-blk-common.c
create mode 100644 include/hw/virtio/virtio-blk-common.h
[PATCH v1 0/5] vhost-user-blk: dynamically resize config space based on features
Posted by Daniil Tatianin 1 year, 8 months ago
This patch set attempts to align vhost-user-blk with virtio-blk in
terms of backward compatibility and flexibility.

In particular it adds the following things:
- Ability to disable modern features like discard/write-zeroes.
- Dynamic configuration space resizing based on enabled features,
  by reusing the code, which was already present in virtio-blk.
- Makes the VHostUserBlk structure a bit less clunky by using the
  'host_features' field to represent enabled features, as opposed to
  using a separate field per feature. This was already done for
  virtio-blk a long time ago.

Daniil Tatianin (5):
  virtio-blk: decouple config size determination code from VirtIOBlock
  virtio-blk: move config space sizing code to virtio-blk-common
  vhost-user-blk: make it possible to disable write-zeroes/discard
  vhost-user-blk: make 'config_wce' part of 'host_features'
  vhost-user-blk: dynamically resize config space based on features

 MAINTAINERS                           |  4 +++
 hw/block/meson.build                  |  4 +--
 hw/block/vhost-user-blk.c             | 29 +++++++++---------
 hw/block/virtio-blk-common.c          | 42 +++++++++++++++++++++++++++
 hw/block/virtio-blk.c                 | 25 ++--------------
 include/hw/virtio/vhost-user-blk.h    |  4 ++-
 include/hw/virtio/virtio-blk-common.h | 21 ++++++++++++++
 7 files changed, 90 insertions(+), 39 deletions(-)
 create mode 100644 hw/block/virtio-blk-common.c
 create mode 100644 include/hw/virtio/virtio-blk-common.h

-- 
2.25.1