qapi-schema.json 87 KB
Newer Older
1 2 3
# -*- Mode: Python -*-
#
# QAPI Schema
4

5 6
# QAPI common definitions
{ 'include': 'qapi/common.json' }
7

8 9 10
# QAPI block definitions
{ 'include': 'qapi/block.json' }

Wenchao Xia's avatar
Wenchao Xia committed
11 12 13
# QAPI event definitions
{ 'include': 'qapi/event.json' }

14 15 16
# Tracing commands
{ 'include': 'qapi/trace.json' }

17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
##
# LostTickPolicy:
#
# Policy for handling lost ticks in timer devices.
#
# @discard: throw away the missed tick(s) and continue with future injection
#           normally.  Guest time may be delayed, unless the OS has explicit
#           handling of lost ticks
#
# @delay: continue to deliver ticks at the normal rate.  Guest time will be
#         delayed due to the late tick
#
# @merge: merge the missed tick(s) into one tick and inject.  Guest time
#         may be delayed, depending on how the OS reacts to the merging
#         of ticks
#
# @slew: deliver ticks at a higher rate to catch up with the missed tick. The
#        guest time should not be delayed once catchup is complete.
#
# Since: 2.0
##
{ 'enum': 'LostTickPolicy',
  'data': ['discard', 'delay', 'merge', 'slew' ] }

41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
# @add_client
#
# Allow client connections for VNC, Spice and socket based
# character devices to be passed in to QEMU via SCM_RIGHTS.
#
# @protocol: protocol name. Valid names are "vnc", "spice" or the
#            name of a character device (eg. from -chardev id=XXXX)
#
# @fdname: file descriptor name previously passed via 'getfd' command
#
# @skipauth: #optional whether to skip authentication. Only applies
#            to "vnc" and "spice" protocols
#
# @tls: #optional whether to perform TLS. Only applies to the "spice"
#       protocol
#
# Returns: nothing on success.
#
# Since: 0.14.0
##
{ 'command': 'add_client',
  'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
            '*tls': 'bool' } }

65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
##
# @NameInfo:
#
# Guest name information.
#
# @name: #optional The name of the guest
#
# Since 0.14.0
##
{ 'type': 'NameInfo', 'data': {'*name': 'str'} }

##
# @query-name:
#
# Return the name information of a guest.
#
# Returns: @NameInfo of the guest
#
# Since 0.14.0
##
{ 'command': 'query-name', 'returns': 'NameInfo' }
86

87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110
##
# @KvmInfo:
#
# Information about support for KVM acceleration
#
# @enabled: true if KVM acceleration is active
#
# @present: true if KVM acceleration is built into this executable
#
# Since: 0.14.0
##
{ 'type': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }

##
# @query-kvm:
#
# Returns information about KVM acceleration
#
# Returns: @KvmInfo
#
# Since: 0.14.0
##
{ 'command': 'query-kvm', 'returns': 'KvmInfo' }

111 112 113
##
# @RunState
#
114
# An enumeration of VM run states.
115 116 117
#
# @debug: QEMU is running on a debugger
#
118 119
# @finish-migrate: guest is paused to finish the migration process
#
120 121 122 123 124
# @inmigrate: guest is paused waiting for an incoming migration.  Note
# that this state does not tell whether the machine will start at the
# end of the migration.  This depends on the command-line -S option and
# any invocation of 'stop' or 'cont' that has happened since QEMU was
# started.
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145
#
# @internal-error: An internal error that prevents further guest execution
# has occurred
#
# @io-error: the last IOP has failed and the device is configured to pause
# on I/O errors
#
# @paused: guest has been paused via the 'stop' command
#
# @postmigrate: guest is paused following a successful 'migrate'
#
# @prelaunch: QEMU was started with -S and guest has not started
#
# @restore-vm: guest is paused to restore VM state
#
# @running: guest is actively running
#
# @save-vm: guest is paused to save the VM state
#
# @shutdown: guest is shut down (and -no-shutdown is in use)
#
146 147
# @suspended: guest is suspended (ACPI S3)
#
148
# @watchdog: the watchdog action is configured to pause and has been triggered
149 150
#
# @guest-panicked: guest has been panicked as a result of guest OS panic
151 152 153 154
##
{ 'enum': 'RunState',
  'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
            'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
155 156
            'running', 'save-vm', 'shutdown', 'suspended', 'watchdog',
            'guest-panicked' ] }
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186

##
# @StatusInfo:
#
# Information about VCPU run state
#
# @running: true if all VCPUs are runnable, false if not runnable
#
# @singlestep: true if VCPUs are in single-step mode
#
# @status: the virtual machine @RunState
#
# Since:  0.14.0
#
# Notes: @singlestep is enabled through the GDB stub
##
{ 'type': 'StatusInfo',
  'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }

##
# @query-status:
#
# Query the run status of all VCPUs
#
# Returns: @StatusInfo reflecting all VCPUs
#
# Since:  0.14.0
##
{ 'command': 'query-status', 'returns': 'StatusInfo' }

187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210
##
# @UuidInfo:
#
# Guest UUID information.
#
# @UUID: the UUID of the guest
#
# Since: 0.14.0
#
# Notes: If no UUID was specified for the guest, a null UUID is returned.
##
{ 'type': 'UuidInfo', 'data': {'UUID': 'str'} }

##
# @query-uuid:
#
# Query the guest UUID information.
#
# Returns: The @UuidInfo for the guest
#
# Since 0.14.0
##
{ 'command': 'query-uuid', 'returns': 'UuidInfo' }

211 212 213 214 215 216 217 218 219
##
# @ChardevInfo:
#
# Information about a character device.
#
# @label: the label of the character device
#
# @filename: the filename of the character device
#
220 221 222 223
# @frontend-open: shows whether the frontend device attached to this backend
#                 (eg. with the chardev=... option) is in open or closed state
#                 (since 2.1)
#
224 225 226 227 228
# Notes: @filename is encoded using the QEMU command line character device
#        encoding.  See the QEMU man page for details.
#
# Since: 0.14.0
##
229 230 231
{ 'type': 'ChardevInfo', 'data': {'label': 'str',
                                  'filename': 'str',
                                  'frontend-open': 'bool'} }
232 233 234 235 236 237 238 239 240 241 242

##
# @query-chardev:
#
# Returns information about current character devices.
#
# Returns: a list of @ChardevInfo
#
# Since: 0.14.0
##
{ 'command': 'query-chardev', 'returns': ['ChardevInfo'] }
243

244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265
##
# @ChardevBackendInfo:
#
# Information about a character device backend
#
# @name: The backend name
#
# Since: 2.0
##
{ 'type': 'ChardevBackendInfo', 'data': {'name': 'str'} }

##
# @query-chardev-backends:
#
# Returns information about character device backends.
#
# Returns: a list of @ChardevBackendInfo
#
# Since: 2.0
##
{ 'command': 'query-chardev-backends', 'returns': ['ChardevBackendInfo'] }

266 267 268 269 270
##
# @DataFormat:
#
# An enumeration of data format.
#
271
# @utf8: Data is a UTF-8 string (RFC 3629)
272
#
273
# @base64: Data is Base64 encoded binary (RFC 3548)
274 275 276
#
# Since: 1.4
##
277
{ 'enum': 'DataFormat',
278 279 280
  'data': [ 'utf8', 'base64' ] }

##
281
# @ringbuf-write:
282
#
283
# Write to a ring buffer character device.
284
#
285
# @device: the ring buffer character device name
286
#
287
# @data: data to write
288
#
289 290 291 292 293 294 295 296
# @format: #optional data encoding (default 'utf8').
#          - base64: data must be base64 encoded text.  Its binary
#            decoding gets written.
#            Bug: invalid base64 is currently not rejected.
#            Whitespace *is* invalid.
#          - utf8: data's UTF-8 encoding is written
#          - data itself is always Unicode regardless of format, like
#            any other string.
297 298 299 300 301
#
# Returns: Nothing on success
#
# Since: 1.4
##
302
{ 'command': 'ringbuf-write',
303
  'data': {'device': 'str', 'data': 'str',
304 305
           '*format': 'DataFormat'} }

306
##
307
# @ringbuf-read:
308
#
309
# Read from a ring buffer character device.
310
#
311
# @device: the ring buffer character device name
312
#
313
# @size: how many bytes to read at most
314
#
315 316 317 318 319 320 321 322 323
# @format: #optional data encoding (default 'utf8').
#          - base64: the data read is returned in base64 encoding.
#          - utf8: the data read is interpreted as UTF-8.
#            Bug: can screw up when the buffer contains invalid UTF-8
#            sequences, NUL characters, after the ring buffer lost
#            data, and when reading stops because the size limit is
#            reached.
#          - The return value is always Unicode regardless of format,
#            like any other string.
324
#
325
# Returns: data read from the device
326 327 328
#
# Since: 1.4
##
329
{ 'command': 'ringbuf-read',
330
  'data': {'device': 'str', 'size': 'int', '*format': 'DataFormat'},
331
  'returns': 'str' }
332

333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354
##
# @EventInfo:
#
# Information about a QMP event
#
# @name: The event name
#
# Since: 1.2.0
##
{ 'type': 'EventInfo', 'data': {'name': 'str'} }

##
# @query-events:
#
# Return a list of supported QMP events by this server
#
# Returns: A list of @EventInfo for all supported events
#
# Since: 1.2.0
##
{ 'command': 'query-events', 'returns': ['EventInfo'] }

355 356 357 358 359 360 361 362 363 364 365
##
# @MigrationStats
#
# Detailed migration status.
#
# @transferred: amount of bytes already transferred to the target VM
#
# @remaining: amount of bytes remaining to be transferred to the target VM
#
# @total: total amount of bytes involved in the migration process
#
366 367 368
# @duplicate: number of duplicate (zero) pages (since 1.2)
#
# @skipped: number of skipped zero pages (since 1.5)
369 370 371
#
# @normal : number of normal pages (since 1.2)
#
372 373 374 375
# @normal-bytes: number of normal bytes sent (since 1.2)
#
# @dirty-pages-rate: number of pages dirtied by second by the
#        guest (since 1.3)
376
#
377 378
# @mbps: throughput in megabits/sec. (since 1.6)
#
379 380
# @dirty-sync-count: number of times that dirty ram was synchronized (since 2.1)
#
381
# Since: 0.14.0
382 383
##
{ 'type': 'MigrationStats',
384
  'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
385
           'duplicate': 'int', 'skipped': 'int', 'normal': 'int',
386
           'normal-bytes': 'int', 'dirty-pages-rate' : 'int',
387
           'mbps' : 'number', 'dirty-sync-count' : 'int' } }
388

Orit Wasserman's avatar
Orit Wasserman committed
389 390 391 392 393 394 395 396 397 398 399 400 401
##
# @XBZRLECacheStats
#
# Detailed XBZRLE migration cache statistics
#
# @cache-size: XBZRLE cache size
#
# @bytes: amount of bytes already transferred to the target VM
#
# @pages: amount of pages transferred to the target VM
#
# @cache-miss: number of cache miss
#
402 403
# @cache-miss-rate: rate of cache miss (since 2.1)
#
Orit Wasserman's avatar
Orit Wasserman committed
404 405 406 407 408 409
# @overflow: number of overflows
#
# Since: 1.2
##
{ 'type': 'XBZRLECacheStats',
  'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
410 411
           'cache-miss': 'int', 'cache-miss-rate': 'number',
           'overflow': 'int' } }
Orit Wasserman's avatar
Orit Wasserman committed
412

413 414 415 416 417 418
##
# @MigrationInfo
#
# Information about current migration process.
#
# @status: #optional string describing the current migration status.
419
#          As of 0.14.0 this can be 'setup', 'active', 'completed', 'failed' or
420 421 422
#          'cancelled'. If this field is not returned, no migration process
#          has been initiated
#
423 424 425
# @ram: #optional @MigrationStats containing detailed migration
#       status, only returned if status is 'active' or
#       'completed'. 'comppleted' (since 1.2)
426 427 428 429 430
#
# @disk: #optional @MigrationStats containing detailed disk migration
#        status, only returned if status is 'active' and it is a block
#        migration
#
Orit Wasserman's avatar
Orit Wasserman committed
431 432 433 434
# @xbzrle-cache: #optional @XBZRLECacheStats containing detailed XBZRLE
#                migration statistics, only returned if XBZRLE feature is on and
#                status is 'active' or 'completed' (since 1.2)
#
435 436 437 438
# @total-time: #optional total amount of milliseconds since migration started.
#        If migration has ended, it returns the total migration
#        time. (since 1.2)
#
439 440 441 442
# @downtime: #optional only present when migration finishes correctly
#        total downtime in milliseconds for the guest.
#        (since 1.3)
#
443 444 445 446
# @expected-downtime: #optional only present while migration is active
#        expected downtime in milliseconds for the guest in last walk
#        of the dirty bitmap. (since 1.3)
#
447 448 449 450 451 452
# @setup-time: #optional amount of setup time in milliseconds _before_ the
#        iterations begin but _after_ the QMP command is issued. This is designed
#        to provide an accounting of any activities (such as RDMA pinning) which
#        may be expensive, but do not actually occur during the iterative
#        migration rounds themselves. (since 1.6)
#
453 454 455 456
# Since: 0.14.0
##
{ 'type': 'MigrationInfo',
  'data': {'*status': 'str', '*ram': 'MigrationStats',
Orit Wasserman's avatar
Orit Wasserman committed
457
           '*disk': 'MigrationStats',
458
           '*xbzrle-cache': 'XBZRLECacheStats',
459
           '*total-time': 'int',
460
           '*expected-downtime': 'int',
461 462
           '*downtime': 'int',
           '*setup-time': 'int'} }
463 464 465 466 467 468 469 470 471 472 473 474

##
# @query-migrate
#
# Returns information about current migration process.
#
# Returns: @MigrationInfo
#
# Since: 0.14.0
##
{ 'command': 'query-migrate', 'returns': 'MigrationInfo' }

475 476 477 478 479 480 481 482 483
##
# @MigrationCapability
#
# Migration capabilities enumeration
#
# @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
#          This feature allows us to minimize migration traffic for certain work
#          loads, by sending compressed difference of the pages
#
484
# @rdma-pin-all: Controls whether or not the entire VM memory footprint is
485
#          mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage.
486
#          Disabled by default. (since 2.0)
487
#
488 489 490 491 492 493
# @zero-blocks: During storage migration encode blocks of zeroes efficiently. This
#          essentially saves 1MB of zeroes per block on the wire. Enabling requires
#          source and target VM to support this feature. To enable it is sufficient
#          to enable the capability on the source VM. The feature is disabled by
#          default. (since 1.6)
#
494 495 496
# @auto-converge: If enabled, QEMU will automatically throttle down the guest
#          to speed up convergence of RAM migration. (since 1.6)
#
497 498 499
# Since: 1.2
##
{ 'enum': 'MigrationCapability',
500
  'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks'] }
501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516

##
# @MigrationCapabilityStatus
#
# Migration capability information
#
# @capability: capability enum
#
# @state: capability state bool
#
# Since: 1.2
##
{ 'type': 'MigrationCapabilityStatus',
  'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }

##
517 518 519 520 521 522 523 524 525 526 527 528
# @migrate-set-capabilities
#
# Enable/Disable the following migration capabilities (like xbzrle)
#
# @capabilities: json array of capability modifications to make
#
# Since: 1.2
##
{ 'command': 'migrate-set-capabilities',
  'data': { 'capabilities': ['MigrationCapabilityStatus'] } }

##
529 530 531 532 533 534 535 536 537 538
# @query-migrate-capabilities
#
# Returns information about the current migration capabilities status
#
# Returns: @MigrationCapabilitiesStatus
#
# Since: 1.2
##
{ 'command': 'query-migrate-capabilities', 'returns':   ['MigrationCapabilityStatus']}

539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568
##
# @MouseInfo:
#
# Information about a mouse device.
#
# @name: the name of the mouse device
#
# @index: the index of the mouse device
#
# @current: true if this device is currently receiving mouse events
#
# @absolute: true if this device supports absolute coordinates as input
#
# Since: 0.14.0
##
{ 'type': 'MouseInfo',
  'data': {'name': 'str', 'index': 'int', 'current': 'bool',
           'absolute': 'bool'} }

##
# @query-mice:
#
# Returns information about each active mouse device
#
# Returns: a list of @MouseInfo for each device
#
# Since: 0.14.0
##
{ 'command': 'query-mice', 'returns': ['MouseInfo'] }

569 570 571 572 573 574 575 576
##
# @CpuInfo:
#
# Information about a virtual CPU
#
# @CPU: the index of the virtual CPU
#
# @current: this only exists for backwards compatible and should be ignored
577
#
578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614
# @halted: true if the virtual CPU is in the halt state.  Halt usually refers
#          to a processor specific low power mode.
#
# @pc: #optional If the target is i386 or x86_64, this is the 64-bit instruction
#                pointer.
#                If the target is Sparc, this is the PC component of the
#                instruction pointer.
#
# @nip: #optional If the target is PPC, the instruction pointer
#
# @npc: #optional If the target is Sparc, the NPC component of the instruction
#                 pointer
#
# @PC: #optional If the target is MIPS, the instruction pointer
#
# @thread_id: ID of the underlying host thread
#
# Since: 0.14.0
#
# Notes: @halted is a transient state that changes frequently.  By the time the
#        data is sent to the client, the guest may no longer be halted.
##
{ 'type': 'CpuInfo',
  'data': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', '*pc': 'int',
           '*nip': 'int', '*npc': 'int', '*PC': 'int', 'thread_id': 'int'} }

##
# @query-cpus:
#
# Returns a list of information about each virtual CPU.
#
# Returns: a list of @CpuInfo for each virtual CPU
#
# Since: 0.14.0
##
{ 'command': 'query-cpus', 'returns': ['CpuInfo'] }

615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643
##
# @IOThreadInfo:
#
# Information about an iothread
#
# @id: the identifier of the iothread
#
# @thread-id: ID of the underlying host thread
#
# Since: 2.0
##
{ 'type': 'IOThreadInfo',
  'data': {'id': 'str', 'thread-id': 'int'} }

##
# @query-iothreads:
#
# Returns a list of information about each iothread.
#
# Note this list excludes the QEMU main loop thread, which is not declared
# using the -object iothread command-line option.  It is always the main thread
# of the process.
#
# Returns: a list of @IOThreadInfo for each iothread
#
# Since: 2.0
##
{ 'command': 'query-iothreads', 'returns': ['IOThreadInfo'] }

644
##
645
# @NetworkAddressFamily
646
#
647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663
# The network address family
#
# @ipv4: IPV4 family
#
# @ipv6: IPV6 family
#
# @unix: unix socket
#
# @unknown: otherwise
#
# Since: 2.1
##
{ 'enum': 'NetworkAddressFamily',
  'data': [ 'ipv4', 'ipv6', 'unix', 'unknown' ] }

##
# @VncBasicInfo
664
#
665
# The basic information for vnc network connection
666
#
667
# @host: IP address
668
#
669 670 671
# @service: The service name of the vnc port. This may depend on the host
#           system's service database so symbolic names should not be relied
#           on.
672 673 674 675 676 677 678 679 680 681 682 683
#
# @family: address family
#
# Since: 2.1
##
{ 'type': 'VncBasicInfo',
  'data': { 'host': 'str',
            'service': 'str',
            'family': 'NetworkAddressFamily' } }

##
# @VncServerInfo
684
#
685
# The network connection information for server
686
#
687
# @auth: #optional, authentication method
688
#
689 690 691 692 693 694 695 696 697 698
# Since: 2.1
##
{ 'type': 'VncServerInfo',
  'base': 'VncBasicInfo',
  'data': { '*auth': 'str' } }

##
# @VncClientInfo:
#
# Information about a connected VNC client.
699 700 701 702 703 704 705 706 707 708
#
# @x509_dname: #optional If x509 authentication is in use, the Distinguished
#              Name of the client.
#
# @sasl_username: #optional If SASL authentication is in use, the SASL username
#                 used for authentication.
#
# Since: 0.14.0
##
{ 'type': 'VncClientInfo',
709
  'base': 'VncBasicInfo',
710
  'data': { '*x509_dname': 'str', '*sasl_username': 'str' } }
711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748

##
# @VncInfo:
#
# Information about the VNC session.
#
# @enabled: true if the VNC server is enabled, false otherwise
#
# @host: #optional The hostname the VNC server is bound to.  This depends on
#        the name resolution on the host and may be an IP address.
#
# @family: #optional 'ipv6' if the host is listening for IPv6 connections
#                    'ipv4' if the host is listening for IPv4 connections
#                    'unix' if the host is listening on a unix domain socket
#                    'unknown' otherwise
#
# @service: #optional The service name of the server's port.  This may depends
#           on the host system's service database so symbolic names should not
#           be relied on.
#
# @auth: #optional the current authentication type used by the server
#        'none' if no authentication is being used
#        'vnc' if VNC authentication is being used
#        'vencrypt+plain' if VEncrypt is used with plain text authentication
#        'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
#        'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
#        'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
#        'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
#        'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
#        'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
#        'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
#        'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
#
# @clients: a list of @VncClientInfo of all currently connected clients
#
# Since: 0.14.0
##
{ 'type': 'VncInfo',
749 750
  'data': {'enabled': 'bool', '*host': 'str',
           '*family': 'NetworkAddressFamily',
751 752 753 754 755 756 757 758 759 760 761 762 763
           '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }

##
# @query-vnc:
#
# Returns information about the current VNC server
#
# Returns: @VncInfo
#
# Since: 0.14.0
##
{ 'command': 'query-vnc', 'returns': 'VncInfo' }

764
##
765
# @SpiceBasicInfo
766
#
767 768 769
# The basic information for SPICE network connection
#
# @host: IP address
770
#
771
# @port: port number
772
#
773
# @family: address family
774
#
775 776 777 778 779 780 781 782 783
# Since: 2.1
##
{ 'type': 'SpiceBasicInfo',
  'data': { 'host': 'str',
            'port': 'str',
            'family': 'NetworkAddressFamily' } }

##
# @SpiceServerInfo
784
#
785
# Information about a SPICE server
786
#
787
# @auth: #optional, authentication method
788
#
789 790 791 792 793 794 795 796 797 798
# Since: 2.1
##
{ 'type': 'SpiceServerInfo',
  'base': 'SpiceBasicInfo',
  'data': { '*auth': 'str' } }

##
# @SpiceChannel
#
# Information about a SPICE client channel.
799 800 801 802
#
# @connection-id: SPICE connection id number.  All channels with the same id
#                 belong to the same SPICE session.
#
803 804 805
# @connection-type: SPICE channel type number.  "1" is the main control
#                   channel, filter for this one if you want to track spice
#                   sessions only
806
#
807 808
# @channel-id: SPICE channel ID number.  Usually "0", might be different when
#              multiple channels of the same type exist, such as multiple
809 810 811 812 813 814 815
#              display channels in a multihead setup
#
# @tls: true if the channel is encrypted, false otherwise.
#
# Since: 0.14.0
##
{ 'type': 'SpiceChannel',
816 817
  'base': 'SpiceBasicInfo',
  'data': {'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
818 819
           'tls': 'bool'} }

Alon Levy's avatar
Alon Levy committed
820 821 822
##
# @SpiceQueryMouseMode
#
823
# An enumeration of Spice mouse states.
Alon Levy's avatar
Alon Levy committed
824 825 826 827 828 829 830 831 832 833 834 835 836 837 838
#
# @client: Mouse cursor position is determined by the client.
#
# @server: Mouse cursor position is determined by the server.
#
# @unknown: No information is available about mouse mode used by
#           the spice server.
#
# Note: spice/enums.h has a SpiceMouseMode already, hence the name.
#
# Since: 1.1
##
{ 'enum': 'SpiceQueryMouseMode',
  'data': [ 'client', 'server', 'unknown' ] }

839 840 841 842
##
# @SpiceInfo
#
# Information about the SPICE session.
843
#
844 845
# @enabled: true if the SPICE server is enabled, false otherwise
#
846 847 848
# @migrated: true if the last guest migration completed and spice
#            migration had completed as well. false otherwise.
#
849 850 851 852 853 854 855 856 857 858
# @host: #optional The hostname the SPICE server is bound to.  This depends on
#        the name resolution on the host and may be an IP address.
#
# @port: #optional The SPICE server's port number.
#
# @compiled-version: #optional SPICE server version.
#
# @tls-port: #optional The SPICE server's TLS port number.
#
# @auth: #optional the current authentication type used by the server
859 860 861
#        'none'  if no authentication is being used
#        'spice' uses SASL or direct TLS authentication, depending on command
#                line options
862
#
Alon Levy's avatar
Alon Levy committed
863 864 865 866 867 868
# @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
#              be determined by the client or the server, or unknown if spice
#              server doesn't provide this information.
#
#              Since: 1.1
#
869 870 871 872 873
# @channels: a list of @SpiceChannel for each active spice channel
#
# Since: 0.14.0
##
{ 'type': 'SpiceInfo',
874
  'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
875
           '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
Alon Levy's avatar
Alon Levy committed
876
           'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
877 878 879 880 881 882 883 884 885 886 887 888

##
# @query-spice
#
# Returns information about the current SPICE server
#
# Returns: @SpiceInfo
#
# Since: 0.14.0
##
{ 'command': 'query-spice', 'returns': 'SpiceInfo' }

889 890 891 892 893 894 895 896 897 898
##
# @BalloonInfo:
#
# Information about the guest balloon device.
#
# @actual: the number of bytes the balloon currently contains
#
# Since: 0.14.0
#
##
899
{ 'type': 'BalloonInfo', 'data': {'actual': 'int' } }
900 901 902 903 904 905 906 907 908 909 910 911 912 913 914

##
# @query-balloon:
#
# Return information about the balloon device.
#
# Returns: @BalloonInfo on success
#          If the balloon driver is enabled but not functional because the KVM
#          kernel module cannot support it, KvmMissingCap
#          If no balloon device is present, DeviceNotActive
#
# Since: 0.14.0
##
{ 'command': 'query-balloon', 'returns': 'BalloonInfo' }

915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042
##
# @PciMemoryRange:
#
# A PCI device memory region
#
# @base: the starting address (guest physical)
#
# @limit: the ending address (guest physical)
#
# Since: 0.14.0
##
{ 'type': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }

##
# @PciMemoryRegion
#
# Information about a PCI device I/O region.
#
# @bar: the index of the Base Address Register for this region
#
# @type: 'io' if the region is a PIO region
#        'memory' if the region is a MMIO region
#
# @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
#
# @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
#
# Since: 0.14.0
##
{ 'type': 'PciMemoryRegion',
  'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
           '*prefetch': 'bool', '*mem_type_64': 'bool' } }

##
# @PciBridgeInfo:
#
# Information about a PCI Bridge device
#
# @bus.number: primary bus interface number.  This should be the number of the
#              bus the device resides on.
#
# @bus.secondary: secondary bus interface number.  This is the number of the
#                 main bus for the bridge
#
# @bus.subordinate: This is the highest number bus that resides below the
#                   bridge.
#
# @bus.io_range: The PIO range for all devices on this bridge
#
# @bus.memory_range: The MMIO range for all devices on this bridge
#
# @bus.prefetchable_range: The range of prefetchable MMIO for all devices on
#                          this bridge
#
# @devices: a list of @PciDeviceInfo for each device on this bridge
#
# Since: 0.14.0
##
{ 'type': 'PciBridgeInfo',
  'data': {'bus': { 'number': 'int', 'secondary': 'int', 'subordinate': 'int',
                    'io_range': 'PciMemoryRange',
                    'memory_range': 'PciMemoryRange',
                    'prefetchable_range': 'PciMemoryRange' },
           '*devices': ['PciDeviceInfo']} }

##
# @PciDeviceInfo:
#
# Information about a PCI device
#
# @bus: the bus number of the device
#
# @slot: the slot the device is located in
#
# @function: the function of the slot used by the device
#
# @class_info.desc: #optional a string description of the device's class
#
# @class_info.class: the class code of the device
#
# @id.device: the PCI device id
#
# @id.vendor: the PCI vendor id
#
# @irq: #optional if an IRQ is assigned to the device, the IRQ number
#
# @qdev_id: the device name of the PCI device
#
# @pci_bridge: if the device is a PCI bridge, the bridge information
#
# @regions: a list of the PCI I/O regions associated with the device
#
# Notes: the contents of @class_info.desc are not stable and should only be
#        treated as informational.
#
# Since: 0.14.0
##
{ 'type': 'PciDeviceInfo',
  'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
           'class_info': {'*desc': 'str', 'class': 'int'},
           'id': {'device': 'int', 'vendor': 'int'},
           '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
           'regions': ['PciMemoryRegion']} }

##
# @PciInfo:
#
# Information about a PCI bus
#
# @bus: the bus index
#
# @devices: a list of devices on this bus
#
# Since: 0.14.0
##
{ 'type': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }

##
# @query-pci:
#
# Return information about the PCI bus topology of the guest.
#
# Returns: a list of @PciInfo for each PCI bus
#
# Since: 0.14.0
##
{ 'command': 'query-pci', 'returns': ['PciInfo'] }

Luiz Capitulino's avatar
Luiz Capitulino committed
1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053
##
# @quit:
#
# This command will cause the QEMU process to exit gracefully.  While every
# attempt is made to send the QMP response before terminating, this is not
# guaranteed.  When using this interface, a premature EOF would not be
# unexpected.
#
# Since: 0.14.0
##
{ 'command': 'quit' }
Luiz Capitulino's avatar
Luiz Capitulino committed
1054 1055 1056 1057 1058 1059 1060 1061 1062

##
# @stop:
#
# Stop all guest VCPU execution.
#
# Since:  0.14.0
#
# Notes:  This function will succeed even if the guest is already in the stopped
1063 1064 1065
#         state.  In "inmigrate" state, it will ensure that the guest
#         remains paused once migration finishes, as if the -S option was
#         passed on the command line.
Luiz Capitulino's avatar
Luiz Capitulino committed
1066 1067
##
{ 'command': 'stop' }
1068 1069 1070 1071 1072 1073 1074 1075 1076

##
# @system_reset:
#
# Performs a hard reset of a guest.
#
# Since: 0.14.0
##
{ 'command': 'system_reset' }
1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090

##
# @system_powerdown:
#
# Requests that a guest perform a powerdown operation.
#
# Since: 0.14.0
#
# Notes: A guest may or may not respond to this command.  This command
#        returning does not indicate that a guest has accepted the request or
#        that it has shut down.  Many guests will respond to this command by
#        prompting the user in some way.
##
{ 'command': 'system_powerdown' }
1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101

##
# @cpu:
#
# This command is a nop that is only provided for the purposes of compatibility.
#
# Since: 0.14.0
#
# Notes: Do not use this command.
##
{ 'command': 'cpu', 'data': {'index': 'int'} }
Luiz Capitulino's avatar
Luiz Capitulino committed
1102

Igor Mammedov's avatar
Igor Mammedov committed
1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115
##
# @cpu-add
#
# Adds CPU with specified ID
#
# @id: ID of CPU to be created, valid values [0..max_cpus)
#
# Returns: Nothing on success
#
# Since 1.5
##
{ 'command': 'cpu-add', 'data': {'id': 'int'} }

Luiz Capitulino's avatar
Luiz Capitulino committed
1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137
##
# @memsave:
#
# Save a portion of guest memory to a file.
#
# @val: the virtual address of the guest to start from
#
# @size: the size of memory region to save
#
# @filename: the file to save the memory to as binary data
#
# @cpu-index: #optional the index of the virtual CPU to use for translating the
#                       virtual address (defaults to CPU 0)
#
# Returns: Nothing on success
#
# Since: 0.14.0
#
# Notes: Errors were not reliably returned until 1.1
##
{ 'command': 'memsave',
  'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
Luiz Capitulino's avatar
Luiz Capitulino committed
1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157

##
# @pmemsave:
#
# Save a portion of guest physical memory to a file.
#
# @val: the physical address of the guest to start from
#
# @size: the size of memory region to save
#
# @filename: the file to save the memory to as binary data
#
# Returns: Nothing on success
#
# Since: 0.14.0
#
# Notes: Errors were not reliably returned until 1.1
##
{ 'command': 'pmemsave',
  'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
Luiz Capitulino's avatar
Luiz Capitulino committed
1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169

##
# @cont:
#
# Resume guest VCPU execution.
#
# Since:  0.14.0
#
# Returns:  If successful, nothing
#           If QEMU was started with an encrypted block device and a key has
#              not yet been set, DeviceEncrypted.
#
1170 1171 1172 1173 1174
# Notes:  This command will succeed if the guest is currently running.  It
#         will also succeed if the guest is in the "inmigrate" state; in
#         this case, the effect of the command is to make sure the guest
#         starts once migration finishes, removing the effect of the -S
#         command line option if it was passed.
Luiz Capitulino's avatar
Luiz Capitulino committed
1175 1176 1177
##
{ 'command': 'cont' }

1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188
##
# @system_wakeup:
#
# Wakeup guest from suspend.  Does nothing in case the guest isn't suspended.
#
# Since:  1.1
#
# Returns:  nothing.
##
{ 'command': 'system_wakeup' }

1189 1190 1191
##
# @inject-nmi:
#
1192
# Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or all CPUs (ppc64).
1193 1194 1195 1196 1197
#
# Returns:  If successful, nothing
#
# Since:  0.14.0
#
1198
# Note: prior to 2.1, this command was only supported for x86 and s390 VMs
1199 1200
##
{ 'command': 'inject-nmi' }
Luiz Capitulino's avatar
Luiz Capitulino committed
1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220

##
# @set_link:
#
# Sets the link status of a virtual network adapter.
#
# @name: the device name of the virtual network adapter
#
# @up: true to set the link status to be up
#
# Returns: Nothing on success
#          If @name is not a valid network device, DeviceNotFound
#
# Since: 0.14.0
#
# Notes: Not all network adapters support setting link status.  This command
#        will succeed even if the network adapter does not support link status
#        notification.
##
{ 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
1221

Luiz Capitulino's avatar
Luiz Capitulino committed
1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240
##
# @balloon:
#
# Request the balloon driver to change its balloon size.
#
# @value: the target size of the balloon in bytes
#
# Returns: Nothing on success
#          If the balloon driver is enabled but not functional because the KVM
#            kernel module cannot support it, KvmMissingCap
#          If no balloon device is present, DeviceNotActive
#
# Notes: This command just issues a request to the guest.  When it returns,
#        the balloon size may not have changed.  A guest can change the balloon
#        size independent of this command.
#
# Since: 0.14.0
##
{ 'command': 'balloon', 'data': {'value': 'int'} }
1241

1242 1243 1244 1245 1246 1247 1248 1249 1250 1251
##
# @Abort
#
# This action can be used to test transaction failure.
#
# Since: 1.6
###
{ 'type': 'Abort',
  'data': { } }

1252
##
1253
# @TransactionAction
1254
#
1255 1256
# A discriminated record of operations that can be performed with
# @transaction.
1257
##
1258
{ 'union': 'TransactionAction',
1259
  'data': {
1260
       'blockdev-snapshot-sync': 'BlockdevSnapshot',
1261
       'drive-backup': 'DriveBackup',
1262 1263
       'abort': 'Abort',
       'blockdev-snapshot-internal-sync': 'BlockdevSnapshotInternal'
1264
   } }
1265 1266

##
1267
# @transaction
1268
#
1269 1270 1271
# Executes a number of transactionable QMP commands atomically. If any
# operation fails, then the entire set of actions will be abandoned and the
# appropriate error returned.
1272 1273
#
#  List of:
1274
#  @TransactionAction: information needed for the respective operation
1275 1276
#
# Returns: nothing on success
1277
#          Errors depend on the operations of the transaction
1278
#
1279 1280
# Note: The transaction aborts on the first failure.  Therefore, there will be
# information on only one failed operation returned in an error condition, and
1281 1282 1283
# subsequent actions will not have been attempted.
#
# Since 1.1
1284
##
1285
{ 'command': 'transaction',
1286
  'data': { 'actions': [ 'TransactionAction' ] } }
1287

1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298
##
# @human-monitor-command:
#
# Execute a command on the human monitor and return the output.
#
# @command-line: the command to execute in the human monitor
#
# @cpu-index: #optional The CPU to use for commands that require an implicit CPU
#
# Returns: the output of the command as a string
#
1299
# Since: 0.14.0
1300
#
1301 1302
# Notes: This command only exists as a stop-gap.  Its use is highly
#        discouraged.  The semantics of this command are not guaranteed.
1303
#
1304
#        Known limitations:
1305
#
1306 1307
#        o This command is stateless, this means that commands that depend
#          on state information (such as getfd) might not work
1308
#
1309 1310
#       o Commands that prompt the user for data (eg. 'cont' when the block
#         device is encrypted) don't currently work
1311
##
1312 1313 1314
{ 'command': 'human-monitor-command',
  'data': {'command-line': 'str', '*cpu-index': 'int'},
  'returns': 'str' }
1315 1316

##
1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327
# @migrate_cancel
#
# Cancel the current executing migration process.
#
# Returns: nothing on success
#
# Notes: This command succeeds even if there is no migration process running.
#
# Since: 0.14.0
##
{ 'command': 'migrate_cancel' }
1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340

##
# @migrate_set_downtime
#
# Set maximum tolerated downtime for migration.
#
# @value: maximum downtime in seconds
#
# Returns: nothing on success
#
# Since: 0.14.0
##
{ 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355

##
# @migrate_set_speed
#
# Set maximum speed for migration.
#
# @value: maximum speed in bytes.
#
# Returns: nothing on success
#
# Notes: A value lesser than zero will be automatically round up to zero.
#
# Since: 0.14.0
##
{ 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
1356

1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383
##
# @migrate-set-cache-size
#
# Set XBZRLE cache size
#
# @value: cache size in bytes
#
# The size will be rounded down to the nearest power of 2.
# The cache size can be modified before and during ongoing migration
#
# Returns: nothing on success
#
# Since: 1.2
##
{ 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }

##
# @query-migrate-cache-size
#
# query XBZRLE cache size
#
# Returns: XBZRLE cache size in bytes
#
# Since: 1.2
##
{ 'command': 'query-migrate-cache-size', 'returns': 'int' }

1384
##
1385
# @ObjectPropertyInfo:
1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403
#
# @name: the name of the property
#
# @type: the type of the property.  This will typically come in one of four
#        forms:
#
#        1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
#           These types are mapped to the appropriate JSON type.
#
#        2) A legacy type in the form 'legacy<subtype>' where subtype is the
#           legacy qdev typename.  These types are always treated as strings.
#
#        3) A child type in the form 'child<subtype>' where subtype is a qdev
#           device type name.  Child properties create the composition tree.
#
#        4) A link type in the form 'link<subtype>' where subtype is a qdev
#           device type name.  Link properties form the device model graph.
#
1404
# Since: 1.2
1405
##
1406
{ 'type': 'ObjectPropertyInfo',
1407 1408 1409 1410 1411
  'data': { 'name': 'str', 'type': 'str' } }

##
# @qom-list:
#
1412
# This command will list any properties of a object given a path in the object
1413 1414
# model.
#
1415
# @path: the path within the object model.  See @qom-get for a description of
1416 1417
#        this parameter.
#
1418 1419
# Returns: a list of @ObjectPropertyInfo that describe the properties of the
#          object.
1420
#
1421
# Since: 1.2
1422 1423 1424
##
{ 'command': 'qom-list',
  'data': { 'path': 'str' },
1425
  'returns': [ 'ObjectPropertyInfo' ] }
1426 1427 1428 1429

##
# @qom-get:
#
1430
# This command will get a property from a object model path and return the
1431 1432
# value.
#
1433
# @path: The path within the object model.  There are two forms of supported
1434 1435
#        paths--absolute and partial paths.
#
1436
#        Absolute paths are derived from the root object and can follow child<>
1437 1438 1439 1440 1441 1442
#        or link<> properties.  Since they can follow link<> properties, they
#        can be arbitrarily long.  Absolute paths look like absolute filenames
#        and are prefixed  with a leading slash.
#
#        Partial paths look like relative filenames.  They do not begin
#        with a prefix.  The matching rules for partial paths are subtle but
1443
#        designed to make specifying objects easy.  At each level of the
1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456
#        composition tree, the partial path is matched as an absolute path.
#        The first match is not returned.  At least two matches are searched
#        for.  A successful result is only returned if only one match is
#        found.  If more than one match is found, a flag is return to
#        indicate that the match was ambiguous.
#
# @property: The property name to read
#
# Returns: The property value.  The type depends on the property type.  legacy<>
#          properties are returned as #str.  child<> and link<> properties are
#          returns as #str pathnames.  All integer property types (u8, u16, etc)
#          are returned as #int.
#
1457
# Since: 1.2
1458 1459 1460 1461 1462 1463 1464 1465 1466
##
{ 'command': 'qom-get',
  'data': { 'path': 'str', 'property': 'str' },
  'returns': 'visitor',
  'gen': 'no' }

##
# @qom-set:
#
1467
# This command will set a property from a object model path.
1468 1469 1470 1471 1472 1473 1474 1475
#
# @path: see @qom-get for a description of this parameter
#
# @property: the property name to set
#
# @value: a value who's type is appropriate for the property type.  See @qom-get
#         for a description of type mapping.
#
1476
# Since: 1.2
1477 1478 1479 1480
##
{ 'command': 'qom-set',
  'data': { 'path': 'str', 'property': 'str', 'value': 'visitor' },
  'gen': 'no' }
1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492

##
# @set_password:
#
# Sets the password of a remote display session.
#
# @protocol: `vnc' to modify the VNC server password
#            `spice' to modify the Spice server password
#
# @password: the new password
#
# @connected: #optional how to handle existing clients when changing the
1493
#                       password.  If nothing is specified, defaults to `keep'
1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504
#                       `fail' to fail the command if clients are connected
#                       `disconnect' to disconnect existing clients
#                       `keep' to maintain existing clients
#
# Returns: Nothing on success
#          If Spice is not enabled, DeviceNotFound
#
# Since: 0.14.0
##
{ 'command': 'set_password',
  'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529

##
# @expire_password:
#
# Expire the password of a remote display server.
#
# @protocol: the name of the remote display protocol `vnc' or `spice'
#
# @time: when to expire the password.
#        `now' to expire the password immediately
#        `never' to cancel password expiration
#        `+INT' where INT is the number of seconds from now (integer)
#        `INT' where INT is the absolute time in seconds
#
# Returns: Nothing on success
#          If @protocol is `spice' and Spice is not active, DeviceNotFound
#
# Since: 0.14.0
#
# Notes: Time is relative to the server and currently there is no way to
#        coordinate server time with client time.  It is not recommended to
#        use the absolute time version of the @time parameter unless you're
#        sure you are on the same machine as the QEMU instance.
##
{ 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
Luiz Capitulino's avatar
Luiz Capitulino committed
1530

1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543
##
# @change-vnc-password:
#
# Change the VNC server password.
#
# @target:  the new password to use with VNC authentication
#
# Since: 1.1
#
# Notes:  An empty password in this command will set the password to the empty
#         string.  Existing clients are unaffected by executing this command.
##
{ 'command': 'change-vnc-password', 'data': {'password': 'str'} }
Luiz Capitulino's avatar
Luiz Capitulino committed
1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578

##
# @change:
#
# This command is multiple commands multiplexed together.
#
# @device: This is normally the name of a block device but it may also be 'vnc'.
#          when it's 'vnc', then sub command depends on @target
#
# @target: If @device is a block device, then this is the new filename.
#          If @device is 'vnc', then if the value 'password' selects the vnc
#          change password command.   Otherwise, this specifies a new server URI
#          address to listen to for VNC connections.
#
# @arg:    If @device is a block device, then this is an optional format to open
#          the device with.
#          If @device is 'vnc' and @target is 'password', this is the new VNC
#          password to set.  If this argument is an empty string, then no future
#          logins will be allowed.
#
# Returns: Nothing on success.
#          If @device is not a valid block device, DeviceNotFound
#          If the new block device is encrypted, DeviceEncrypted.  Note that
#          if this error is returned, the device has been opened successfully
#          and an additional call to @block_passwd is required to set the
#          device's password.  The behavior of reads and writes to the block
#          device between when these calls are executed is undefined.
#
# Notes:  It is strongly recommended that this interface is not used especially
#         for changing block devices.
#
# Since: 0.14.0
##
{ 'command': 'change',
  'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
1579

1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609
##
# @ObjectTypeInfo:
#
# This structure describes a search result from @qom-list-types
#
# @name: the type name found in the search
#
# Since: 1.1
#
# Notes: This command is experimental and may change syntax in future releases.
##
{ 'type': 'ObjectTypeInfo',
  'data': { 'name': 'str' } }

##
# @qom-list-types:
#
# This command will return a list of types given search parameters
#
# @implements: if specified, only return types that implement this type name
#
# @abstract: if true, include abstract types in the results
#
# Returns: a list of @ObjectTypeInfo or an empty list if no results are found
#
# Since: 1.1
##
{ 'command': 'qom-list-types',
  'data': { '*implements': 'str', '*abstract': 'bool' },
  'returns': [ 'ObjectTypeInfo' ] }
Luiz Capitulino's avatar
Luiz Capitulino committed
1610

1611 1612 1613 1614 1615 1616 1617
##
# @DevicePropertyInfo:
#
# Information about device properties.
#
# @name: the name of the property
# @type: the typename of the property
1618 1619
# @description: #optional if specified, the description of the property.
#               (since 2.2)
1620 1621 1622 1623
#
# Since: 1.2
##
{ 'type': 'DevicePropertyInfo',