]> git.proxmox.com Git - mirror_qemu.git/blob - qapi/qom.json
cryptodev: support QoS
[mirror_qemu.git] / qapi / qom.json
1 # -*- Mode: Python -*-
2 # vim: filetype=python
3 #
4 # This work is licensed under the terms of the GNU GPL, version 2 or later.
5 # See the COPYING file in the top-level directory.
6
7 { 'include': 'authz.json' }
8 { 'include': 'block-core.json' }
9 { 'include': 'common.json' }
10 { 'include': 'crypto.json' }
11
12 ##
13 # = QEMU Object Model (QOM)
14 ##
15
16 ##
17 # @ObjectPropertyInfo:
18 #
19 # @name: the name of the property
20 #
21 # @type: the type of the property. This will typically come in one of four
22 # forms:
23 #
24 # 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
25 # These types are mapped to the appropriate JSON type.
26 #
27 # 2) A child type in the form 'child<subtype>' where subtype is a qdev
28 # device type name. Child properties create the composition tree.
29 #
30 # 3) A link type in the form 'link<subtype>' where subtype is a qdev
31 # device type name. Link properties form the device model graph.
32 #
33 # @description: if specified, the description of the property.
34 #
35 # @default-value: the default value, if any (since 5.0)
36 #
37 # Since: 1.2
38 ##
39 { 'struct': 'ObjectPropertyInfo',
40 'data': { 'name': 'str',
41 'type': 'str',
42 '*description': 'str',
43 '*default-value': 'any' } }
44
45 ##
46 # @qom-list:
47 #
48 # This command will list any properties of a object given a path in the object
49 # model.
50 #
51 # @path: the path within the object model. See @qom-get for a description of
52 # this parameter.
53 #
54 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
55 # object.
56 #
57 # Since: 1.2
58 #
59 # Example:
60 #
61 # -> { "execute": "qom-list",
62 # "arguments": { "path": "/chardevs" } }
63 # <- { "return": [ { "name": "type", "type": "string" },
64 # { "name": "parallel0", "type": "child<chardev-vc>" },
65 # { "name": "serial0", "type": "child<chardev-vc>" },
66 # { "name": "mon0", "type": "child<chardev-stdio>" } ] }
67 #
68 ##
69 { 'command': 'qom-list',
70 'data': { 'path': 'str' },
71 'returns': [ 'ObjectPropertyInfo' ],
72 'allow-preconfig': true }
73
74 ##
75 # @qom-get:
76 #
77 # This command will get a property from a object model path and return the
78 # value.
79 #
80 # @path: The path within the object model. There are two forms of supported
81 # paths--absolute and partial paths.
82 #
83 # Absolute paths are derived from the root object and can follow child<>
84 # or link<> properties. Since they can follow link<> properties, they
85 # can be arbitrarily long. Absolute paths look like absolute filenames
86 # and are prefixed with a leading slash.
87 #
88 # Partial paths look like relative filenames. They do not begin
89 # with a prefix. The matching rules for partial paths are subtle but
90 # designed to make specifying objects easy. At each level of the
91 # composition tree, the partial path is matched as an absolute path.
92 # The first match is not returned. At least two matches are searched
93 # for. A successful result is only returned if only one match is
94 # found. If more than one match is found, a flag is return to
95 # indicate that the match was ambiguous.
96 #
97 # @property: The property name to read
98 #
99 # Returns: The property value. The type depends on the property
100 # type. child<> and link<> properties are returned as #str
101 # pathnames. All integer property types (u8, u16, etc) are
102 # returned as #int.
103 #
104 # Since: 1.2
105 #
106 # Example:
107 #
108 # 1. Use absolute path
109 #
110 # -> { "execute": "qom-get",
111 # "arguments": { "path": "/machine/unattached/device[0]",
112 # "property": "hotplugged" } }
113 # <- { "return": false }
114 #
115 # 2. Use partial path
116 #
117 # -> { "execute": "qom-get",
118 # "arguments": { "path": "unattached/sysbus",
119 # "property": "type" } }
120 # <- { "return": "System" }
121 #
122 ##
123 { 'command': 'qom-get',
124 'data': { 'path': 'str', 'property': 'str' },
125 'returns': 'any',
126 'allow-preconfig': true }
127
128 ##
129 # @qom-set:
130 #
131 # This command will set a property from a object model path.
132 #
133 # @path: see @qom-get for a description of this parameter
134 #
135 # @property: the property name to set
136 #
137 # @value: a value who's type is appropriate for the property type. See @qom-get
138 # for a description of type mapping.
139 #
140 # Since: 1.2
141 #
142 # Example:
143 #
144 # -> { "execute": "qom-set",
145 # "arguments": { "path": "/machine",
146 # "property": "graphics",
147 # "value": false } }
148 # <- { "return": {} }
149 #
150 ##
151 { 'command': 'qom-set',
152 'data': { 'path': 'str', 'property': 'str', 'value': 'any' },
153 'allow-preconfig': true }
154
155 ##
156 # @ObjectTypeInfo:
157 #
158 # This structure describes a search result from @qom-list-types
159 #
160 # @name: the type name found in the search
161 #
162 # @abstract: the type is abstract and can't be directly instantiated.
163 # Omitted if false. (since 2.10)
164 #
165 # @parent: Name of parent type, if any (since 2.10)
166 #
167 # Since: 1.1
168 ##
169 { 'struct': 'ObjectTypeInfo',
170 'data': { 'name': 'str', '*abstract': 'bool', '*parent': 'str' } }
171
172 ##
173 # @qom-list-types:
174 #
175 # This command will return a list of types given search parameters
176 #
177 # @implements: if specified, only return types that implement this type name
178 #
179 # @abstract: if true, include abstract types in the results
180 #
181 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
182 #
183 # Since: 1.1
184 ##
185 { 'command': 'qom-list-types',
186 'data': { '*implements': 'str', '*abstract': 'bool' },
187 'returns': [ 'ObjectTypeInfo' ],
188 'allow-preconfig': true }
189
190 ##
191 # @qom-list-properties:
192 #
193 # List properties associated with a QOM object.
194 #
195 # @typename: the type name of an object
196 #
197 # Note: objects can create properties at runtime, for example to describe
198 # links between different devices and/or objects. These properties
199 # are not included in the output of this command.
200 #
201 # Returns: a list of ObjectPropertyInfo describing object properties
202 #
203 # Since: 2.12
204 ##
205 { 'command': 'qom-list-properties',
206 'data': { 'typename': 'str'},
207 'returns': [ 'ObjectPropertyInfo' ],
208 'allow-preconfig': true }
209
210 ##
211 # @CanHostSocketcanProperties:
212 #
213 # Properties for can-host-socketcan objects.
214 #
215 # @if: interface name of the host system CAN bus to connect to
216 #
217 # @canbus: object ID of the can-bus object to connect to the host interface
218 #
219 # Since: 2.12
220 ##
221 { 'struct': 'CanHostSocketcanProperties',
222 'data': { 'if': 'str',
223 'canbus': 'str' } }
224
225 ##
226 # @ColoCompareProperties:
227 #
228 # Properties for colo-compare objects.
229 #
230 # @primary_in: name of the character device backend to use for the primary
231 # input (incoming packets are redirected to @outdev)
232 #
233 # @secondary_in: name of the character device backend to use for secondary
234 # input (incoming packets are only compared to the input on
235 # @primary_in and then dropped)
236 #
237 # @outdev: name of the character device backend to use for output
238 #
239 # @iothread: name of the iothread to run in
240 #
241 # @notify_dev: name of the character device backend to be used to communicate
242 # with the remote colo-frame (only for Xen COLO)
243 #
244 # @compare_timeout: the maximum time to hold a packet from @primary_in for
245 # comparison with an incoming packet on @secondary_in in
246 # milliseconds (default: 3000)
247 #
248 # @expired_scan_cycle: the interval at which colo-compare checks whether
249 # packets from @primary have timed out, in milliseconds
250 # (default: 3000)
251 #
252 # @max_queue_size: the maximum number of packets to keep in the queue for
253 # comparing with incoming packets from @secondary_in. If the
254 # queue is full and additional packets are received, the
255 # additional packets are dropped. (default: 1024)
256 #
257 # @vnet_hdr_support: if true, vnet header support is enabled (default: false)
258 #
259 # Since: 2.8
260 ##
261 { 'struct': 'ColoCompareProperties',
262 'data': { 'primary_in': 'str',
263 'secondary_in': 'str',
264 'outdev': 'str',
265 'iothread': 'str',
266 '*notify_dev': 'str',
267 '*compare_timeout': 'uint64',
268 '*expired_scan_cycle': 'uint32',
269 '*max_queue_size': 'uint32',
270 '*vnet_hdr_support': 'bool' } }
271
272 ##
273 # @CryptodevBackendProperties:
274 #
275 # Properties for cryptodev-backend and cryptodev-backend-builtin objects.
276 #
277 # @queues: the number of queues for the cryptodev backend. Ignored for
278 # cryptodev-backend and must be 1 for cryptodev-backend-builtin.
279 # (default: 1)
280 #
281 # @throttle-bps: limit total bytes per second (Since 8.0)
282 #
283 # @throttle-ops: limit total operations per second (Since 8.0)
284 #
285 # Since: 2.8
286 ##
287 { 'struct': 'CryptodevBackendProperties',
288 'data': { '*queues': 'uint32',
289 '*throttle-bps': 'uint64',
290 '*throttle-ops': 'uint64' } }
291
292 ##
293 # @CryptodevVhostUserProperties:
294 #
295 # Properties for cryptodev-vhost-user objects.
296 #
297 # @chardev: the name of a Unix domain socket character device that connects to
298 # the vhost-user server
299 #
300 # Since: 2.12
301 ##
302 { 'struct': 'CryptodevVhostUserProperties',
303 'base': 'CryptodevBackendProperties',
304 'data': { 'chardev': 'str' } }
305
306 ##
307 # @DBusVMStateProperties:
308 #
309 # Properties for dbus-vmstate objects.
310 #
311 # @addr: the name of the DBus bus to connect to
312 #
313 # @id-list: a comma separated list of DBus IDs of helpers whose data should be
314 # included in the VM state on migration
315 #
316 # Since: 5.0
317 ##
318 { 'struct': 'DBusVMStateProperties',
319 'data': { 'addr': 'str' ,
320 '*id-list': 'str' } }
321
322 ##
323 # @NetfilterInsert:
324 #
325 # Indicates where to insert a netfilter relative to a given other filter.
326 #
327 # @before: insert before the specified filter
328 #
329 # @behind: insert behind the specified filter
330 #
331 # Since: 5.0
332 ##
333 { 'enum': 'NetfilterInsert',
334 'data': [ 'before', 'behind' ] }
335
336 ##
337 # @NetfilterProperties:
338 #
339 # Properties for objects of classes derived from netfilter.
340 #
341 # @netdev: id of the network device backend to filter
342 #
343 # @queue: indicates which queue(s) to filter (default: all)
344 #
345 # @status: indicates whether the filter is enabled ("on") or disabled ("off")
346 # (default: "on")
347 #
348 # @position: specifies where the filter should be inserted in the filter list.
349 # "head" means the filter is inserted at the head of the filter list,
350 # before any existing filters.
351 # "tail" means the filter is inserted at the tail of the filter list,
352 # behind any existing filters (default).
353 # "id=<id>" means the filter is inserted before or behind the filter
354 # specified by <id>, depending on the @insert property.
355 # (default: "tail")
356 #
357 # @insert: where to insert the filter relative to the filter given in @position.
358 # Ignored if @position is "head" or "tail". (default: behind)
359 #
360 # Since: 2.5
361 ##
362 { 'struct': 'NetfilterProperties',
363 'data': { 'netdev': 'str',
364 '*queue': 'NetFilterDirection',
365 '*status': 'str',
366 '*position': 'str',
367 '*insert': 'NetfilterInsert' } }
368
369 ##
370 # @FilterBufferProperties:
371 #
372 # Properties for filter-buffer objects.
373 #
374 # @interval: a non-zero interval in microseconds. All packets arriving in the
375 # given interval are delayed until the end of the interval.
376 #
377 # Since: 2.5
378 ##
379 { 'struct': 'FilterBufferProperties',
380 'base': 'NetfilterProperties',
381 'data': { 'interval': 'uint32' } }
382
383 ##
384 # @FilterDumpProperties:
385 #
386 # Properties for filter-dump objects.
387 #
388 # @file: the filename where the dumped packets should be stored
389 #
390 # @maxlen: maximum number of bytes in a packet that are stored (default: 65536)
391 #
392 # Since: 2.5
393 ##
394 { 'struct': 'FilterDumpProperties',
395 'base': 'NetfilterProperties',
396 'data': { 'file': 'str',
397 '*maxlen': 'uint32' } }
398
399 ##
400 # @FilterMirrorProperties:
401 #
402 # Properties for filter-mirror objects.
403 #
404 # @outdev: the name of a character device backend to which all incoming packets
405 # are mirrored
406 #
407 # @vnet_hdr_support: if true, vnet header support is enabled (default: false)
408 #
409 # Since: 2.6
410 ##
411 { 'struct': 'FilterMirrorProperties',
412 'base': 'NetfilterProperties',
413 'data': { 'outdev': 'str',
414 '*vnet_hdr_support': 'bool' } }
415
416 ##
417 # @FilterRedirectorProperties:
418 #
419 # Properties for filter-redirector objects.
420 #
421 # At least one of @indev or @outdev must be present. If both are present, they
422 # must not refer to the same character device backend.
423 #
424 # @indev: the name of a character device backend from which packets are
425 # received and redirected to the filtered network device
426 #
427 # @outdev: the name of a character device backend to which all incoming packets
428 # are redirected
429 #
430 # @vnet_hdr_support: if true, vnet header support is enabled (default: false)
431 #
432 # Since: 2.6
433 ##
434 { 'struct': 'FilterRedirectorProperties',
435 'base': 'NetfilterProperties',
436 'data': { '*indev': 'str',
437 '*outdev': 'str',
438 '*vnet_hdr_support': 'bool' } }
439
440 ##
441 # @FilterRewriterProperties:
442 #
443 # Properties for filter-rewriter objects.
444 #
445 # @vnet_hdr_support: if true, vnet header support is enabled (default: false)
446 #
447 # Since: 2.8
448 ##
449 { 'struct': 'FilterRewriterProperties',
450 'base': 'NetfilterProperties',
451 'data': { '*vnet_hdr_support': 'bool' } }
452
453 ##
454 # @InputBarrierProperties:
455 #
456 # Properties for input-barrier objects.
457 #
458 # @name: the screen name as declared in the screens section of barrier.conf
459 #
460 # @server: hostname of the Barrier server (default: "localhost")
461 #
462 # @port: TCP port of the Barrier server (default: "24800")
463 #
464 # @x-origin: x coordinate of the leftmost pixel on the guest screen
465 # (default: "0")
466 #
467 # @y-origin: y coordinate of the topmost pixel on the guest screen
468 # (default: "0")
469 #
470 # @width: the width of secondary screen in pixels (default: "1920")
471 #
472 # @height: the height of secondary screen in pixels (default: "1080")
473 #
474 # Since: 4.2
475 ##
476 { 'struct': 'InputBarrierProperties',
477 'data': { 'name': 'str',
478 '*server': 'str',
479 '*port': 'str',
480 '*x-origin': 'str',
481 '*y-origin': 'str',
482 '*width': 'str',
483 '*height': 'str' } }
484
485 ##
486 # @InputLinuxProperties:
487 #
488 # Properties for input-linux objects.
489 #
490 # @evdev: the path of the host evdev device to use
491 #
492 # @grab_all: if true, grab is toggled for all devices (e.g. both keyboard and
493 # mouse) instead of just one device (default: false)
494 #
495 # @repeat: enables auto-repeat events (default: false)
496 #
497 # @grab-toggle: the key or key combination that toggles device grab
498 # (default: ctrl-ctrl)
499 #
500 # Since: 2.6
501 ##
502 { 'struct': 'InputLinuxProperties',
503 'data': { 'evdev': 'str',
504 '*grab_all': 'bool',
505 '*repeat': 'bool',
506 '*grab-toggle': 'GrabToggleKeys' } }
507
508 ##
509 # @EventLoopBaseProperties:
510 #
511 # Common properties for event loops
512 #
513 # @aio-max-batch: maximum number of requests in a batch for the AIO engine,
514 # 0 means that the engine will use its default.
515 # (default: 0)
516 #
517 # @thread-pool-min: minimum number of threads reserved in the thread pool
518 # (default:0)
519 #
520 # @thread-pool-max: maximum number of threads the thread pool can contain
521 # (default:64)
522 #
523 # Since: 7.1
524 ##
525 { 'struct': 'EventLoopBaseProperties',
526 'data': { '*aio-max-batch': 'int',
527 '*thread-pool-min': 'int',
528 '*thread-pool-max': 'int' } }
529
530 ##
531 # @IothreadProperties:
532 #
533 # Properties for iothread objects.
534 #
535 # @poll-max-ns: the maximum number of nanoseconds to busy wait for events.
536 # 0 means polling is disabled (default: 32768 on POSIX hosts,
537 # 0 otherwise)
538 #
539 # @poll-grow: the multiplier used to increase the polling time when the
540 # algorithm detects it is missing events due to not polling long
541 # enough. 0 selects a default behaviour (default: 0)
542 #
543 # @poll-shrink: the divisor used to decrease the polling time when the
544 # algorithm detects it is spending too long polling without
545 # encountering events. 0 selects a default behaviour (default: 0)
546 #
547 # The @aio-max-batch option is available since 6.1.
548 #
549 # Since: 2.0
550 ##
551 { 'struct': 'IothreadProperties',
552 'base': 'EventLoopBaseProperties',
553 'data': { '*poll-max-ns': 'int',
554 '*poll-grow': 'int',
555 '*poll-shrink': 'int' } }
556
557 ##
558 # @MainLoopProperties:
559 #
560 # Properties for the main-loop object.
561 #
562 # Since: 7.1
563 ##
564 { 'struct': 'MainLoopProperties',
565 'base': 'EventLoopBaseProperties',
566 'data': {} }
567
568 ##
569 # @MemoryBackendProperties:
570 #
571 # Properties for objects of classes derived from memory-backend.
572 #
573 # @merge: if true, mark the memory as mergeable (default depends on the machine
574 # type)
575 #
576 # @dump: if true, include the memory in core dumps (default depends on the
577 # machine type)
578 #
579 # @host-nodes: the list of NUMA host nodes to bind the memory to
580 #
581 # @policy: the NUMA policy (default: 'default')
582 #
583 # @prealloc: if true, preallocate memory (default: false)
584 #
585 # @prealloc-threads: number of CPU threads to use for prealloc (default: 1)
586 #
587 # @prealloc-context: thread context to use for creation of preallocation threads
588 # (default: none) (since 7.2)
589 #
590 # @share: if false, the memory is private to QEMU; if true, it is shared
591 # (default: false)
592 #
593 # @reserve: if true, reserve swap space (or huge pages) if applicable
594 # (default: true) (since 6.1)
595 #
596 # @size: size of the memory region in bytes
597 #
598 # @x-use-canonical-path-for-ramblock-id: if true, the canonical path is used
599 # for ramblock-id. Disable this for 4.0
600 # machine types or older to allow
601 # migration with newer QEMU versions.
602 # (default: false generally,
603 # but true for machine types <= 4.0)
604 #
605 # Note: prealloc=true and reserve=false cannot be set at the same time. With
606 # reserve=true, the behavior depends on the operating system: for example,
607 # Linux will not reserve swap space for shared file mappings --
608 # "not applicable". In contrast, reserve=false will bail out if it cannot
609 # be configured accordingly.
610 #
611 # Since: 2.1
612 ##
613 { 'struct': 'MemoryBackendProperties',
614 'data': { '*dump': 'bool',
615 '*host-nodes': ['uint16'],
616 '*merge': 'bool',
617 '*policy': 'HostMemPolicy',
618 '*prealloc': 'bool',
619 '*prealloc-threads': 'uint32',
620 '*prealloc-context': 'str',
621 '*share': 'bool',
622 '*reserve': 'bool',
623 'size': 'size',
624 '*x-use-canonical-path-for-ramblock-id': 'bool' } }
625
626 ##
627 # @MemoryBackendFileProperties:
628 #
629 # Properties for memory-backend-file objects.
630 #
631 # @align: the base address alignment when QEMU mmap(2)s @mem-path. Some
632 # backend stores specified by @mem-path require an alignment different
633 # than the default one used by QEMU, e.g. the device DAX /dev/dax0.0
634 # requires 2M alignment rather than 4K. In such cases, users can
635 # specify the required alignment via this option.
636 # 0 selects a default alignment (currently the page size). (default: 0)
637 #
638 # @discard-data: if true, the file contents can be destroyed when QEMU exits,
639 # to avoid unnecessarily flushing data to the backing file. Note
640 # that ``discard-data`` is only an optimization, and QEMU might
641 # not discard file contents if it aborts unexpectedly or is
642 # terminated using SIGKILL. (default: false)
643 #
644 # @mem-path: the path to either a shared memory or huge page filesystem mount
645 #
646 # @pmem: specifies whether the backing file specified by @mem-path is in
647 # host persistent memory that can be accessed using the SNIA NVM
648 # programming model (e.g. Intel NVDIMM).
649 #
650 # @readonly: if true, the backing file is opened read-only; if false, it is
651 # opened read-write. (default: false)
652 #
653 # Since: 2.1
654 ##
655 { 'struct': 'MemoryBackendFileProperties',
656 'base': 'MemoryBackendProperties',
657 'data': { '*align': 'size',
658 '*discard-data': 'bool',
659 'mem-path': 'str',
660 '*pmem': { 'type': 'bool', 'if': 'CONFIG_LIBPMEM' },
661 '*readonly': 'bool' } }
662
663 ##
664 # @MemoryBackendMemfdProperties:
665 #
666 # Properties for memory-backend-memfd objects.
667 #
668 # The @share boolean option is true by default with memfd.
669 #
670 # @hugetlb: if true, the file to be created resides in the hugetlbfs filesystem
671 # (default: false)
672 #
673 # @hugetlbsize: the hugetlb page size on systems that support multiple hugetlb
674 # page sizes (it must be a power of 2 value supported by the
675 # system). 0 selects a default page size. This option is ignored
676 # if @hugetlb is false. (default: 0)
677 #
678 # @seal: if true, create a sealed-file, which will block further resizing of
679 # the memory (default: true)
680 #
681 # Since: 2.12
682 ##
683 { 'struct': 'MemoryBackendMemfdProperties',
684 'base': 'MemoryBackendProperties',
685 'data': { '*hugetlb': 'bool',
686 '*hugetlbsize': 'size',
687 '*seal': 'bool' } }
688
689 ##
690 # @MemoryBackendEpcProperties:
691 #
692 # Properties for memory-backend-epc objects.
693 #
694 # The @share boolean option is true by default with epc
695 #
696 # The @merge boolean option is false by default with epc
697 #
698 # The @dump boolean option is false by default with epc
699 #
700 # Since: 6.2
701 ##
702 { 'struct': 'MemoryBackendEpcProperties',
703 'base': 'MemoryBackendProperties',
704 'data': {} }
705
706 ##
707 # @PrManagerHelperProperties:
708 #
709 # Properties for pr-manager-helper objects.
710 #
711 # @path: the path to a Unix domain socket for connecting to the external helper
712 #
713 # Since: 2.11
714 ##
715 { 'struct': 'PrManagerHelperProperties',
716 'data': { 'path': 'str' } }
717
718 ##
719 # @QtestProperties:
720 #
721 # Properties for qtest objects.
722 #
723 # @chardev: the chardev to be used to receive qtest commands on.
724 #
725 # @log: the path to a log file
726 #
727 # Since: 6.0
728 ##
729 { 'struct': 'QtestProperties',
730 'data': { 'chardev': 'str',
731 '*log': 'str' } }
732
733 ##
734 # @RemoteObjectProperties:
735 #
736 # Properties for x-remote-object objects.
737 #
738 # @fd: file descriptor name previously passed via 'getfd' command
739 #
740 # @devid: the id of the device to be associated with the file descriptor
741 #
742 # Since: 6.0
743 ##
744 { 'struct': 'RemoteObjectProperties',
745 'data': { 'fd': 'str', 'devid': 'str' } }
746
747 ##
748 # @VfioUserServerProperties:
749 #
750 # Properties for x-vfio-user-server objects.
751 #
752 # @socket: socket to be used by the libvfio-user library
753 #
754 # @device: the ID of the device to be emulated at the server
755 #
756 # Since: 7.1
757 ##
758 { 'struct': 'VfioUserServerProperties',
759 'data': { 'socket': 'SocketAddress', 'device': 'str' } }
760
761 ##
762 # @RngProperties:
763 #
764 # Properties for objects of classes derived from rng.
765 #
766 # @opened: if true, the device is opened immediately when applying this option
767 # and will probably fail when processing the next option. Don't use;
768 # only provided for compatibility. (default: false)
769 #
770 # Features:
771 # @deprecated: Member @opened is deprecated. Setting true doesn't make sense,
772 # and false is already the default.
773 #
774 # Since: 1.3
775 ##
776 { 'struct': 'RngProperties',
777 'data': { '*opened': { 'type': 'bool', 'features': ['deprecated'] } } }
778
779 ##
780 # @RngEgdProperties:
781 #
782 # Properties for rng-egd objects.
783 #
784 # @chardev: the name of a character device backend that provides the connection
785 # to the RNG daemon
786 #
787 # Since: 1.3
788 ##
789 { 'struct': 'RngEgdProperties',
790 'base': 'RngProperties',
791 'data': { 'chardev': 'str' } }
792
793 ##
794 # @RngRandomProperties:
795 #
796 # Properties for rng-random objects.
797 #
798 # @filename: the filename of the device on the host to obtain entropy from
799 # (default: "/dev/urandom")
800 #
801 # Since: 1.3
802 ##
803 { 'struct': 'RngRandomProperties',
804 'base': 'RngProperties',
805 'data': { '*filename': 'str' } }
806
807 ##
808 # @SevGuestProperties:
809 #
810 # Properties for sev-guest objects.
811 #
812 # @sev-device: SEV device to use (default: "/dev/sev")
813 #
814 # @dh-cert-file: guest owners DH certificate (encoded with base64)
815 #
816 # @session-file: guest owners session parameters (encoded with base64)
817 #
818 # @policy: SEV policy value (default: 0x1)
819 #
820 # @handle: SEV firmware handle (default: 0)
821 #
822 # @cbitpos: C-bit location in page table entry (default: 0)
823 #
824 # @reduced-phys-bits: number of bits in physical addresses that become
825 # unavailable when SEV is enabled
826 #
827 # @kernel-hashes: if true, add hashes of kernel/initrd/cmdline to a
828 # designated guest firmware page for measured boot
829 # with -kernel (default: false) (since 6.2)
830 #
831 # Since: 2.12
832 ##
833 { 'struct': 'SevGuestProperties',
834 'data': { '*sev-device': 'str',
835 '*dh-cert-file': 'str',
836 '*session-file': 'str',
837 '*policy': 'uint32',
838 '*handle': 'uint32',
839 '*cbitpos': 'uint32',
840 'reduced-phys-bits': 'uint32',
841 '*kernel-hashes': 'bool' } }
842
843 ##
844 # @ThreadContextProperties:
845 #
846 # Properties for thread context objects.
847 #
848 # @cpu-affinity: the list of host CPU numbers used as CPU affinity for all
849 # threads created in the thread context (default: QEMU main
850 # thread CPU affinity)
851 #
852 # @node-affinity: the list of host node numbers that will be resolved to a
853 # list of host CPU numbers used as CPU affinity. This is a
854 # shortcut for specifying the list of host CPU numbers
855 # belonging to the host nodes manually by setting
856 # @cpu-affinity. (default: QEMU main thread affinity)
857 #
858 # Since: 7.2
859 ##
860 { 'struct': 'ThreadContextProperties',
861 'data': { '*cpu-affinity': ['uint16'],
862 '*node-affinity': ['uint16'] } }
863
864
865 ##
866 # @ObjectType:
867 #
868 # Features:
869 # @unstable: Member @x-remote-object is experimental.
870 #
871 # Since: 6.0
872 ##
873 { 'enum': 'ObjectType',
874 'data': [
875 'authz-list',
876 'authz-listfile',
877 'authz-pam',
878 'authz-simple',
879 'can-bus',
880 { 'name': 'can-host-socketcan',
881 'if': 'CONFIG_LINUX' },
882 'colo-compare',
883 'cryptodev-backend',
884 'cryptodev-backend-builtin',
885 'cryptodev-backend-lkcf',
886 { 'name': 'cryptodev-vhost-user',
887 'if': 'CONFIG_VHOST_CRYPTO' },
888 'dbus-vmstate',
889 'filter-buffer',
890 'filter-dump',
891 'filter-mirror',
892 'filter-redirector',
893 'filter-replay',
894 'filter-rewriter',
895 'input-barrier',
896 { 'name': 'input-linux',
897 'if': 'CONFIG_LINUX' },
898 'iothread',
899 'main-loop',
900 { 'name': 'memory-backend-epc',
901 'if': 'CONFIG_LINUX' },
902 'memory-backend-file',
903 { 'name': 'memory-backend-memfd',
904 'if': 'CONFIG_LINUX' },
905 'memory-backend-ram',
906 'pef-guest',
907 { 'name': 'pr-manager-helper',
908 'if': 'CONFIG_LINUX' },
909 'qtest',
910 'rng-builtin',
911 'rng-egd',
912 { 'name': 'rng-random',
913 'if': 'CONFIG_POSIX' },
914 'secret',
915 { 'name': 'secret_keyring',
916 'if': 'CONFIG_SECRET_KEYRING' },
917 'sev-guest',
918 'thread-context',
919 's390-pv-guest',
920 'throttle-group',
921 'tls-creds-anon',
922 'tls-creds-psk',
923 'tls-creds-x509',
924 'tls-cipher-suites',
925 { 'name': 'x-remote-object', 'features': [ 'unstable' ] },
926 { 'name': 'x-vfio-user-server', 'features': [ 'unstable' ] }
927 ] }
928
929 ##
930 # @ObjectOptions:
931 #
932 # Describes the options of a user creatable QOM object.
933 #
934 # @qom-type: the class name for the object to be created
935 #
936 # @id: the name of the new object
937 #
938 # Since: 6.0
939 ##
940 { 'union': 'ObjectOptions',
941 'base': { 'qom-type': 'ObjectType',
942 'id': 'str' },
943 'discriminator': 'qom-type',
944 'data': {
945 'authz-list': 'AuthZListProperties',
946 'authz-listfile': 'AuthZListFileProperties',
947 'authz-pam': 'AuthZPAMProperties',
948 'authz-simple': 'AuthZSimpleProperties',
949 'can-host-socketcan': { 'type': 'CanHostSocketcanProperties',
950 'if': 'CONFIG_LINUX' },
951 'colo-compare': 'ColoCompareProperties',
952 'cryptodev-backend': 'CryptodevBackendProperties',
953 'cryptodev-backend-builtin': 'CryptodevBackendProperties',
954 'cryptodev-backend-lkcf': 'CryptodevBackendProperties',
955 'cryptodev-vhost-user': { 'type': 'CryptodevVhostUserProperties',
956 'if': 'CONFIG_VHOST_CRYPTO' },
957 'dbus-vmstate': 'DBusVMStateProperties',
958 'filter-buffer': 'FilterBufferProperties',
959 'filter-dump': 'FilterDumpProperties',
960 'filter-mirror': 'FilterMirrorProperties',
961 'filter-redirector': 'FilterRedirectorProperties',
962 'filter-replay': 'NetfilterProperties',
963 'filter-rewriter': 'FilterRewriterProperties',
964 'input-barrier': 'InputBarrierProperties',
965 'input-linux': { 'type': 'InputLinuxProperties',
966 'if': 'CONFIG_LINUX' },
967 'iothread': 'IothreadProperties',
968 'main-loop': 'MainLoopProperties',
969 'memory-backend-epc': { 'type': 'MemoryBackendEpcProperties',
970 'if': 'CONFIG_LINUX' },
971 'memory-backend-file': 'MemoryBackendFileProperties',
972 'memory-backend-memfd': { 'type': 'MemoryBackendMemfdProperties',
973 'if': 'CONFIG_LINUX' },
974 'memory-backend-ram': 'MemoryBackendProperties',
975 'pr-manager-helper': { 'type': 'PrManagerHelperProperties',
976 'if': 'CONFIG_LINUX' },
977 'qtest': 'QtestProperties',
978 'rng-builtin': 'RngProperties',
979 'rng-egd': 'RngEgdProperties',
980 'rng-random': { 'type': 'RngRandomProperties',
981 'if': 'CONFIG_POSIX' },
982 'secret': 'SecretProperties',
983 'secret_keyring': { 'type': 'SecretKeyringProperties',
984 'if': 'CONFIG_SECRET_KEYRING' },
985 'sev-guest': 'SevGuestProperties',
986 'thread-context': 'ThreadContextProperties',
987 'throttle-group': 'ThrottleGroupProperties',
988 'tls-creds-anon': 'TlsCredsAnonProperties',
989 'tls-creds-psk': 'TlsCredsPskProperties',
990 'tls-creds-x509': 'TlsCredsX509Properties',
991 'tls-cipher-suites': 'TlsCredsProperties',
992 'x-remote-object': 'RemoteObjectProperties',
993 'x-vfio-user-server': 'VfioUserServerProperties'
994 } }
995
996 ##
997 # @object-add:
998 #
999 # Create a QOM object.
1000 #
1001 # Returns: Nothing on success
1002 # Error if @qom-type is not a valid class name
1003 #
1004 # Since: 2.0
1005 #
1006 # Example:
1007 #
1008 # -> { "execute": "object-add",
1009 # "arguments": { "qom-type": "rng-random", "id": "rng1",
1010 # "filename": "/dev/hwrng" } }
1011 # <- { "return": {} }
1012 #
1013 ##
1014 { 'command': 'object-add', 'data': 'ObjectOptions', 'boxed': true,
1015 'allow-preconfig': true }
1016
1017 ##
1018 # @object-del:
1019 #
1020 # Remove a QOM object.
1021 #
1022 # @id: the name of the QOM object to remove
1023 #
1024 # Returns: Nothing on success
1025 # Error if @id is not a valid id for a QOM object
1026 #
1027 # Since: 2.0
1028 #
1029 # Example:
1030 #
1031 # -> { "execute": "object-del", "arguments": { "id": "rng1" } }
1032 # <- { "return": {} }
1033 #
1034 ##
1035 { 'command': 'object-del', 'data': {'id': 'str'},
1036 'allow-preconfig': true }