libvirt/qemu-capabilities-Introduce-QEMU_CAPS_OBJECT_QAPIFIE.patch

57 lines
2.1 KiB
Diff
Raw Normal View History

From a604b93e9f9f6033d5fe251f84591fb6474e2386 Mon Sep 17 00:00:00 2001
From: Yan Wang <wangyan122@huawei.com>
Date: Thu, 24 Mar 2022 12:41:43 +0800
Subject: [PATCH 10/16] qemu: capabilities: Introduce QEMU_CAPS_OBJECT_QAPIFIED
Starting from qemu-6.0 the parameters of -object/object-add are formally
described by the QAPI schema. Additionally this changes the nesting of
the properties as the 'props' nested object will be flattened to the
parent.
We'll need to detect whether qemu switched to this new approach to
generate the objects with proper nesting and also allow testing.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Yan Wang <wangyan122@huawei.com>
---
src/qemu/qemu_capabilities.c | 8 +++++---
src/qemu/qemu_capabilities.h | 2 ++
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 0fb3e74c77..e232a37b79 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -569,9 +569,11 @@ VIR_ENUM_IMPL(virQEMUCaps,
"blockdev-reopen",
"storage.werror",
- "migration-param.bandwidth",
- "migration-param.downtime",
- "migration-param.xbzrle-cache-size",
+ "migration-param.bandwidth",
+ "migration-param.downtime",
+ "migration-param.xbzrle-cache-size",
+
+ "object.qapified",
);
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index 10a6ce50e7..ffb366f84a 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -554,6 +554,8 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
QEMU_CAPS_MIGRATION_PARAM_DOWNTIME, /* downtime-limit field in migrate-set-parameters */
QEMU_CAPS_MIGRATION_PARAM_XBZRLE_CACHE_SIZE, /* xbzrle-cache-size field in migrate-set-parameters */
+ QEMU_CAPS_OBJECT_QAPIFIED, /* parameters for object-add are formally described */
+
QEMU_CAPS_LAST /* this must always be the last item */
} virQEMUCapsFlags;
--
2.27.0