New qemu introduced the 'reconnect-ms' field for character devices
allowing the reconnect timeout to be specified in milliseconds, which
also deprecates the existing 'reconnect' field that libvirt uses.
To avoid use of deprecated interfaces add a capability which will allow
us to use the new field.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_capabilities.c | 2 ++
src/qemu/qemu_capabilities.h | 1 +
2 files changed, 3 insertions(+)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index ac135aa301..7d0cb2caaa 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -718,6 +718,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
/* 465 */
"snapshot-internal-qmp", /* QEMU_CAPS_SNAPSHOT_INTERNAL_QMP */
+ "chardev-reconnect-miliseconds", /*
QEMU_CAPS_CHARDEV_RECONNECT_MILISECONDS */
);
@@ -1559,6 +1560,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsQMPSchemaQueries[] =
{
{ "blockdev-add/arg-type/+virtio-blk-vhost-vdpa/$fdset",
QEMU_CAPS_DEVICE_VIRTIO_BLK_VHOST_VDPA},
{ "blockdev-snapshot/$allow-write-only-overlay",
QEMU_CAPS_BLOCKDEV_SNAPSHOT_ALLOW_WRITE_ONLY },
{ "chardev-add/arg-type/backend/+socket/data/reconnect",
QEMU_CAPS_CHARDEV_RECONNECT },
+ { "chardev-add/arg-type/backend/+socket/data/reconnect-ms",
QEMU_CAPS_CHARDEV_RECONNECT_MILISECONDS },
{ "device_add/$json-cli-hotplug", QEMU_CAPS_DEVICE_JSON },
{ "migrate-set-parameters/arg-type/block-bitmap-mapping/bitmaps/transform",
QEMU_CAPS_MIGRATION_PARAM_BLOCK_BITMAP_MAPPING },
{ "nbd-server-start/arg-type/tls-creds", QEMU_CAPS_NBD_TLS },
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index 091de8999d..284b07b64e 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -697,6 +697,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check
*/
/* 465 */
QEMU_CAPS_SNAPSHOT_INTERNAL_QMP, /* internal snapshot support via QMP commands
'snapshot-save'/'snapshot-delete' */
+ QEMU_CAPS_CHARDEV_RECONNECT_MILISECONDS, /* 'reconnect-ms' option for
chardevs supported */
QEMU_CAPS_LAST /* this must always be the last item */
} virQEMUCapsFlags;
--
2.46.2