[PATCH 0/4] vhost-user-blk: live resize additional APIs

Vladimir Sementsov-Ogievskiy posted 4 patches 7 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20231006202045.1161543-1-vsementsov@yandex-team.ru
Maintainers: Raphael Norwitz <raphael.norwitz@nutanix.com>, "Michael S. Tsirkin" <mst@redhat.com>, Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, Eduardo Habkost <eduardo@habkost.net>, "Dr. David Alan Gilbert" <dave@treblig.org>, Markus Armbruster <armbru@redhat.com>, Eric Blake <eblake@redhat.com>
There is a newer version of this series
hw/block/vhost-user-blk.c | 32 ++++++++++++++---------
hw/virtio/virtio-pci.c    | 18 +++++++++++++
include/hw/qdev-core.h    |  3 +++
include/monitor/qdev.h    |  1 +
include/sysemu/runstate.h |  1 +
monitor/monitor.c         |  1 +
qapi/qdev.json            | 36 ++++++++++++++++++++++++++
softmmu/qdev-monitor.c    | 53 +++++++++++++++++++++++++++++++++++++++
softmmu/runstate.c        |  5 ++++
9 files changed, 138 insertions(+), 12 deletions(-)
[PATCH 0/4] vhost-user-blk: live resize additional APIs
Posted by Vladimir Sementsov-Ogievskiy 7 months ago
In vhost-user protocol we have VHOST_USER_BACKEND_CONFIG_CHANGE_MSG,
which backend may send to notify Qemu, that we should re-read the
config, and notify the guest.

Still that's not always convenient: backend may not support this
message. Also, having QMP command to force config sync is more reliable
than waiting for notification from external program. It also may be
helpful for debug/restore: if we have changed disk size, but guest
doesn't see that, it's good to have a separate QMP command to trigger
resync of the config.

So, the series proposes two experimental APIs:

1. x-device-sync-config command, to trigger config synchronization

2. X_CONFIG_READ event, which notify management tool that guest read the
updated config. Of course, that can't guarantee that the guest correctly
handled the updated config, but it's still better than nothing: for sure
guest will not show new disk size until it read the updated config. So,
management tool may wait for this event to report success to the user.


The series is based on "[PATCH v8 0/4] pci hotplug tracking": it doesn't
depend on it, but just modify same files, so I just to avoid extra
conflicts.
Based-on: <20231005092926.56231-1-vsementsov@yandex-team.ru>

Vladimir Sementsov-Ogievskiy (4):
  vhost-user-blk: simplify and fix vhost_user_blk_handle_config_change
  qapi: introduce device-sync-config
  qapi: device-sync-config: check runstate
  qapi: introduce CONFIG_READ event

 hw/block/vhost-user-blk.c | 32 ++++++++++++++---------
 hw/virtio/virtio-pci.c    | 18 +++++++++++++
 include/hw/qdev-core.h    |  3 +++
 include/monitor/qdev.h    |  1 +
 include/sysemu/runstate.h |  1 +
 monitor/monitor.c         |  1 +
 qapi/qdev.json            | 36 ++++++++++++++++++++++++++
 softmmu/qdev-monitor.c    | 53 +++++++++++++++++++++++++++++++++++++++
 softmmu/runstate.c        |  5 ++++
 9 files changed, 138 insertions(+), 12 deletions(-)

-- 
2.34.1