[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 03/31] qapi/qom: Add ObjectOptions for iothread
From: |
Kevin Wolf |
Subject: |
[PATCH v2 03/31] qapi/qom: Add ObjectOptions for iothread |
Date: |
Wed, 24 Feb 2021 14:52:27 +0100 |
Add an ObjectOptions union that will eventually describe the options of
all user creatable object types. As unions can't exist without any
branches, also add the first object type.
This adds a QAPI schema for the properties of the iothread object.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
qapi/qom.json | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 53 insertions(+)
diff --git a/qapi/qom.json b/qapi/qom.json
index 96c91c1faf..bf2ecb34be 100644
--- a/qapi/qom.json
+++ b/qapi/qom.json
@@ -202,6 +202,59 @@
'returns': [ 'ObjectPropertyInfo' ],
'allow-preconfig': true }
+##
+# @IothreadProperties:
+#
+# Properties for iothread objects.
+#
+# @poll-max-ns: the maximum number of nanoseconds to busy wait for events.
+# 0 means polling is disabled (default: 32768 on POSIX hosts,
+# 0 otherwise)
+#
+# @poll-grow: the multiplier used to increase the polling time when the
+# algorithm detects it is missing events due to not polling long
+# enough. 0 selects a default behaviour (default: 0)
+#
+# @poll-shrink: the divisor used to decrease the polling time when the
+# algorithm detects it is spending too long polling without
+# encountering events. 0 selects a default behaviour (default: 0)
+#
+# Since: 2.0
+##
+{ 'struct': 'IothreadProperties',
+ 'data': { '*poll-max-ns': 'int',
+ '*poll-grow': 'int',
+ '*poll-shrink': 'int' } }
+
+##
+# @ObjectType:
+#
+# Since: 6.0
+##
+{ 'enum': 'ObjectType',
+ 'data': [
+ 'iothread'
+ ] }
+
+##
+# @ObjectOptions:
+#
+# Describes the options of a user creatable QOM object.
+#
+# @qom-type: the class name for the object to be created
+#
+# @id: the name of the new object
+#
+# Since: 6.0
+##
+{ 'union': 'ObjectOptions',
+ 'base': { 'qom-type': 'ObjectType',
+ 'id': 'str' },
+ 'discriminator': 'qom-type',
+ 'data': {
+ 'iothread': 'IothreadProperties'
+ } }
+
##
# @object-add:
#
--
2.29.2
- [PATCH v2 07/31] qapi/qom: Add ObjectOptions for memory-backend-*, (continued)
- [PATCH v2 07/31] qapi/qom: Add ObjectOptions for memory-backend-*, Kevin Wolf, 2021/02/24
- [PATCH v2 19/31] qapi/qom: QAPIfy object-add, Kevin Wolf, 2021/02/24
- [PATCH v2 14/31] qapi/qom: Add ObjectOptions for filter-*, Kevin Wolf, 2021/02/24
- [PATCH v2 01/31] tests: Drop 'props' from object-add calls, Kevin Wolf, 2021/02/24
- [PATCH v2 02/31] qapi/qom: Drop deprecated 'props' from object-add, Kevin Wolf, 2021/02/24
- [PATCH v2 03/31] qapi/qom: Add ObjectOptions for iothread,
Kevin Wolf <=
- [PATCH v2 16/31] qapi/qom: Add ObjectOptions for confidential-guest-support, Kevin Wolf, 2021/02/24
- [PATCH v2 10/31] qapi/qom: Add ObjectOptions for secret*, deprecate 'loaded', Kevin Wolf, 2021/02/24
- [PATCH v2 05/31] qapi/qom: Add ObjectOptions for cryptodev-*, Kevin Wolf, 2021/02/24
- [PATCH v2 08/31] qapi/qom: Add ObjectOptions for rng-*, deprecate 'opened', Kevin Wolf, 2021/02/24