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.
7 { 'include': 'authz.json' }
8 { 'include': 'block-core.json' }
9 { 'include': 'common.json' }
10 { 'include': 'crypto.json' }
13 # = QEMU Object Model (QOM)
17 # @ObjectPropertyInfo:
19 # @name: the name of the property
21 # @type: the type of the property. This will typically come in one of
24 # 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or
25 # 'double'. These types are mapped to the appropriate JSON
28 # 2) A child type in the form 'child<subtype>' where subtype is a
29 # qdev device type name. Child properties create the
32 # 3) A link type in the form 'link<subtype>' where subtype is a
33 # qdev device type name. Link properties form the device model
36 # @description: if specified, the description of the property.
38 # @default-value: the default value, if any (since 5.0)
42 { 'struct': 'ObjectPropertyInfo',
43 'data': { 'name': 'str',
45 '*description': 'str',
46 '*default-value': 'any' } }
51 # This command will list any properties of a object given a path in
54 # @path: the path within the object model. See @qom-get for a
55 # description of this parameter.
57 # Returns: a list of @ObjectPropertyInfo that describe the properties
64 # -> { "execute": "qom-list",
65 # "arguments": { "path": "/chardevs" } }
66 # <- { "return": [ { "name": "type", "type": "string" },
67 # { "name": "parallel0", "type": "child<chardev-vc>" },
68 # { "name": "serial0", "type": "child<chardev-vc>" },
69 # { "name": "mon0", "type": "child<chardev-stdio>" } ] }
71 { 'command': 'qom-list',
72 'data': { 'path': 'str' },
73 'returns': [ 'ObjectPropertyInfo' ],
74 'allow-preconfig': true }
79 # This command will get a property from a object model path and return
82 # @path: The path within the object model. There are two forms of
83 # supported paths--absolute and partial paths.
85 # Absolute paths are derived from the root object and can follow
86 # child<> or link<> properties. Since they can follow link<>
87 # properties, they can be arbitrarily long. Absolute paths look
88 # like absolute filenames and are prefixed with a leading slash.
90 # Partial paths look like relative filenames. They do not begin
91 # with a prefix. The matching rules for partial paths are subtle
92 # but designed to make specifying objects easy. At each level of
93 # the composition tree, the partial path is matched as an absolute
94 # path. The first match is not returned. At least two matches
95 # are searched for. A successful result is only returned if only
96 # one match is found. If more than one match is found, a flag is
97 # return to indicate that the match was ambiguous.
99 # @property: The property name to read
101 # Returns: The property value. The type depends on the property type.
102 # child<> and link<> properties are returned as #str pathnames.
103 # All integer property types (u8, u16, etc) are returned as #int.
108 # :title: Use absolute path
110 # -> { "execute": "qom-get",
111 # "arguments": { "path": "/machine/unattached/device[0]",
112 # "property": "hotplugged" } }
113 # <- { "return": false }
116 # :title: Use partial path
118 # -> { "execute": "qom-get",
119 # "arguments": { "path": "unattached/sysbus",
120 # "property": "type" } }
121 # <- { "return": "System" }
123 { 'command': 'qom-get',
124 'data': { 'path': 'str', 'property': 'str' },
126 'allow-preconfig': true }
131 # This command will set a property from a object model path.
133 # @path: see @qom-get for a description of this parameter
135 # @property: the property name to set
137 # @value: a value who's type is appropriate for the property type.
138 # See @qom-get for a description of type mapping.
144 # -> { "execute": "qom-set",
145 # "arguments": { "path": "/machine",
146 # "property": "graphics",
148 # <- { "return": {} }
150 { 'command': 'qom-set',
151 'data': { 'path': 'str', 'property': 'str', 'value': 'any' },
152 'allow-preconfig': true }
157 # This structure describes a search result from @qom-list-types
159 # @name: the type name found in the search
161 # @abstract: the type is abstract and can't be directly instantiated.
162 # Omitted if false. (since 2.10)
164 # @parent: Name of parent type, if any (since 2.10)
168 { 'struct': 'ObjectTypeInfo',
169 'data': { 'name': 'str', '*abstract': 'bool', '*parent': 'str' } }
174 # This command will return a list of types given search parameters
176 # @implements: if specified, only return types that implement this
179 # @abstract: if true, include abstract types in the results
181 # Returns: a list of @ObjectTypeInfo or an empty list if no results
186 { 'command': 'qom-list-types',
187 'data': { '*implements': 'str', '*abstract': 'bool' },
188 'returns': [ 'ObjectTypeInfo' ],
189 'allow-preconfig': true }
192 # @qom-list-properties:
194 # List properties associated with a QOM object.
196 # @typename: the type name of an object
198 # .. note:: Objects can create properties at runtime, for example to
199 # describe links between different devices and/or objects. These
200 # properties are not included in the output of this command.
202 # Returns: a list of ObjectPropertyInfo describing object properties
206 { 'command': 'qom-list-properties',
207 'data': { 'typename': 'str'},
208 'returns': [ 'ObjectPropertyInfo' ],
209 'allow-preconfig': true }
212 # @CanHostSocketcanProperties:
214 # Properties for can-host-socketcan objects.
216 # @if: interface name of the host system CAN bus to connect to
218 # @canbus: object ID of the can-bus object to connect to the host
223 { 'struct': 'CanHostSocketcanProperties',
224 'data': { 'if': 'str',
226 'if': 'CONFIG_LINUX' }
229 # @ColoCompareProperties:
231 # Properties for colo-compare objects.
233 # @primary_in: name of the character device backend to use for the
234 # primary input (incoming packets are redirected to @outdev)
236 # @secondary_in: name of the character device backend to use for
237 # secondary input (incoming packets are only compared to the input
238 # on @primary_in and then dropped)
240 # @outdev: name of the character device backend to use for output
242 # @iothread: name of the iothread to run in
244 # @notify_dev: name of the character device backend to be used to
245 # communicate with the remote colo-frame (only for Xen COLO)
247 # @compare_timeout: the maximum time to hold a packet from @primary_in
248 # for comparison with an incoming packet on @secondary_in in
249 # milliseconds (default: 3000)
251 # @expired_scan_cycle: the interval at which colo-compare checks
252 # whether packets from @primary have timed out, in milliseconds
255 # @max_queue_size: the maximum number of packets to keep in the queue
256 # for comparing with incoming packets from @secondary_in. If the
257 # queue is full and additional packets are received, the
258 # additional packets are dropped. (default: 1024)
260 # @vnet_hdr_support: if true, vnet header support is enabled
265 { 'struct': 'ColoCompareProperties',
266 'data': { 'primary_in': 'str',
267 'secondary_in': 'str',
270 '*notify_dev': 'str',
271 '*compare_timeout': 'uint64',
272 '*expired_scan_cycle': 'uint32',
273 '*max_queue_size': 'uint32',
274 '*vnet_hdr_support': 'bool' } }
277 # @CryptodevBackendProperties:
279 # Properties for cryptodev-backend and cryptodev-backend-builtin
282 # @queues: the number of queues for the cryptodev backend. Ignored
283 # for cryptodev-backend and must be 1 for
284 # cryptodev-backend-builtin. (default: 1)
286 # @throttle-bps: limit total bytes per second (Since 8.0)
288 # @throttle-ops: limit total operations per second (Since 8.0)
292 { 'struct': 'CryptodevBackendProperties',
293 'data': { '*queues': 'uint32',
294 '*throttle-bps': 'uint64',
295 '*throttle-ops': 'uint64' } }
298 # @CryptodevVhostUserProperties:
300 # Properties for cryptodev-vhost-user objects.
302 # @chardev: the name of a Unix domain socket character device that
303 # connects to the vhost-user server
307 { 'struct': 'CryptodevVhostUserProperties',
308 'base': 'CryptodevBackendProperties',
309 'data': { 'chardev': 'str' },
310 'if': 'CONFIG_VHOST_CRYPTO' }
313 # @DBusVMStateProperties:
315 # Properties for dbus-vmstate objects.
317 # @addr: the name of the DBus bus to connect to
319 # @id-list: a comma separated list of DBus IDs of helpers whose data
320 # should be included in the VM state on migration
324 { 'struct': 'DBusVMStateProperties',
325 'data': { 'addr': 'str' ,
326 '*id-list': 'str' } }
331 # Indicates where to insert a netfilter relative to a given other
334 # @before: insert before the specified filter
336 # @behind: insert behind the specified filter
340 { 'enum': 'NetfilterInsert',
341 'data': [ 'before', 'behind' ] }
344 # @NetfilterProperties:
346 # Properties for objects of classes derived from netfilter.
348 # @netdev: id of the network device backend to filter
350 # @queue: indicates which queue(s) to filter (default: all)
352 # @status: indicates whether the filter is enabled ("on") or disabled
353 # ("off") (default: "on")
355 # @position: specifies where the filter should be inserted in the
356 # filter list. "head" means the filter is inserted at the head of
357 # the filter list, before any existing filters. "tail" means the
358 # filter is inserted at the tail of the filter list, behind any
359 # existing filters (default). "id=<id>" means the filter is
360 # inserted before or behind the filter specified by <id>,
361 # depending on the @insert property. (default: "tail")
363 # @insert: where to insert the filter relative to the filter given in
364 # @position. Ignored if @position is "head" or "tail".
369 { 'struct': 'NetfilterProperties',
370 'data': { 'netdev': 'str',
371 '*queue': 'NetFilterDirection',
374 '*insert': 'NetfilterInsert' } }
377 # @FilterBufferProperties:
379 # Properties for filter-buffer objects.
381 # @interval: a non-zero interval in microseconds. All packets
382 # arriving in the given interval are delayed until the end of the
387 { 'struct': 'FilterBufferProperties',
388 'base': 'NetfilterProperties',
389 'data': { 'interval': 'uint32' } }
392 # @FilterDumpProperties:
394 # Properties for filter-dump objects.
396 # @file: the filename where the dumped packets should be stored
398 # @maxlen: maximum number of bytes in a packet that are stored
403 { 'struct': 'FilterDumpProperties',
404 'base': 'NetfilterProperties',
405 'data': { 'file': 'str',
406 '*maxlen': 'uint32' } }
409 # @FilterMirrorProperties:
411 # Properties for filter-mirror objects.
413 # @outdev: the name of a character device backend to which all
414 # incoming packets are mirrored
416 # @vnet_hdr_support: if true, vnet header support is enabled
421 { 'struct': 'FilterMirrorProperties',
422 'base': 'NetfilterProperties',
423 'data': { 'outdev': 'str',
424 '*vnet_hdr_support': 'bool' } }
427 # @FilterRedirectorProperties:
429 # Properties for filter-redirector objects.
431 # At least one of @indev or @outdev must be present. If both are
432 # present, they must not refer to the same character device backend.
434 # @indev: the name of a character device backend from which packets
435 # are received and redirected to the filtered network device
437 # @outdev: the name of a character device backend to which all
438 # incoming packets are redirected
440 # @vnet_hdr_support: if true, vnet header support is enabled
445 { 'struct': 'FilterRedirectorProperties',
446 'base': 'NetfilterProperties',
447 'data': { '*indev': 'str',
449 '*vnet_hdr_support': 'bool' } }
452 # @FilterRewriterProperties:
454 # Properties for filter-rewriter objects.
456 # @vnet_hdr_support: if true, vnet header support is enabled
461 { 'struct': 'FilterRewriterProperties',
462 'base': 'NetfilterProperties',
463 'data': { '*vnet_hdr_support': 'bool' } }
466 # @InputBarrierProperties:
468 # Properties for input-barrier objects.
470 # @name: the screen name as declared in the screens section of
473 # @server: hostname of the Barrier server (default: "localhost")
475 # @port: TCP port of the Barrier server (default: "24800")
477 # @x-origin: x coordinate of the leftmost pixel on the guest screen
480 # @y-origin: y coordinate of the topmost pixel on the guest screen
483 # @width: the width of secondary screen in pixels (default: "1920")
485 # @height: the height of secondary screen in pixels (default: "1080")
489 { 'struct': 'InputBarrierProperties',
490 'data': { 'name': 'str',
499 # @InputLinuxProperties:
501 # Properties for input-linux objects.
503 # @evdev: the path of the host evdev device to use
505 # @grab_all: if true, grab is toggled for all devices (e.g. both
506 # keyboard and mouse) instead of just one device (default: false)
508 # @repeat: enables auto-repeat events (default: false)
510 # @grab-toggle: the key or key combination that toggles device grab
511 # (default: ctrl-ctrl)
515 { 'struct': 'InputLinuxProperties',
516 'data': { 'evdev': 'str',
519 '*grab-toggle': 'GrabToggleKeys' },
520 'if': 'CONFIG_LINUX' }
523 # @EventLoopBaseProperties:
525 # Common properties for event loops
527 # @aio-max-batch: maximum number of requests in a batch for the AIO
528 # engine, 0 means that the engine will use its default.
531 # @thread-pool-min: minimum number of threads reserved in the thread
534 # @thread-pool-max: maximum number of threads the thread pool can
535 # contain (default:64)
539 { 'struct': 'EventLoopBaseProperties',
540 'data': { '*aio-max-batch': 'int',
541 '*thread-pool-min': 'int',
542 '*thread-pool-max': 'int' } }
545 # @IothreadProperties:
547 # Properties for iothread objects.
549 # @poll-max-ns: the maximum number of nanoseconds to busy wait for
550 # events. 0 means polling is disabled (default: 32768 on POSIX
551 # hosts, 0 otherwise)
553 # @poll-grow: the multiplier used to increase the polling time when
554 # the algorithm detects it is missing events due to not polling
555 # long enough. 0 selects a default behaviour (default: 0)
557 # @poll-shrink: the divisor used to decrease the polling time when the
558 # algorithm detects it is spending too long polling without
559 # encountering events. 0 selects a default behaviour (default: 0)
561 # The @aio-max-batch option is available since 6.1.
565 { 'struct': 'IothreadProperties',
566 'base': 'EventLoopBaseProperties',
567 'data': { '*poll-max-ns': 'int',
569 '*poll-shrink': 'int' } }
572 # @MainLoopProperties:
574 # Properties for the main-loop object.
578 { 'struct': 'MainLoopProperties',
579 'base': 'EventLoopBaseProperties',
583 # @MemoryBackendProperties:
585 # Properties for objects of classes derived from memory-backend.
587 # @merge: if true, mark the memory as mergeable (default depends on
590 # @dump: if true, include the memory in core dumps (default depends on
593 # @host-nodes: the list of NUMA host nodes to bind the memory to
595 # @policy: the NUMA policy (default: 'default')
597 # @prealloc: if true, preallocate memory (default: false)
599 # @prealloc-threads: number of CPU threads to use for prealloc
602 # @prealloc-context: thread context to use for creation of
603 # preallocation threads (default: none) (since 7.2)
605 # @share: if false, the memory is private to QEMU; if true, it is
606 # shared (default false for backends memory-backend-file and
607 # memory-backend-ram, true for backends memory-backend-epc,
608 # memory-backend-memfd, and memory-backend-shm)
610 # @reserve: if true, reserve swap space (or huge pages) if applicable
611 # (default: true) (since 6.1)
613 # @size: size of the memory region in bytes
615 # @x-use-canonical-path-for-ramblock-id: if true, the canonical path
616 # is used for ramblock-id. Disable this for 4.0 machine types or
617 # older to allow migration with newer QEMU versions.
618 # (default: false generally, but true for machine types <= 4.0)
620 # .. note:: prealloc=true and reserve=false cannot be set at the same
621 # time. With reserve=true, the behavior depends on the operating
622 # system: for example, Linux will not reserve swap space for shared
623 # file mappings -- "not applicable". In contrast, reserve=false
624 # will bail out if it cannot be configured accordingly.
628 { 'struct': 'MemoryBackendProperties',
629 'data': { '*dump': 'bool',
630 '*host-nodes': ['uint16'],
632 '*policy': 'HostMemPolicy',
634 '*prealloc-threads': 'uint32',
635 '*prealloc-context': 'str',
639 '*x-use-canonical-path-for-ramblock-id': 'bool' } }
642 # @MemoryBackendFileProperties:
644 # Properties for memory-backend-file objects.
646 # @align: the base address alignment when QEMU mmap(2)s @mem-path.
647 # Some backend stores specified by @mem-path require an alignment
648 # different than the default one used by QEMU, e.g. the device DAX
649 # /dev/dax0.0 requires 2M alignment rather than 4K. In such
650 # cases, users can specify the required alignment via this option.
651 # 0 selects a default alignment (currently the page size).
654 # @offset: the offset into the target file that the region starts at.
655 # You can use this option to back multiple regions with a single
656 # file. Must be a multiple of the page size.
657 # (default: 0) (since 8.1)
659 # @discard-data: if true, the file contents can be destroyed when QEMU
660 # exits, to avoid unnecessarily flushing data to the backing file.
661 # Note that @discard-data is only an optimization, and QEMU might
662 # not discard file contents if it aborts unexpectedly or is
663 # terminated using SIGKILL. (default: false)
665 # @mem-path: the path to either a shared memory or huge page
668 # @pmem: specifies whether the backing file specified by @mem-path is
669 # in host persistent memory that can be accessed using the SNIA
670 # NVM programming model (e.g. Intel NVDIMM).
672 # @readonly: if true, the backing file is opened read-only; if false,
673 # it is opened read-write. (default: false)
675 # @rom: whether to create Read Only Memory (ROM) that cannot be
676 # modified by the VM. Any write attempts to such ROM will be
677 # denied. Most use cases want writable RAM instead of ROM.
678 # However, selected use cases, like R/O NVDIMMs, can benefit from
679 # ROM. If set to 'on', create ROM; if set to 'off', create
680 # writable RAM; if set to 'auto', the value of the @readonly
681 # property is used. This property is primarily helpful when we
682 # want to have proper RAM in configurations that would
683 # traditionally create ROM before this property was introduced: VM
684 # templating, where we want to open a file readonly (@readonly set
685 # to true) and mark the memory to be private for QEMU (@share set
686 # to false). For this use case, we need writable RAM instead of
687 # ROM, and want to set this property to 'off'. (default: auto,
692 { 'struct': 'MemoryBackendFileProperties',
693 'base': 'MemoryBackendProperties',
694 'data': { '*align': 'size',
696 '*discard-data': 'bool',
698 '*pmem': { 'type': 'bool', 'if': 'CONFIG_LIBPMEM' },
700 '*rom': 'OnOffAuto' } }
703 # @MemoryBackendMemfdProperties:
705 # Properties for memory-backend-memfd objects.
707 # @hugetlb: if true, the file to be created resides in the hugetlbfs
708 # filesystem (default: false)
710 # @hugetlbsize: the hugetlb page size on systems that support multiple
711 # hugetlb page sizes (it must be a power of 2 value supported by
712 # the system). 0 selects a default page size. This option is
713 # ignored if @hugetlb is false. (default: 0)
715 # @seal: if true, create a sealed-file, which will block further
716 # resizing of the memory (default: true)
720 { 'struct': 'MemoryBackendMemfdProperties',
721 'base': 'MemoryBackendProperties',
722 'data': { '*hugetlb': 'bool',
723 '*hugetlbsize': 'size',
725 'if': 'CONFIG_LINUX' }
728 # @MemoryBackendShmProperties:
730 # Properties for memory-backend-shm objects.
732 # This memory backend supports only shared memory, which is the
737 { 'struct': 'MemoryBackendShmProperties',
738 'base': 'MemoryBackendProperties',
740 'if': 'CONFIG_POSIX' }
743 # @MemoryBackendEpcProperties:
745 # Properties for memory-backend-epc objects.
747 # The @merge boolean option is false by default with epc
749 # The @dump boolean option is false by default with epc
753 { 'struct': 'MemoryBackendEpcProperties',
754 'base': 'MemoryBackendProperties',
756 'if': 'CONFIG_LINUX' }
759 # @PrManagerHelperProperties:
761 # Properties for pr-manager-helper objects.
763 # @path: the path to a Unix domain socket for connecting to the
768 { 'struct': 'PrManagerHelperProperties',
769 'data': { 'path': 'str' },
770 'if': 'CONFIG_LINUX' }
775 # Properties for qtest objects.
777 # @chardev: the chardev to be used to receive qtest commands on.
779 # @log: the path to a log file
783 { 'struct': 'QtestProperties',
784 'data': { 'chardev': 'str',
788 # @RemoteObjectProperties:
790 # Properties for x-remote-object objects.
792 # @fd: file descriptor name previously passed via 'getfd' command
794 # @devid: the id of the device to be associated with the file
799 { 'struct': 'RemoteObjectProperties',
800 'data': { 'fd': 'str', 'devid': 'str' } }
803 # @VfioUserServerProperties:
805 # Properties for x-vfio-user-server objects.
807 # @socket: socket to be used by the libvfio-user library
809 # @device: the ID of the device to be emulated at the server
813 { 'struct': 'VfioUserServerProperties',
814 'data': { 'socket': 'SocketAddress', 'device': 'str' } }
817 # @IOMMUFDProperties:
819 # Properties for iommufd objects.
821 # @fd: file descriptor name previously passed via 'getfd' command,
822 # which represents a pre-opened /dev/iommu. This allows the
823 # iommufd object to be shared across several subsystems (VFIO,
824 # VDPA, ...), and the file descriptor to be shared with other
825 # process, e.g. DPDK. (default: QEMU opens /dev/iommu by itself)
829 { 'struct': 'IOMMUFDProperties',
830 'data': { '*fd': 'str' } }
833 # @AcpiGenericInitiatorProperties:
835 # Properties for acpi-generic-initiator objects.
837 # @pci-dev: PCI device ID to be associated with the node
839 # @node: NUMA node associated with the PCI device
843 { 'struct': 'AcpiGenericInitiatorProperties',
844 'data': { 'pci-dev': 'str',
848 # @AcpiGenericPortProperties:
850 # Properties for acpi-generic-port objects.
852 # @pci-bus: QOM path of the PCI bus of the hostbridge associated with
853 # this SRAT Generic Port Affinity Structure. This is the same as
854 # the bus parameter for the root ports attached to this host
855 # bridge. The resulting SRAT Generic Port Affinity Structure will
856 # refer to the ACPI object in DSDT that represents the host bridge
857 # (e.g. ACPI0016 for CXL host bridges). See ACPI 6.5 Section
858 # 5.2.16.7 for more information.
860 # @node: Similar to a NUMA node ID, but instead of providing a
861 # reference point used for defining NUMA distances and access
862 # characteristics to memory or from an initiator (e.g. CPU), this
863 # node defines the boundary point between non-discoverable system
864 # buses which must be described by firmware, and a discoverable
865 # bus. NUMA distances and access characteristics are defined to
866 # and from that point. For system software to establish full
867 # initiator to target characteristics this information must be
868 # combined with information retrieved from the discoverable part
869 # of the path. An example would use CDAT (see UEFI.org)
870 # information read from devices and switches in conjunction with
871 # link characteristics read from PCIe Configuration space.
872 # To get the full path latency from CPU to CXL attached DRAM
873 # CXL device: Add the latency from CPU to Generic Port (from
874 # HMAT indexed via the the node ID in this SRAT structure) to
875 # that for CXL bus links, the latency across intermediate switches
876 # and from the EP port to the actual memory. Bandwidth is more
877 # complex as there may be interleaving across multiple devices
878 # and shared links in the path.
882 { 'struct': 'AcpiGenericPortProperties',
883 'data': { 'pci-bus': 'str',
889 # Properties for objects of classes derived from rng.
891 # @opened: if true, the device is opened immediately when applying
892 # this option and will probably fail when processing the next
893 # option. Don't use; only provided for compatibility.
898 # @deprecated: Member @opened is deprecated. Setting true doesn't
899 # make sense, and false is already the default.
903 { 'struct': 'RngProperties',
904 'data': { '*opened': { 'type': 'bool', 'features': ['deprecated'] } } }
909 # Properties for rng-egd objects.
911 # @chardev: the name of a character device backend that provides the
912 # connection to the RNG daemon
916 { 'struct': 'RngEgdProperties',
917 'base': 'RngProperties',
918 'data': { 'chardev': 'str' } }
921 # @RngRandomProperties:
923 # Properties for rng-random objects.
925 # @filename: the filename of the device on the host to obtain entropy
926 # from (default: "/dev/urandom")
930 { 'struct': 'RngRandomProperties',
931 'base': 'RngProperties',
932 'data': { '*filename': 'str' },
933 'if': 'CONFIG_POSIX' }
936 # @SevCommonProperties:
938 # Properties common to objects that are derivatives of sev-common.
940 # @sev-device: SEV device to use (default: "/dev/sev")
942 # @cbitpos: C-bit location in page table entry (default: 0)
944 # @reduced-phys-bits: number of bits in physical addresses that become
945 # unavailable when SEV is enabled
947 # @kernel-hashes: if true, add hashes of kernel/initrd/cmdline to a
948 # designated guest firmware page for measured boot with -kernel
949 # (default: false) (since 6.2)
953 { 'struct': 'SevCommonProperties',
954 'data': { '*sev-device': 'str',
955 '*cbitpos': 'uint32',
956 'reduced-phys-bits': 'uint32',
957 '*kernel-hashes': 'bool' } }
960 # @SevGuestProperties:
962 # Properties for sev-guest objects.
964 # @dh-cert-file: guest owners DH certificate (encoded with base64)
966 # @session-file: guest owners session parameters (encoded with base64)
968 # @policy: SEV policy value (default: 0x1)
970 # @handle: SEV firmware handle (default: 0)
972 # @legacy-vm-type: Use legacy KVM_SEV_INIT KVM interface for creating
973 # the VM. The newer KVM_SEV_INIT2 interface, from Linux >= 6.10,
974 # syncs additional vCPU state when initializing the VMSA
975 # structures, which will result in a different guest measurement.
976 # Set this to 'on' to force compatibility with older QEMU or kernel
977 # versions that rely on legacy KVM_SEV_INIT behavior. 'auto' will
978 # behave identically to 'on', but will automatically switch to
979 # using KVM_SEV_INIT2 if the user specifies any additional options
980 # that require it. If set to 'off', QEMU will require
981 # KVM_SEV_INIT2 unconditionally.
982 # (default: off) (since 9.1)
986 { 'struct': 'SevGuestProperties',
987 'base': 'SevCommonProperties',
988 'data': { '*dh-cert-file': 'str',
989 '*session-file': 'str',
992 '*legacy-vm-type': 'OnOffAuto' } }
995 # @SevSnpGuestProperties:
997 # Properties for sev-snp-guest objects. Most of these are direct
998 # arguments for the KVM_SNP_* interfaces documented in the Linux
999 # kernel source under
1000 # Documentation/arch/x86/amd-memory-encryption.rst, which are in turn
1001 # closely coupled with the SNP_INIT/SNP_LAUNCH_* firmware commands
1002 # documented in the SEV-SNP Firmware ABI Specification (Rev 0.9).
1004 # More usage information is also available in the QEMU source tree
1005 # under docs/amd-memory-encryption.
1007 # @policy: the 'POLICY' parameter to the SNP_LAUNCH_START command, as
1008 # defined in the SEV-SNP firmware ABI (default: 0x30000)
1010 # @guest-visible-workarounds: 16-byte, base64-encoded blob to report
1011 # hypervisor-defined workarounds, corresponding to the 'GOSVW'
1012 # parameter of the SNP_LAUNCH_START command defined in the SEV-SNP
1013 # firmware ABI (default: all-zero)
1015 # @id-block: 96-byte, base64-encoded blob to provide the 'ID Block'
1016 # structure for the SNP_LAUNCH_FINISH command defined in the
1017 # SEV-SNP firmware ABI (default: all-zero)
1019 # @id-auth: 4096-byte, base64-encoded blob to provide the 'ID
1020 # Authentication Information Structure' for the SNP_LAUNCH_FINISH
1021 # command defined in the SEV-SNP firmware ABI (default: all-zero)
1023 # @author-key-enabled: true if 'id-auth' blob contains the 'AUTHOR_KEY'
1024 # field defined SEV-SNP firmware ABI (default: false)
1026 # @host-data: 32-byte, base64-encoded, user-defined blob to provide to
1027 # the guest, as documented for the 'HOST_DATA' parameter of the
1028 # SNP_LAUNCH_FINISH command in the SEV-SNP firmware ABI (default:
1031 # @vcek-disabled: Guests are by default allowed to choose between VLEK
1032 # (Versioned Loaded Endorsement Key) or VCEK (Versioned Chip
1033 # Endorsement Key) when requesting attestation reports from
1034 # firmware. Set this to true to disable the use of VCEK.
1035 # (default: false) (since: 9.1)
1039 { 'struct': 'SevSnpGuestProperties',
1040 'base': 'SevCommonProperties',
1042 '*policy': 'uint64',
1043 '*guest-visible-workarounds': 'str',
1046 '*author-key-enabled': 'bool',
1047 '*host-data': 'str',
1048 '*vcek-disabled': 'bool' } }
1051 # @ThreadContextProperties:
1053 # Properties for thread context objects.
1055 # @cpu-affinity: the list of host CPU numbers used as CPU affinity for
1056 # all threads created in the thread context (default: QEMU main
1057 # thread CPU affinity)
1059 # @node-affinity: the list of host node numbers that will be resolved
1060 # to a list of host CPU numbers used as CPU affinity. This is a
1061 # shortcut for specifying the list of host CPU numbers belonging
1062 # to the host nodes manually by setting @cpu-affinity.
1063 # (default: QEMU main thread affinity)
1067 { 'struct': 'ThreadContextProperties',
1068 'data': { '*cpu-affinity': ['uint16'],
1069 '*node-affinity': ['uint16'] } }
1077 # @unstable: Members @x-remote-object and @x-vfio-user-server are
1082 { 'enum': 'ObjectType',
1084 'acpi-generic-initiator',
1085 'acpi-generic-port',
1091 { 'name': 'can-host-socketcan',
1092 'if': 'CONFIG_LINUX' },
1094 'cryptodev-backend',
1095 'cryptodev-backend-builtin',
1096 'cryptodev-backend-lkcf',
1097 { 'name': 'cryptodev-vhost-user',
1098 'if': 'CONFIG_VHOST_CRYPTO' },
1103 'filter-redirector',
1107 { 'name': 'input-linux',
1108 'if': 'CONFIG_LINUX' },
1112 { 'name': 'memory-backend-epc',
1113 'if': 'CONFIG_LINUX' },
1114 'memory-backend-file',
1115 { 'name': 'memory-backend-memfd',
1116 'if': 'CONFIG_LINUX' },
1117 'memory-backend-ram',
1118 { 'name': 'memory-backend-shm',
1119 'if': 'CONFIG_POSIX' },
1121 { 'name': 'pr-manager-helper',
1122 'if': 'CONFIG_LINUX' },
1126 { 'name': 'rng-random',
1127 'if': 'CONFIG_POSIX' },
1129 { 'name': 'secret_keyring',
1130 'if': 'CONFIG_SECRET_KEYRING' },
1139 'tls-cipher-suites',
1140 { 'name': 'x-remote-object', 'features': [ 'unstable' ] },
1141 { 'name': 'x-vfio-user-server', 'features': [ 'unstable' ] }
1147 # Describes the options of a user creatable QOM object.
1149 # @qom-type: the class name for the object to be created
1151 # @id: the name of the new object
1155 { 'union': 'ObjectOptions',
1156 'base': { 'qom-type': 'ObjectType',
1158 'discriminator': 'qom-type',
1160 'acpi-generic-initiator': 'AcpiGenericInitiatorProperties',
1161 'acpi-generic-port': 'AcpiGenericPortProperties',
1162 'authz-list': 'AuthZListProperties',
1163 'authz-listfile': 'AuthZListFileProperties',
1164 'authz-pam': 'AuthZPAMProperties',
1165 'authz-simple': 'AuthZSimpleProperties',
1166 'can-host-socketcan': { 'type': 'CanHostSocketcanProperties',
1167 'if': 'CONFIG_LINUX' },
1168 'colo-compare': 'ColoCompareProperties',
1169 'cryptodev-backend': 'CryptodevBackendProperties',
1170 'cryptodev-backend-builtin': 'CryptodevBackendProperties',
1171 'cryptodev-backend-lkcf': 'CryptodevBackendProperties',
1172 'cryptodev-vhost-user': { 'type': 'CryptodevVhostUserProperties',
1173 'if': 'CONFIG_VHOST_CRYPTO' },
1174 'dbus-vmstate': 'DBusVMStateProperties',
1175 'filter-buffer': 'FilterBufferProperties',
1176 'filter-dump': 'FilterDumpProperties',
1177 'filter-mirror': 'FilterMirrorProperties',
1178 'filter-redirector': 'FilterRedirectorProperties',
1179 'filter-replay': 'NetfilterProperties',
1180 'filter-rewriter': 'FilterRewriterProperties',
1181 'input-barrier': 'InputBarrierProperties',
1182 'input-linux': { 'type': 'InputLinuxProperties',
1183 'if': 'CONFIG_LINUX' },
1184 'iommufd': 'IOMMUFDProperties',
1185 'iothread': 'IothreadProperties',
1186 'main-loop': 'MainLoopProperties',
1187 'memory-backend-epc': { 'type': 'MemoryBackendEpcProperties',
1188 'if': 'CONFIG_LINUX' },
1189 'memory-backend-file': 'MemoryBackendFileProperties',
1190 'memory-backend-memfd': { 'type': 'MemoryBackendMemfdProperties',
1191 'if': 'CONFIG_LINUX' },
1192 'memory-backend-ram': 'MemoryBackendProperties',
1193 'memory-backend-shm': { 'type': 'MemoryBackendShmProperties',
1194 'if': 'CONFIG_POSIX' },
1195 'pr-manager-helper': { 'type': 'PrManagerHelperProperties',
1196 'if': 'CONFIG_LINUX' },
1197 'qtest': 'QtestProperties',
1198 'rng-builtin': 'RngProperties',
1199 'rng-egd': 'RngEgdProperties',
1200 'rng-random': { 'type': 'RngRandomProperties',
1201 'if': 'CONFIG_POSIX' },
1202 'secret': 'SecretProperties',
1203 'secret_keyring': { 'type': 'SecretKeyringProperties',
1204 'if': 'CONFIG_SECRET_KEYRING' },
1205 'sev-guest': 'SevGuestProperties',
1206 'sev-snp-guest': 'SevSnpGuestProperties',
1207 'thread-context': 'ThreadContextProperties',
1208 'throttle-group': 'ThrottleGroupProperties',
1209 'tls-creds-anon': 'TlsCredsAnonProperties',
1210 'tls-creds-psk': 'TlsCredsPskProperties',
1211 'tls-creds-x509': 'TlsCredsX509Properties',
1212 'tls-cipher-suites': 'TlsCredsProperties',
1213 'x-remote-object': 'RemoteObjectProperties',
1214 'x-vfio-user-server': 'VfioUserServerProperties'
1220 # Create a QOM object.
1223 # - Error if @qom-type is not a valid class name
1229 # -> { "execute": "object-add",
1230 # "arguments": { "qom-type": "rng-random", "id": "rng1",
1231 # "filename": "/dev/hwrng" } }
1232 # <- { "return": {} }
1234 { 'command': 'object-add', 'data': 'ObjectOptions', 'boxed': true,
1235 'allow-preconfig': true }
1240 # Remove a QOM object.
1242 # @id: the name of the QOM object to remove
1245 # - Error if @id is not a valid id for a QOM object
1251 # -> { "execute": "object-del", "arguments": { "id": "rng1" } }
1252 # <- { "return": {} }
1254 { 'command': 'object-del', 'data': {'id': 'str'},
1255 'allow-preconfig': true }