aboutsummaryrefslogtreecommitdiff
path: root/qapi
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2020-10-20 12:47:58 +0200
committerKevin Wolf <kwolf@redhat.com>2021-03-19 10:17:13 +0100
commit2273b2410f876111ed97b5d2cd93d7f04b045432 (patch)
treeb342a8f9d319da36c178e676163ede99c92f76ea /qapi
parent50243407457a9fb0ed17b9a9ba9fc9aee09495b1 (diff)
downloadqemu-2273b2410f876111ed97b5d2cd93d7f04b045432.zip
qemu-2273b2410f876111ed97b5d2cd93d7f04b045432.tar.gz
qemu-2273b2410f876111ed97b5d2cd93d7f04b045432.tar.bz2
qapi/qom: Add ObjectOptions for iothread
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> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Acked-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'qapi')
-rw-r--r--qapi/qom.json53
1 files changed, 53 insertions, 0 deletions
diff --git a/qapi/qom.json b/qapi/qom.json
index 96c91c1..bf2ecb3 100644
--- a/qapi/qom.json
+++ b/qapi/qom.json
@@ -203,6 +203,59 @@
'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:
#
# Create a QOM object.