Markus Armbruster | c577ff6 | 2019-06-19 22:10:37 +0200 | [diff] [blame] | 1 | # -*- Mode: Python -*- |
Andrea Bolognani | f7160f3 | 2020-07-29 20:50:24 +0200 | [diff] [blame] | 2 | # vim: filetype=python |
Markus Armbruster | c577ff6 | 2019-06-19 22:10:37 +0200 | [diff] [blame] | 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 | |
Kevin Wolf | 8825587 | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 7 | { 'include': 'authz.json' } |
Kevin Wolf | 381bd74 | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 8 | { 'include': 'block-core.json' } |
Kevin Wolf | 913d906 | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 9 | { 'include': 'common.json' } |
Kevin Wolf | 39c4c27 | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 10 | { 'include': 'crypto.json' } |
Kevin Wolf | 8825587 | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 11 | |
Markus Armbruster | c577ff6 | 2019-06-19 22:10:37 +0200 | [diff] [blame] | 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 | # |
Marc-André Lureau | 1bb3d7d | 2020-01-10 19:30:38 +0400 | [diff] [blame] | 35 | # @default-value: the default value, if any (since 5.0) |
| 36 | # |
Markus Armbruster | c577ff6 | 2019-06-19 22:10:37 +0200 | [diff] [blame] | 37 | # Since: 1.2 |
| 38 | ## |
| 39 | { 'struct': 'ObjectPropertyInfo', |
Marc-André Lureau | 1bb3d7d | 2020-01-10 19:30:38 +0400 | [diff] [blame] | 40 | 'data': { 'name': 'str', |
| 41 | 'type': 'str', |
| 42 | '*description': 'str', |
| 43 | '*default-value': 'any' } } |
Markus Armbruster | c577ff6 | 2019-06-19 22:10:37 +0200 | [diff] [blame] | 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 |
Peter Maydell | 26ec4e5 | 2020-02-13 17:56:26 +0000 | [diff] [blame] | 198 | # links between different devices and/or objects. These properties |
| 199 | # are not included in the output of this command. |
Markus Armbruster | c577ff6 | 2019-06-19 22:10:37 +0200 | [diff] [blame] | 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 | ## |
Kevin Wolf | f3189b9 | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 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 | ## |
Kevin Wolf | 3d0d3c3 | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 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 |
Michael Tokarev | 09ceb33 | 2021-05-08 12:33:15 +0300 | [diff] [blame] | 254 | # queue is full and additional packets are received, the |
| 255 | # additional packets are dropped. (default: 1024) |
Kevin Wolf | 3d0d3c3 | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 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 | ## |
Kevin Wolf | a68d909 | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 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 | # Since: 2.8 |
| 282 | ## |
| 283 | { 'struct': 'CryptodevBackendProperties', |
| 284 | 'data': { '*queues': 'uint32' } } |
| 285 | |
| 286 | ## |
| 287 | # @CryptodevVhostUserProperties: |
| 288 | # |
| 289 | # Properties for cryptodev-vhost-user objects. |
| 290 | # |
| 291 | # @chardev: the name of a Unix domain socket character device that connects to |
| 292 | # the vhost-user server |
| 293 | # |
| 294 | # Since: 2.12 |
| 295 | ## |
| 296 | { 'struct': 'CryptodevVhostUserProperties', |
| 297 | 'base': 'CryptodevBackendProperties', |
| 298 | 'data': { 'chardev': 'str' } } |
| 299 | |
| 300 | ## |
Kevin Wolf | d7ef29c | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 301 | # @DBusVMStateProperties: |
| 302 | # |
| 303 | # Properties for dbus-vmstate objects. |
| 304 | # |
| 305 | # @addr: the name of the DBus bus to connect to |
| 306 | # |
| 307 | # @id-list: a comma separated list of DBus IDs of helpers whose data should be |
| 308 | # included in the VM state on migration |
| 309 | # |
| 310 | # Since: 5.0 |
| 311 | ## |
| 312 | { 'struct': 'DBusVMStateProperties', |
| 313 | 'data': { 'addr': 'str' , |
| 314 | '*id-list': 'str' } } |
| 315 | |
| 316 | ## |
Kevin Wolf | 1156a67 | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 317 | # @NetfilterInsert: |
| 318 | # |
| 319 | # Indicates where to insert a netfilter relative to a given other filter. |
| 320 | # |
| 321 | # @before: insert before the specified filter |
| 322 | # |
| 323 | # @behind: insert behind the specified filter |
| 324 | # |
| 325 | # Since: 5.0 |
| 326 | ## |
| 327 | { 'enum': 'NetfilterInsert', |
| 328 | 'data': [ 'before', 'behind' ] } |
| 329 | |
| 330 | ## |
| 331 | # @NetfilterProperties: |
| 332 | # |
| 333 | # Properties for objects of classes derived from netfilter. |
| 334 | # |
| 335 | # @netdev: id of the network device backend to filter |
| 336 | # |
| 337 | # @queue: indicates which queue(s) to filter (default: all) |
| 338 | # |
| 339 | # @status: indicates whether the filter is enabled ("on") or disabled ("off") |
| 340 | # (default: "on") |
| 341 | # |
| 342 | # @position: specifies where the filter should be inserted in the filter list. |
| 343 | # "head" means the filter is inserted at the head of the filter list, |
| 344 | # before any existing filters. |
| 345 | # "tail" means the filter is inserted at the tail of the filter list, |
| 346 | # behind any existing filters (default). |
| 347 | # "id=<id>" means the filter is inserted before or behind the filter |
| 348 | # specified by <id>, depending on the @insert property. |
| 349 | # (default: "tail") |
| 350 | # |
| 351 | # @insert: where to insert the filter relative to the filter given in @position. |
| 352 | # Ignored if @position is "head" or "tail". (default: behind) |
| 353 | # |
| 354 | # Since: 2.5 |
| 355 | ## |
| 356 | { 'struct': 'NetfilterProperties', |
| 357 | 'data': { 'netdev': 'str', |
| 358 | '*queue': 'NetFilterDirection', |
| 359 | '*status': 'str', |
| 360 | '*position': 'str', |
| 361 | '*insert': 'NetfilterInsert' } } |
| 362 | |
| 363 | ## |
| 364 | # @FilterBufferProperties: |
| 365 | # |
| 366 | # Properties for filter-buffer objects. |
| 367 | # |
| 368 | # @interval: a non-zero interval in microseconds. All packets arriving in the |
| 369 | # given interval are delayed until the end of the interval. |
| 370 | # |
| 371 | # Since: 2.5 |
| 372 | ## |
| 373 | { 'struct': 'FilterBufferProperties', |
| 374 | 'base': 'NetfilterProperties', |
| 375 | 'data': { 'interval': 'uint32' } } |
| 376 | |
| 377 | ## |
| 378 | # @FilterDumpProperties: |
| 379 | # |
| 380 | # Properties for filter-dump objects. |
| 381 | # |
| 382 | # @file: the filename where the dumped packets should be stored |
| 383 | # |
| 384 | # @maxlen: maximum number of bytes in a packet that are stored (default: 65536) |
| 385 | # |
| 386 | # Since: 2.5 |
| 387 | ## |
| 388 | { 'struct': 'FilterDumpProperties', |
| 389 | 'base': 'NetfilterProperties', |
| 390 | 'data': { 'file': 'str', |
| 391 | '*maxlen': 'uint32' } } |
| 392 | |
| 393 | ## |
| 394 | # @FilterMirrorProperties: |
| 395 | # |
| 396 | # Properties for filter-mirror objects. |
| 397 | # |
| 398 | # @outdev: the name of a character device backend to which all incoming packets |
| 399 | # are mirrored |
| 400 | # |
| 401 | # @vnet_hdr_support: if true, vnet header support is enabled (default: false) |
| 402 | # |
| 403 | # Since: 2.6 |
| 404 | ## |
| 405 | { 'struct': 'FilterMirrorProperties', |
| 406 | 'base': 'NetfilterProperties', |
| 407 | 'data': { 'outdev': 'str', |
| 408 | '*vnet_hdr_support': 'bool' } } |
| 409 | |
| 410 | ## |
| 411 | # @FilterRedirectorProperties: |
| 412 | # |
| 413 | # Properties for filter-redirector objects. |
| 414 | # |
| 415 | # At least one of @indev or @outdev must be present. If both are present, they |
| 416 | # must not refer to the same character device backend. |
| 417 | # |
| 418 | # @indev: the name of a character device backend from which packets are |
| 419 | # received and redirected to the filtered network device |
| 420 | # |
| 421 | # @outdev: the name of a character device backend to which all incoming packets |
| 422 | # are redirected |
| 423 | # |
| 424 | # @vnet_hdr_support: if true, vnet header support is enabled (default: false) |
| 425 | # |
| 426 | # Since: 2.6 |
| 427 | ## |
| 428 | { 'struct': 'FilterRedirectorProperties', |
| 429 | 'base': 'NetfilterProperties', |
| 430 | 'data': { '*indev': 'str', |
| 431 | '*outdev': 'str', |
| 432 | '*vnet_hdr_support': 'bool' } } |
| 433 | |
| 434 | ## |
| 435 | # @FilterRewriterProperties: |
| 436 | # |
| 437 | # Properties for filter-rewriter objects. |
| 438 | # |
| 439 | # @vnet_hdr_support: if true, vnet header support is enabled (default: false) |
| 440 | # |
| 441 | # Since: 2.8 |
| 442 | ## |
| 443 | { 'struct': 'FilterRewriterProperties', |
| 444 | 'base': 'NetfilterProperties', |
| 445 | 'data': { '*vnet_hdr_support': 'bool' } } |
| 446 | |
| 447 | ## |
Kevin Wolf | 30e863e | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 448 | # @InputBarrierProperties: |
| 449 | # |
| 450 | # Properties for input-barrier objects. |
| 451 | # |
| 452 | # @name: the screen name as declared in the screens section of barrier.conf |
| 453 | # |
| 454 | # @server: hostname of the Barrier server (default: "localhost") |
| 455 | # |
| 456 | # @port: TCP port of the Barrier server (default: "24800") |
| 457 | # |
| 458 | # @x-origin: x coordinate of the leftmost pixel on the guest screen |
| 459 | # (default: "0") |
| 460 | # |
| 461 | # @y-origin: y coordinate of the topmost pixel on the guest screen |
| 462 | # (default: "0") |
| 463 | # |
| 464 | # @width: the width of secondary screen in pixels (default: "1920") |
| 465 | # |
| 466 | # @height: the height of secondary screen in pixels (default: "1080") |
| 467 | # |
| 468 | # Since: 4.2 |
| 469 | ## |
| 470 | { 'struct': 'InputBarrierProperties', |
| 471 | 'data': { 'name': 'str', |
| 472 | '*server': 'str', |
| 473 | '*port': 'str', |
| 474 | '*x-origin': 'str', |
| 475 | '*y-origin': 'str', |
| 476 | '*width': 'str', |
| 477 | '*height': 'str' } } |
| 478 | |
| 479 | ## |
| 480 | # @InputLinuxProperties: |
| 481 | # |
| 482 | # Properties for input-linux objects. |
| 483 | # |
| 484 | # @evdev: the path of the host evdev device to use |
| 485 | # |
| 486 | # @grab_all: if true, grab is toggled for all devices (e.g. both keyboard and |
| 487 | # mouse) instead of just one device (default: false) |
| 488 | # |
| 489 | # @repeat: enables auto-repeat events (default: false) |
| 490 | # |
| 491 | # @grab-toggle: the key or key combination that toggles device grab |
| 492 | # (default: ctrl-ctrl) |
| 493 | # |
| 494 | # Since: 2.6 |
| 495 | ## |
| 496 | { 'struct': 'InputLinuxProperties', |
| 497 | 'data': { 'evdev': 'str', |
| 498 | '*grab_all': 'bool', |
| 499 | '*repeat': 'bool', |
| 500 | '*grab-toggle': 'GrabToggleKeys' } } |
| 501 | |
| 502 | ## |
Kevin Wolf | 2273b24 | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 503 | # @IothreadProperties: |
| 504 | # |
| 505 | # Properties for iothread objects. |
| 506 | # |
| 507 | # @poll-max-ns: the maximum number of nanoseconds to busy wait for events. |
| 508 | # 0 means polling is disabled (default: 32768 on POSIX hosts, |
| 509 | # 0 otherwise) |
| 510 | # |
| 511 | # @poll-grow: the multiplier used to increase the polling time when the |
| 512 | # algorithm detects it is missing events due to not polling long |
| 513 | # enough. 0 selects a default behaviour (default: 0) |
| 514 | # |
| 515 | # @poll-shrink: the divisor used to decrease the polling time when the |
| 516 | # algorithm detects it is spending too long polling without |
| 517 | # encountering events. 0 selects a default behaviour (default: 0) |
| 518 | # |
| 519 | # Since: 2.0 |
| 520 | ## |
| 521 | { 'struct': 'IothreadProperties', |
| 522 | 'data': { '*poll-max-ns': 'int', |
| 523 | '*poll-grow': 'int', |
| 524 | '*poll-shrink': 'int' } } |
| 525 | |
| 526 | ## |
Kevin Wolf | 913d906 | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 527 | # @MemoryBackendProperties: |
| 528 | # |
| 529 | # Properties for objects of classes derived from memory-backend. |
| 530 | # |
| 531 | # @merge: if true, mark the memory as mergeable (default depends on the machine |
| 532 | # type) |
| 533 | # |
| 534 | # @dump: if true, include the memory in core dumps (default depends on the |
| 535 | # machine type) |
| 536 | # |
| 537 | # @host-nodes: the list of NUMA host nodes to bind the memory to |
| 538 | # |
| 539 | # @policy: the NUMA policy (default: 'default') |
| 540 | # |
| 541 | # @prealloc: if true, preallocate memory (default: false) |
| 542 | # |
| 543 | # @prealloc-threads: number of CPU threads to use for prealloc (default: 1) |
| 544 | # |
| 545 | # @share: if false, the memory is private to QEMU; if true, it is shared |
| 546 | # (default: false) |
| 547 | # |
| 548 | # @size: size of the memory region in bytes |
| 549 | # |
| 550 | # @x-use-canonical-path-for-ramblock-id: if true, the canoncial path is used |
| 551 | # for ramblock-id. Disable this for 4.0 |
| 552 | # machine types or older to allow |
| 553 | # migration with newer QEMU versions. |
| 554 | # This option is considered stable |
| 555 | # despite the x- prefix. (default: |
| 556 | # false generally, but true for machine |
| 557 | # types <= 4.0) |
| 558 | # |
| 559 | # Since: 2.1 |
| 560 | ## |
| 561 | { 'struct': 'MemoryBackendProperties', |
| 562 | 'data': { '*dump': 'bool', |
| 563 | '*host-nodes': ['uint16'], |
| 564 | '*merge': 'bool', |
| 565 | '*policy': 'HostMemPolicy', |
| 566 | '*prealloc': 'bool', |
| 567 | '*prealloc-threads': 'uint32', |
| 568 | '*share': 'bool', |
| 569 | 'size': 'size', |
| 570 | '*x-use-canonical-path-for-ramblock-id': 'bool' } } |
| 571 | |
| 572 | ## |
| 573 | # @MemoryBackendFileProperties: |
| 574 | # |
| 575 | # Properties for memory-backend-file objects. |
| 576 | # |
| 577 | # @align: the base address alignment when QEMU mmap(2)s @mem-path. Some |
| 578 | # backend stores specified by @mem-path require an alignment different |
| 579 | # than the default one used by QEMU, e.g. the device DAX /dev/dax0.0 |
| 580 | # requires 2M alignment rather than 4K. In such cases, users can |
| 581 | # specify the required alignment via this option. |
| 582 | # 0 selects a default alignment (currently the page size). (default: 0) |
| 583 | # |
| 584 | # @discard-data: if true, the file contents can be destroyed when QEMU exits, |
| 585 | # to avoid unnecessarily flushing data to the backing file. Note |
| 586 | # that ``discard-data`` is only an optimization, and QEMU might |
| 587 | # not discard file contents if it aborts unexpectedly or is |
| 588 | # terminated using SIGKILL. (default: false) |
| 589 | # |
| 590 | # @mem-path: the path to either a shared memory or huge page filesystem mount |
| 591 | # |
| 592 | # @pmem: specifies whether the backing file specified by @mem-path is in |
| 593 | # host persistent memory that can be accessed using the SNIA NVM |
| 594 | # programming model (e.g. Intel NVDIMM). |
| 595 | # |
| 596 | # @readonly: if true, the backing file is opened read-only; if false, it is |
| 597 | # opened read-write. (default: false) |
| 598 | # |
| 599 | # Since: 2.1 |
| 600 | ## |
| 601 | { 'struct': 'MemoryBackendFileProperties', |
| 602 | 'base': 'MemoryBackendProperties', |
| 603 | 'data': { '*align': 'size', |
| 604 | '*discard-data': 'bool', |
| 605 | 'mem-path': 'str', |
| 606 | '*pmem': { 'type': 'bool', 'if': 'defined(CONFIG_LIBPMEM)' }, |
| 607 | '*readonly': 'bool' } } |
| 608 | |
| 609 | ## |
| 610 | # @MemoryBackendMemfdProperties: |
| 611 | # |
| 612 | # Properties for memory-backend-memfd objects. |
| 613 | # |
| 614 | # The @share boolean option is true by default with memfd. |
| 615 | # |
| 616 | # @hugetlb: if true, the file to be created resides in the hugetlbfs filesystem |
| 617 | # (default: false) |
| 618 | # |
| 619 | # @hugetlbsize: the hugetlb page size on systems that support multiple hugetlb |
| 620 | # page sizes (it must be a power of 2 value supported by the |
| 621 | # system). 0 selects a default page size. This option is ignored |
| 622 | # if @hugetlb is false. (default: 0) |
| 623 | # |
| 624 | # @seal: if true, create a sealed-file, which will block further resizing of |
| 625 | # the memory (default: true) |
| 626 | # |
| 627 | # Since: 2.12 |
| 628 | ## |
| 629 | { 'struct': 'MemoryBackendMemfdProperties', |
| 630 | 'base': 'MemoryBackendProperties', |
| 631 | 'data': { '*hugetlb': 'bool', |
| 632 | '*hugetlbsize': 'size', |
| 633 | '*seal': 'bool' } } |
| 634 | |
| 635 | ## |
Kevin Wolf | b9e479d | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 636 | # @PrManagerHelperProperties: |
| 637 | # |
| 638 | # Properties for pr-manager-helper objects. |
| 639 | # |
| 640 | # @path: the path to a Unix domain socket for connecting to the external helper |
| 641 | # |
| 642 | # Since: 2.11 |
| 643 | ## |
| 644 | { 'struct': 'PrManagerHelperProperties', |
| 645 | 'data': { 'path': 'str' } } |
| 646 | |
| 647 | ## |
Paolo Bonzini | 6ba7ada | 2020-11-09 10:13:30 -0500 | [diff] [blame] | 648 | # @QtestProperties: |
| 649 | # |
| 650 | # Properties for qtest objects. |
| 651 | # |
| 652 | # @chardev: the chardev to be used to receive qtest commands on. |
| 653 | # |
| 654 | # @log: the path to a log file |
| 655 | # |
| 656 | # Since: 6.0 |
| 657 | ## |
| 658 | { 'struct': 'QtestProperties', |
| 659 | 'data': { 'chardev': 'str', |
| 660 | '*log': 'str' } } |
| 661 | |
| 662 | ## |
Kevin Wolf | 17422da | 2021-02-24 13:21:48 +0100 | [diff] [blame] | 663 | # @RemoteObjectProperties: |
| 664 | # |
| 665 | # Properties for x-remote-object objects. |
| 666 | # |
| 667 | # @fd: file descriptor name previously passed via 'getfd' command |
| 668 | # |
| 669 | # @devid: the id of the device to be associated with the file descriptor |
| 670 | # |
| 671 | # Since: 6.0 |
| 672 | ## |
| 673 | { 'struct': 'RemoteObjectProperties', |
| 674 | 'data': { 'fd': 'str', 'devid': 'str' } } |
| 675 | |
| 676 | ## |
Kevin Wolf | 6815bc1d | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 677 | # @RngProperties: |
| 678 | # |
| 679 | # Properties for objects of classes derived from rng. |
| 680 | # |
| 681 | # @opened: if true, the device is opened immediately when applying this option |
| 682 | # and will probably fail when processing the next option. Don't use; |
| 683 | # only provided for compatibility. (default: false) |
| 684 | # |
| 685 | # Features: |
| 686 | # @deprecated: Member @opened is deprecated. Setting true doesn't make sense, |
| 687 | # and false is already the default. |
| 688 | # |
| 689 | # Since: 1.3 |
| 690 | ## |
| 691 | { 'struct': 'RngProperties', |
| 692 | 'data': { '*opened': { 'type': 'bool', 'features': ['deprecated'] } } } |
| 693 | |
| 694 | ## |
| 695 | # @RngEgdProperties: |
| 696 | # |
| 697 | # Properties for rng-egd objects. |
| 698 | # |
| 699 | # @chardev: the name of a character device backend that provides the connection |
| 700 | # to the RNG daemon |
| 701 | # |
| 702 | # Since: 1.3 |
| 703 | ## |
| 704 | { 'struct': 'RngEgdProperties', |
| 705 | 'base': 'RngProperties', |
| 706 | 'data': { 'chardev': 'str' } } |
| 707 | |
| 708 | ## |
| 709 | # @RngRandomProperties: |
| 710 | # |
| 711 | # Properties for rng-random objects. |
| 712 | # |
| 713 | # @filename: the filename of the device on the host to obtain entropy from |
| 714 | # (default: "/dev/urandom") |
| 715 | # |
| 716 | # Since: 1.3 |
| 717 | ## |
| 718 | { 'struct': 'RngRandomProperties', |
| 719 | 'base': 'RngProperties', |
| 720 | 'data': { '*filename': 'str' } } |
| 721 | |
| 722 | ## |
Kevin Wolf | 590466f | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 723 | # @SevGuestProperties: |
| 724 | # |
| 725 | # Properties for sev-guest objects. |
| 726 | # |
| 727 | # @sev-device: SEV device to use (default: "/dev/sev") |
| 728 | # |
| 729 | # @dh-cert-file: guest owners DH certificate (encoded with base64) |
| 730 | # |
| 731 | # @session-file: guest owners session parameters (encoded with base64) |
| 732 | # |
| 733 | # @policy: SEV policy value (default: 0x1) |
| 734 | # |
| 735 | # @handle: SEV firmware handle (default: 0) |
| 736 | # |
| 737 | # @cbitpos: C-bit location in page table entry (default: 0) |
| 738 | # |
| 739 | # @reduced-phys-bits: number of bits in physical addresses that become |
| 740 | # unavailable when SEV is enabled |
| 741 | # |
| 742 | # Since: 2.12 |
| 743 | ## |
| 744 | { 'struct': 'SevGuestProperties', |
| 745 | 'data': { '*sev-device': 'str', |
| 746 | '*dh-cert-file': 'str', |
| 747 | '*session-file': 'str', |
| 748 | '*policy': 'uint32', |
| 749 | '*handle': 'uint32', |
| 750 | '*cbitpos': 'uint32', |
Paolo Bonzini | a061a71 | 2021-03-26 04:48:39 -0400 | [diff] [blame] | 751 | 'reduced-phys-bits': 'uint32' } } |
Kevin Wolf | 590466f | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 752 | |
| 753 | ## |
Kevin Wolf | 2273b24 | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 754 | # @ObjectType: |
| 755 | # |
| 756 | # Since: 6.0 |
| 757 | ## |
| 758 | { 'enum': 'ObjectType', |
| 759 | 'data': [ |
Kevin Wolf | 8825587 | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 760 | 'authz-list', |
| 761 | 'authz-listfile', |
| 762 | 'authz-pam', |
| 763 | 'authz-simple', |
Kevin Wolf | f3189b9 | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 764 | 'can-bus', |
| 765 | 'can-host-socketcan', |
Kevin Wolf | 3d0d3c3 | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 766 | 'colo-compare', |
Kevin Wolf | a68d909 | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 767 | 'cryptodev-backend', |
| 768 | 'cryptodev-backend-builtin', |
| 769 | { 'name': 'cryptodev-vhost-user', |
Thomas Huth | 438c61e | 2021-04-12 18:07:09 +0200 | [diff] [blame] | 770 | 'if': 'defined(CONFIG_VHOST_CRYPTO)' }, |
Kevin Wolf | d7ef29c | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 771 | 'dbus-vmstate', |
Kevin Wolf | 1156a67 | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 772 | 'filter-buffer', |
| 773 | 'filter-dump', |
| 774 | 'filter-mirror', |
| 775 | 'filter-redirector', |
| 776 | 'filter-replay', |
| 777 | 'filter-rewriter', |
Kevin Wolf | 30e863e | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 778 | 'input-barrier', |
| 779 | 'input-linux', |
Kevin Wolf | 913d906 | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 780 | 'iothread', |
| 781 | 'memory-backend-file', |
| 782 | { 'name': 'memory-backend-memfd', |
| 783 | 'if': 'defined(CONFIG_LINUX)' }, |
Kevin Wolf | 6815bc1d | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 784 | 'memory-backend-ram', |
Paolo Bonzini | a061a71 | 2021-03-26 04:48:39 -0400 | [diff] [blame] | 785 | 'pef-guest', |
Kevin Wolf | b9e479d | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 786 | 'pr-manager-helper', |
Paolo Bonzini | 6ba7ada | 2020-11-09 10:13:30 -0500 | [diff] [blame] | 787 | 'qtest', |
Kevin Wolf | 6815bc1d | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 788 | 'rng-builtin', |
| 789 | 'rng-egd', |
Kevin Wolf | 381bd74 | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 790 | 'rng-random', |
Kevin Wolf | 39c4c27 | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 791 | 'secret', |
| 792 | 'secret_keyring', |
Paolo Bonzini | a061a71 | 2021-03-26 04:48:39 -0400 | [diff] [blame] | 793 | 'sev-guest', |
Kevin Wolf | 590466f | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 794 | 's390-pv-guest', |
Kevin Wolf | d09e493 | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 795 | 'throttle-group', |
| 796 | 'tls-creds-anon', |
| 797 | 'tls-creds-psk', |
| 798 | 'tls-creds-x509', |
Kevin Wolf | 17422da | 2021-02-24 13:21:48 +0100 | [diff] [blame] | 799 | 'tls-cipher-suites', |
| 800 | 'x-remote-object' |
Kevin Wolf | 2273b24 | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 801 | ] } |
| 802 | |
| 803 | ## |
| 804 | # @ObjectOptions: |
| 805 | # |
| 806 | # Describes the options of a user creatable QOM object. |
| 807 | # |
| 808 | # @qom-type: the class name for the object to be created |
| 809 | # |
| 810 | # @id: the name of the new object |
| 811 | # |
| 812 | # Since: 6.0 |
| 813 | ## |
| 814 | { 'union': 'ObjectOptions', |
| 815 | 'base': { 'qom-type': 'ObjectType', |
| 816 | 'id': 'str' }, |
| 817 | 'discriminator': 'qom-type', |
| 818 | 'data': { |
Kevin Wolf | 8825587 | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 819 | 'authz-list': 'AuthZListProperties', |
| 820 | 'authz-listfile': 'AuthZListFileProperties', |
| 821 | 'authz-pam': 'AuthZPAMProperties', |
| 822 | 'authz-simple': 'AuthZSimpleProperties', |
Kevin Wolf | f3189b9 | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 823 | 'can-host-socketcan': 'CanHostSocketcanProperties', |
Kevin Wolf | 3d0d3c3 | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 824 | 'colo-compare': 'ColoCompareProperties', |
Kevin Wolf | a68d909 | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 825 | 'cryptodev-backend': 'CryptodevBackendProperties', |
| 826 | 'cryptodev-backend-builtin': 'CryptodevBackendProperties', |
| 827 | 'cryptodev-vhost-user': { 'type': 'CryptodevVhostUserProperties', |
Thomas Huth | 438c61e | 2021-04-12 18:07:09 +0200 | [diff] [blame] | 828 | 'if': 'defined(CONFIG_VHOST_CRYPTO)' }, |
Kevin Wolf | d7ef29c | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 829 | 'dbus-vmstate': 'DBusVMStateProperties', |
Kevin Wolf | 1156a67 | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 830 | 'filter-buffer': 'FilterBufferProperties', |
| 831 | 'filter-dump': 'FilterDumpProperties', |
| 832 | 'filter-mirror': 'FilterMirrorProperties', |
| 833 | 'filter-redirector': 'FilterRedirectorProperties', |
| 834 | 'filter-replay': 'NetfilterProperties', |
| 835 | 'filter-rewriter': 'FilterRewriterProperties', |
Kevin Wolf | 30e863e | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 836 | 'input-barrier': 'InputBarrierProperties', |
| 837 | 'input-linux': 'InputLinuxProperties', |
Kevin Wolf | 913d906 | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 838 | 'iothread': 'IothreadProperties', |
| 839 | 'memory-backend-file': 'MemoryBackendFileProperties', |
| 840 | 'memory-backend-memfd': { 'type': 'MemoryBackendMemfdProperties', |
| 841 | 'if': 'defined(CONFIG_LINUX)' }, |
Kevin Wolf | 6815bc1d | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 842 | 'memory-backend-ram': 'MemoryBackendProperties', |
Kevin Wolf | b9e479d | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 843 | 'pr-manager-helper': 'PrManagerHelperProperties', |
Paolo Bonzini | 6ba7ada | 2020-11-09 10:13:30 -0500 | [diff] [blame] | 844 | 'qtest': 'QtestProperties', |
Kevin Wolf | 6815bc1d | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 845 | 'rng-builtin': 'RngProperties', |
| 846 | 'rng-egd': 'RngEgdProperties', |
Kevin Wolf | 381bd74 | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 847 | 'rng-random': 'RngRandomProperties', |
Kevin Wolf | 39c4c27 | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 848 | 'secret': 'SecretProperties', |
| 849 | 'secret_keyring': 'SecretKeyringProperties', |
Paolo Bonzini | a061a71 | 2021-03-26 04:48:39 -0400 | [diff] [blame] | 850 | 'sev-guest': 'SevGuestProperties', |
Kevin Wolf | d09e493 | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 851 | 'throttle-group': 'ThrottleGroupProperties', |
| 852 | 'tls-creds-anon': 'TlsCredsAnonProperties', |
| 853 | 'tls-creds-psk': 'TlsCredsPskProperties', |
| 854 | 'tls-creds-x509': 'TlsCredsX509Properties', |
Kevin Wolf | 17422da | 2021-02-24 13:21:48 +0100 | [diff] [blame] | 855 | 'tls-cipher-suites': 'TlsCredsProperties', |
| 856 | 'x-remote-object': 'RemoteObjectProperties' |
Kevin Wolf | 2273b24 | 2020-10-20 12:47:58 +0200 | [diff] [blame] | 857 | } } |
| 858 | |
| 859 | ## |
Markus Armbruster | c577ff6 | 2019-06-19 22:10:37 +0200 | [diff] [blame] | 860 | # @object-add: |
| 861 | # |
| 862 | # Create a QOM object. |
| 863 | # |
Markus Armbruster | c577ff6 | 2019-06-19 22:10:37 +0200 | [diff] [blame] | 864 | # Returns: Nothing on success |
| 865 | # Error if @qom-type is not a valid class name |
| 866 | # |
| 867 | # Since: 2.0 |
| 868 | # |
| 869 | # Example: |
| 870 | # |
| 871 | # -> { "execute": "object-add", |
| 872 | # "arguments": { "qom-type": "rng-random", "id": "rng1", |
Kevin Wolf | 5f07c4d | 2020-02-24 15:29:55 +0100 | [diff] [blame] | 873 | # "filename": "/dev/hwrng" } } |
Markus Armbruster | c577ff6 | 2019-06-19 22:10:37 +0200 | [diff] [blame] | 874 | # <- { "return": {} } |
| 875 | # |
| 876 | ## |
Paolo Bonzini | 9e33013 | 2020-11-03 04:39:02 -0500 | [diff] [blame] | 877 | { 'command': 'object-add', 'data': 'ObjectOptions', 'boxed': true, |
| 878 | 'allow-preconfig': true } |
Markus Armbruster | c577ff6 | 2019-06-19 22:10:37 +0200 | [diff] [blame] | 879 | |
| 880 | ## |
| 881 | # @object-del: |
| 882 | # |
| 883 | # Remove a QOM object. |
| 884 | # |
| 885 | # @id: the name of the QOM object to remove |
| 886 | # |
| 887 | # Returns: Nothing on success |
| 888 | # Error if @id is not a valid id for a QOM object |
| 889 | # |
| 890 | # Since: 2.0 |
| 891 | # |
| 892 | # Example: |
| 893 | # |
| 894 | # -> { "execute": "object-del", "arguments": { "id": "rng1" } } |
| 895 | # <- { "return": {} } |
| 896 | # |
| 897 | ## |
Paolo Bonzini | 9e33013 | 2020-11-03 04:39:02 -0500 | [diff] [blame] | 898 | { 'command': 'object-del', 'data': {'id': 'str'}, |
| 899 | 'allow-preconfig': true } |