qapi: introduce device-sync-config

Add command to sync config from vhost-user backend to the device. It
may be helpful when VHOST_USER_SLAVE_CONFIG_CHANGE_MSG failed or not
triggered interrupt to the guest or just not available (not supported
by vhost-user server).

Command result is racy if allow it during migration. Let's not allow
that.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Acked-by: Raphael Norwitz <raphael@enfabrica.net>
Message-Id: <20240920094936.450987-4-vsementsov@yandex-team.ru>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
Vladimir Sementsov-Ogievskiy 2024-09-20 12:49:36 +03:00 committed by Michael S. Tsirkin
parent 4dfa127314
commit 3f98408e2e
5 changed files with 78 additions and 0 deletions

View file

@ -163,3 +163,27 @@
##
{ 'event': 'DEVICE_UNPLUG_GUEST_ERROR',
'data': { '*device': 'str', 'path': 'str' } }
##
# @device-sync-config:
#
# Synchronize device configuration from host to guest part. First,
# copy the configuration from the host part (backend) to the guest
# part (frontend). Then notify guest software that device
# configuration changed.
#
# The command may be used to notify the guest about block device
# capcity change. Currently only vhost-user-blk device supports
# this.
#
# @id: the device's ID or QOM path
#
# Features:
#
# @unstable: The command is experimental.
#
# Since: 9.1
##
{ 'command': 'device-sync-config',
'features': [ 'unstable' ],
'data': {'id': 'str'} }