1# -*- Mode: Python -*- 2# 3 4## 5# = Miscellanea 6## 7 8## 9# @qmp_capabilities: 10# 11# Enable QMP capabilities. 12# 13# Arguments: None. 14# 15# Example: 16# 17# -> { "execute": "qmp_capabilities" } 18# <- { "return": {} } 19# 20# Notes: This command is valid exactly when first connecting: it must be 21# issued before any other command will be accepted, and will fail once the 22# monitor is accepting other commands. (see qemu docs/interop/qmp-spec.txt) 23# 24# Since: 0.13 25# 26## 27{ 'command': 'qmp_capabilities' } 28 29## 30# @VersionTriple: 31# 32# A three-part version number. 33# 34# @major: The major version number. 35# 36# @minor: The minor version number. 37# 38# @micro: The micro version number. 39# 40# Since: 2.4 41## 42{ 'struct': 'VersionTriple', 43 'data': {'major': 'int', 'minor': 'int', 'micro': 'int'} } 44 45 46## 47# @VersionInfo: 48# 49# A description of QEMU's version. 50# 51# @qemu: The version of QEMU. By current convention, a micro 52# version of 50 signifies a development branch. A micro version 53# greater than or equal to 90 signifies a release candidate for 54# the next minor version. A micro version of less than 50 55# signifies a stable release. 56# 57# @package: QEMU will always set this field to an empty string. Downstream 58# versions of QEMU should set this to a non-empty string. The 59# exact format depends on the downstream however it highly 60# recommended that a unique name is used. 61# 62# Since: 0.14.0 63## 64{ 'struct': 'VersionInfo', 65 'data': {'qemu': 'VersionTriple', 'package': 'str'} } 66 67## 68# @query-version: 69# 70# Returns the current version of QEMU. 71# 72# Returns: A @VersionInfo object describing the current version of QEMU. 73# 74# Since: 0.14.0 75# 76# Example: 77# 78# -> { "execute": "query-version" } 79# <- { 80# "return":{ 81# "qemu":{ 82# "major":0, 83# "minor":11, 84# "micro":5 85# }, 86# "package":"" 87# } 88# } 89# 90## 91{ 'command': 'query-version', 'returns': 'VersionInfo' } 92 93## 94# @CommandInfo: 95# 96# Information about a QMP command 97# 98# @name: The command name 99# 100# Since: 0.14.0 101## 102{ 'struct': 'CommandInfo', 'data': {'name': 'str'} } 103 104## 105# @query-commands: 106# 107# Return a list of supported QMP commands by this server 108# 109# Returns: A list of @CommandInfo for all supported commands 110# 111# Since: 0.14.0 112# 113# Example: 114# 115# -> { "execute": "query-commands" } 116# <- { 117# "return":[ 118# { 119# "name":"query-balloon" 120# }, 121# { 122# "name":"system_powerdown" 123# } 124# ] 125# } 126# 127# Note: This example has been shortened as the real response is too long. 128# 129## 130{ 'command': 'query-commands', 'returns': ['CommandInfo'] } 131 132## 133# @LostTickPolicy: 134# 135# Policy for handling lost ticks in timer devices. 136# 137# @discard: throw away the missed tick(s) and continue with future injection 138# normally. Guest time may be delayed, unless the OS has explicit 139# handling of lost ticks 140# 141# @delay: continue to deliver ticks at the normal rate. Guest time will be 142# delayed due to the late tick 143# 144# @merge: merge the missed tick(s) into one tick and inject. Guest time 145# may be delayed, depending on how the OS reacts to the merging 146# of ticks 147# 148# @slew: deliver ticks at a higher rate to catch up with the missed tick. The 149# guest time should not be delayed once catchup is complete. 150# 151# Since: 2.0 152## 153{ 'enum': 'LostTickPolicy', 154 'data': ['discard', 'delay', 'merge', 'slew' ] } 155 156## 157# @add_client: 158# 159# Allow client connections for VNC, Spice and socket based 160# character devices to be passed in to QEMU via SCM_RIGHTS. 161# 162# @protocol: protocol name. Valid names are "vnc", "spice" or the 163# name of a character device (eg. from -chardev id=XXXX) 164# 165# @fdname: file descriptor name previously passed via 'getfd' command 166# 167# @skipauth: whether to skip authentication. Only applies 168# to "vnc" and "spice" protocols 169# 170# @tls: whether to perform TLS. Only applies to the "spice" 171# protocol 172# 173# Returns: nothing on success. 174# 175# Since: 0.14.0 176# 177# Example: 178# 179# -> { "execute": "add_client", "arguments": { "protocol": "vnc", 180# "fdname": "myclient" } } 181# <- { "return": {} } 182# 183## 184{ 'command': 'add_client', 185 'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool', 186 '*tls': 'bool' } } 187 188## 189# @NameInfo: 190# 191# Guest name information. 192# 193# @name: The name of the guest 194# 195# Since: 0.14.0 196## 197{ 'struct': 'NameInfo', 'data': {'*name': 'str'} } 198 199## 200# @query-name: 201# 202# Return the name information of a guest. 203# 204# Returns: @NameInfo of the guest 205# 206# Since: 0.14.0 207# 208# Example: 209# 210# -> { "execute": "query-name" } 211# <- { "return": { "name": "qemu-name" } } 212# 213## 214{ 'command': 'query-name', 'returns': 'NameInfo' } 215 216## 217# @KvmInfo: 218# 219# Information about support for KVM acceleration 220# 221# @enabled: true if KVM acceleration is active 222# 223# @present: true if KVM acceleration is built into this executable 224# 225# Since: 0.14.0 226## 227{ 'struct': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} } 228 229## 230# @query-kvm: 231# 232# Returns information about KVM acceleration 233# 234# Returns: @KvmInfo 235# 236# Since: 0.14.0 237# 238# Example: 239# 240# -> { "execute": "query-kvm" } 241# <- { "return": { "enabled": true, "present": true } } 242# 243## 244{ 'command': 'query-kvm', 'returns': 'KvmInfo' } 245 246## 247# @UuidInfo: 248# 249# Guest UUID information (Universally Unique Identifier). 250# 251# @UUID: the UUID of the guest 252# 253# Since: 0.14.0 254# 255# Notes: If no UUID was specified for the guest, a null UUID is returned. 256## 257{ 'struct': 'UuidInfo', 'data': {'UUID': 'str'} } 258 259## 260# @query-uuid: 261# 262# Query the guest UUID information. 263# 264# Returns: The @UuidInfo for the guest 265# 266# Since: 0.14.0 267# 268# Example: 269# 270# -> { "execute": "query-uuid" } 271# <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } } 272# 273## 274{ 'command': 'query-uuid', 'returns': 'UuidInfo' } 275 276## 277# @EventInfo: 278# 279# Information about a QMP event 280# 281# @name: The event name 282# 283# Since: 1.2.0 284## 285{ 'struct': 'EventInfo', 'data': {'name': 'str'} } 286 287## 288# @query-events: 289# 290# Return a list of supported QMP events by this server 291# 292# Returns: A list of @EventInfo for all supported events 293# 294# Since: 1.2.0 295# 296# Example: 297# 298# -> { "execute": "query-events" } 299# <- { 300# "return": [ 301# { 302# "name":"SHUTDOWN" 303# }, 304# { 305# "name":"RESET" 306# } 307# ] 308# } 309# 310# Note: This example has been shortened as the real response is too long. 311# 312## 313{ 'command': 'query-events', 'returns': ['EventInfo'] } 314 315## 316# @CpuInfoArch: 317# 318# An enumeration of cpu types that enable additional information during 319# @query-cpus and @query-cpus-fast. 320# 321# @s390: since 2.12 322# 323# Since: 2.6 324## 325{ 'enum': 'CpuInfoArch', 326 'data': ['x86', 'sparc', 'ppc', 'mips', 'tricore', 's390', 'other' ] } 327 328## 329# @CpuInfo: 330# 331# Information about a virtual CPU 332# 333# @CPU: the index of the virtual CPU 334# 335# @current: this only exists for backwards compatibility and should be ignored 336# 337# @halted: true if the virtual CPU is in the halt state. Halt usually refers 338# to a processor specific low power mode. 339# 340# @qom_path: path to the CPU object in the QOM tree (since 2.4) 341# 342# @thread_id: ID of the underlying host thread 343# 344# @props: properties describing to which node/socket/core/thread 345# virtual CPU belongs to, provided if supported by board (since 2.10) 346# 347# @arch: architecture of the cpu, which determines which additional fields 348# will be listed (since 2.6) 349# 350# Since: 0.14.0 351# 352# Notes: @halted is a transient state that changes frequently. By the time the 353# data is sent to the client, the guest may no longer be halted. 354## 355{ 'union': 'CpuInfo', 356 'base': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', 357 'qom_path': 'str', 'thread_id': 'int', 358 '*props': 'CpuInstanceProperties', 'arch': 'CpuInfoArch' }, 359 'discriminator': 'arch', 360 'data': { 'x86': 'CpuInfoX86', 361 'sparc': 'CpuInfoSPARC', 362 'ppc': 'CpuInfoPPC', 363 'mips': 'CpuInfoMIPS', 364 'tricore': 'CpuInfoTricore', 365 's390': 'CpuInfoS390', 366 'other': 'CpuInfoOther' } } 367 368## 369# @CpuInfoX86: 370# 371# Additional information about a virtual i386 or x86_64 CPU 372# 373# @pc: the 64-bit instruction pointer 374# 375# Since: 2.6 376## 377{ 'struct': 'CpuInfoX86', 'data': { 'pc': 'int' } } 378 379## 380# @CpuInfoSPARC: 381# 382# Additional information about a virtual SPARC CPU 383# 384# @pc: the PC component of the instruction pointer 385# 386# @npc: the NPC component of the instruction pointer 387# 388# Since: 2.6 389## 390{ 'struct': 'CpuInfoSPARC', 'data': { 'pc': 'int', 'npc': 'int' } } 391 392## 393# @CpuInfoPPC: 394# 395# Additional information about a virtual PPC CPU 396# 397# @nip: the instruction pointer 398# 399# Since: 2.6 400## 401{ 'struct': 'CpuInfoPPC', 'data': { 'nip': 'int' } } 402 403## 404# @CpuInfoMIPS: 405# 406# Additional information about a virtual MIPS CPU 407# 408# @PC: the instruction pointer 409# 410# Since: 2.6 411## 412{ 'struct': 'CpuInfoMIPS', 'data': { 'PC': 'int' } } 413 414## 415# @CpuInfoTricore: 416# 417# Additional information about a virtual Tricore CPU 418# 419# @PC: the instruction pointer 420# 421# Since: 2.6 422## 423{ 'struct': 'CpuInfoTricore', 'data': { 'PC': 'int' } } 424 425## 426# @CpuInfoOther: 427# 428# No additional information is available about the virtual CPU 429# 430# Since: 2.6 431# 432## 433{ 'struct': 'CpuInfoOther', 'data': { } } 434 435## 436# @CpuS390State: 437# 438# An enumeration of cpu states that can be assumed by a virtual 439# S390 CPU 440# 441# Since: 2.12 442## 443{ 'enum': 'CpuS390State', 444 'prefix': 'S390_CPU_STATE', 445 'data': [ 'uninitialized', 'stopped', 'check-stop', 'operating', 'load' ] } 446 447## 448# @CpuInfoS390: 449# 450# Additional information about a virtual S390 CPU 451# 452# @cpu-state: the virtual CPU's state 453# 454# Since: 2.12 455## 456{ 'struct': 'CpuInfoS390', 'data': { 'cpu-state': 'CpuS390State' } } 457 458## 459# @query-cpus: 460# 461# Returns a list of information about each virtual CPU. 462# 463# This command causes vCPU threads to exit to userspace, which causes 464# a small interruption to guest CPU execution. This will have a negative 465# impact on realtime guests and other latency sensitive guest workloads. 466# It is recommended to use @query-cpus-fast instead of this command to 467# avoid the vCPU interruption. 468# 469# Returns: a list of @CpuInfo for each virtual CPU 470# 471# Since: 0.14.0 472# 473# Example: 474# 475# -> { "execute": "query-cpus" } 476# <- { "return": [ 477# { 478# "CPU":0, 479# "current":true, 480# "halted":false, 481# "qom_path":"/machine/unattached/device[0]", 482# "arch":"x86", 483# "pc":3227107138, 484# "thread_id":3134 485# }, 486# { 487# "CPU":1, 488# "current":false, 489# "halted":true, 490# "qom_path":"/machine/unattached/device[2]", 491# "arch":"x86", 492# "pc":7108165, 493# "thread_id":3135 494# } 495# ] 496# } 497# 498# Notes: This interface is deprecated (since 2.12.0), and it is strongly 499# recommended that you avoid using it. Use @query-cpus-fast to 500# obtain information about virtual CPUs. 501# 502## 503{ 'command': 'query-cpus', 'returns': ['CpuInfo'] } 504 505## 506# @CpuInfoFast: 507# 508# Information about a virtual CPU 509# 510# @cpu-index: index of the virtual CPU 511# 512# @qom-path: path to the CPU object in the QOM tree 513# 514# @thread-id: ID of the underlying host thread 515# 516# @props: properties describing to which node/socket/core/thread 517# virtual CPU belongs to, provided if supported by board 518# 519# @arch: architecture of the cpu, which determines which additional fields 520# will be listed 521# 522# Since: 2.12 523# 524## 525{ 'union': 'CpuInfoFast', 526 'base': {'cpu-index': 'int', 'qom-path': 'str', 527 'thread-id': 'int', '*props': 'CpuInstanceProperties', 528 'arch': 'CpuInfoArch' }, 529 'discriminator': 'arch', 530 'data': { 'x86': 'CpuInfoOther', 531 'sparc': 'CpuInfoOther', 532 'ppc': 'CpuInfoOther', 533 'mips': 'CpuInfoOther', 534 'tricore': 'CpuInfoOther', 535 's390': 'CpuInfoS390', 536 'other': 'CpuInfoOther' } } 537 538## 539# @query-cpus-fast: 540# 541# Returns information about all virtual CPUs. This command does not 542# incur a performance penalty and should be used in production 543# instead of query-cpus. 544# 545# Returns: list of @CpuInfoFast 546# 547# Since: 2.12 548# 549# Example: 550# 551# -> { "execute": "query-cpus-fast" } 552# <- { "return": [ 553# { 554# "thread-id": 25627, 555# "props": { 556# "core-id": 0, 557# "thread-id": 0, 558# "socket-id": 0 559# }, 560# "qom-path": "/machine/unattached/device[0]", 561# "arch":"x86", 562# "cpu-index": 0 563# }, 564# { 565# "thread-id": 25628, 566# "props": { 567# "core-id": 0, 568# "thread-id": 0, 569# "socket-id": 1 570# }, 571# "qom-path": "/machine/unattached/device[2]", 572# "arch":"x86", 573# "cpu-index": 1 574# } 575# ] 576# } 577## 578{ 'command': 'query-cpus-fast', 'returns': [ 'CpuInfoFast' ] } 579 580## 581# @IOThreadInfo: 582# 583# Information about an iothread 584# 585# @id: the identifier of the iothread 586# 587# @thread-id: ID of the underlying host thread 588# 589# @poll-max-ns: maximum polling time in ns, 0 means polling is disabled 590# (since 2.9) 591# 592# @poll-grow: how many ns will be added to polling time, 0 means that it's not 593# configured (since 2.9) 594# 595# @poll-shrink: how many ns will be removed from polling time, 0 means that 596# it's not configured (since 2.9) 597# 598# Since: 2.0 599## 600{ 'struct': 'IOThreadInfo', 601 'data': {'id': 'str', 602 'thread-id': 'int', 603 'poll-max-ns': 'int', 604 'poll-grow': 'int', 605 'poll-shrink': 'int' } } 606 607## 608# @query-iothreads: 609# 610# Returns a list of information about each iothread. 611# 612# Note: this list excludes the QEMU main loop thread, which is not declared 613# using the -object iothread command-line option. It is always the main thread 614# of the process. 615# 616# Returns: a list of @IOThreadInfo for each iothread 617# 618# Since: 2.0 619# 620# Example: 621# 622# -> { "execute": "query-iothreads" } 623# <- { "return": [ 624# { 625# "id":"iothread0", 626# "thread-id":3134 627# }, 628# { 629# "id":"iothread1", 630# "thread-id":3135 631# } 632# ] 633# } 634# 635## 636{ 'command': 'query-iothreads', 'returns': ['IOThreadInfo'] } 637 638## 639# @BalloonInfo: 640# 641# Information about the guest balloon device. 642# 643# @actual: the number of bytes the balloon currently contains 644# 645# Since: 0.14.0 646# 647## 648{ 'struct': 'BalloonInfo', 'data': {'actual': 'int' } } 649 650## 651# @query-balloon: 652# 653# Return information about the balloon device. 654# 655# Returns: @BalloonInfo on success 656# 657# If the balloon driver is enabled but not functional because the KVM 658# kernel module cannot support it, KvmMissingCap 659# 660# If no balloon device is present, DeviceNotActive 661# 662# Since: 0.14.0 663# 664# Example: 665# 666# -> { "execute": "query-balloon" } 667# <- { "return": { 668# "actual": 1073741824, 669# } 670# } 671# 672## 673{ 'command': 'query-balloon', 'returns': 'BalloonInfo' } 674 675## 676# @BALLOON_CHANGE: 677# 678# Emitted when the guest changes the actual BALLOON level. This value is 679# equivalent to the @actual field return by the 'query-balloon' command 680# 681# @actual: actual level of the guest memory balloon in bytes 682# 683# Note: this event is rate-limited. 684# 685# Since: 1.2 686# 687# Example: 688# 689# <- { "event": "BALLOON_CHANGE", 690# "data": { "actual": 944766976 }, 691# "timestamp": { "seconds": 1267020223, "microseconds": 435656 } } 692# 693## 694{ 'event': 'BALLOON_CHANGE', 695 'data': { 'actual': 'int' } } 696 697## 698# @PciMemoryRange: 699# 700# A PCI device memory region 701# 702# @base: the starting address (guest physical) 703# 704# @limit: the ending address (guest physical) 705# 706# Since: 0.14.0 707## 708{ 'struct': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} } 709 710## 711# @PciMemoryRegion: 712# 713# Information about a PCI device I/O region. 714# 715# @bar: the index of the Base Address Register for this region 716# 717# @type: 'io' if the region is a PIO region 718# 'memory' if the region is a MMIO region 719# 720# @size: memory size 721# 722# @prefetch: if @type is 'memory', true if the memory is prefetchable 723# 724# @mem_type_64: if @type is 'memory', true if the BAR is 64-bit 725# 726# Since: 0.14.0 727## 728{ 'struct': 'PciMemoryRegion', 729 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int', 730 '*prefetch': 'bool', '*mem_type_64': 'bool' } } 731 732## 733# @PciBusInfo: 734# 735# Information about a bus of a PCI Bridge device 736# 737# @number: primary bus interface number. This should be the number of the 738# bus the device resides on. 739# 740# @secondary: secondary bus interface number. This is the number of the 741# main bus for the bridge 742# 743# @subordinate: This is the highest number bus that resides below the 744# bridge. 745# 746# @io_range: The PIO range for all devices on this bridge 747# 748# @memory_range: The MMIO range for all devices on this bridge 749# 750# @prefetchable_range: The range of prefetchable MMIO for all devices on 751# this bridge 752# 753# Since: 2.4 754## 755{ 'struct': 'PciBusInfo', 756 'data': {'number': 'int', 'secondary': 'int', 'subordinate': 'int', 757 'io_range': 'PciMemoryRange', 758 'memory_range': 'PciMemoryRange', 759 'prefetchable_range': 'PciMemoryRange' } } 760 761## 762# @PciBridgeInfo: 763# 764# Information about a PCI Bridge device 765# 766# @bus: information about the bus the device resides on 767# 768# @devices: a list of @PciDeviceInfo for each device on this bridge 769# 770# Since: 0.14.0 771## 772{ 'struct': 'PciBridgeInfo', 773 'data': {'bus': 'PciBusInfo', '*devices': ['PciDeviceInfo']} } 774 775## 776# @PciDeviceClass: 777# 778# Information about the Class of a PCI device 779# 780# @desc: a string description of the device's class 781# 782# @class: the class code of the device 783# 784# Since: 2.4 785## 786{ 'struct': 'PciDeviceClass', 787 'data': {'*desc': 'str', 'class': 'int'} } 788 789## 790# @PciDeviceId: 791# 792# Information about the Id of a PCI device 793# 794# @device: the PCI device id 795# 796# @vendor: the PCI vendor id 797# 798# Since: 2.4 799## 800{ 'struct': 'PciDeviceId', 801 'data': {'device': 'int', 'vendor': 'int'} } 802 803## 804# @PciDeviceInfo: 805# 806# Information about a PCI device 807# 808# @bus: the bus number of the device 809# 810# @slot: the slot the device is located in 811# 812# @function: the function of the slot used by the device 813# 814# @class_info: the class of the device 815# 816# @id: the PCI device id 817# 818# @irq: if an IRQ is assigned to the device, the IRQ number 819# 820# @qdev_id: the device name of the PCI device 821# 822# @pci_bridge: if the device is a PCI bridge, the bridge information 823# 824# @regions: a list of the PCI I/O regions associated with the device 825# 826# Notes: the contents of @class_info.desc are not stable and should only be 827# treated as informational. 828# 829# Since: 0.14.0 830## 831{ 'struct': 'PciDeviceInfo', 832 'data': {'bus': 'int', 'slot': 'int', 'function': 'int', 833 'class_info': 'PciDeviceClass', 'id': 'PciDeviceId', 834 '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo', 835 'regions': ['PciMemoryRegion']} } 836 837## 838# @PciInfo: 839# 840# Information about a PCI bus 841# 842# @bus: the bus index 843# 844# @devices: a list of devices on this bus 845# 846# Since: 0.14.0 847## 848{ 'struct': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} } 849 850## 851# @query-pci: 852# 853# Return information about the PCI bus topology of the guest. 854# 855# Returns: a list of @PciInfo for each PCI bus. Each bus is 856# represented by a json-object, which has a key with a json-array of 857# all PCI devices attached to it. Each device is represented by a 858# json-object. 859# 860# Since: 0.14.0 861# 862# Example: 863# 864# -> { "execute": "query-pci" } 865# <- { "return": [ 866# { 867# "bus": 0, 868# "devices": [ 869# { 870# "bus": 0, 871# "qdev_id": "", 872# "slot": 0, 873# "class_info": { 874# "class": 1536, 875# "desc": "Host bridge" 876# }, 877# "id": { 878# "device": 32902, 879# "vendor": 4663 880# }, 881# "function": 0, 882# "regions": [ 883# ] 884# }, 885# { 886# "bus": 0, 887# "qdev_id": "", 888# "slot": 1, 889# "class_info": { 890# "class": 1537, 891# "desc": "ISA bridge" 892# }, 893# "id": { 894# "device": 32902, 895# "vendor": 28672 896# }, 897# "function": 0, 898# "regions": [ 899# ] 900# }, 901# { 902# "bus": 0, 903# "qdev_id": "", 904# "slot": 1, 905# "class_info": { 906# "class": 257, 907# "desc": "IDE controller" 908# }, 909# "id": { 910# "device": 32902, 911# "vendor": 28688 912# }, 913# "function": 1, 914# "regions": [ 915# { 916# "bar": 4, 917# "size": 16, 918# "address": 49152, 919# "type": "io" 920# } 921# ] 922# }, 923# { 924# "bus": 0, 925# "qdev_id": "", 926# "slot": 2, 927# "class_info": { 928# "class": 768, 929# "desc": "VGA controller" 930# }, 931# "id": { 932# "device": 4115, 933# "vendor": 184 934# }, 935# "function": 0, 936# "regions": [ 937# { 938# "prefetch": true, 939# "mem_type_64": false, 940# "bar": 0, 941# "size": 33554432, 942# "address": 4026531840, 943# "type": "memory" 944# }, 945# { 946# "prefetch": false, 947# "mem_type_64": false, 948# "bar": 1, 949# "size": 4096, 950# "address": 4060086272, 951# "type": "memory" 952# }, 953# { 954# "prefetch": false, 955# "mem_type_64": false, 956# "bar": 6, 957# "size": 65536, 958# "address": -1, 959# "type": "memory" 960# } 961# ] 962# }, 963# { 964# "bus": 0, 965# "qdev_id": "", 966# "irq": 11, 967# "slot": 4, 968# "class_info": { 969# "class": 1280, 970# "desc": "RAM controller" 971# }, 972# "id": { 973# "device": 6900, 974# "vendor": 4098 975# }, 976# "function": 0, 977# "regions": [ 978# { 979# "bar": 0, 980# "size": 32, 981# "address": 49280, 982# "type": "io" 983# } 984# ] 985# } 986# ] 987# } 988# ] 989# } 990# 991# Note: This example has been shortened as the real response is too long. 992# 993## 994{ 'command': 'query-pci', 'returns': ['PciInfo'] } 995 996## 997# @quit: 998# 999# This command will cause the QEMU process to exit gracefully. While every 1000# attempt is made to send the QMP response before terminating, this is not 1001# guaranteed. When using this interface, a premature EOF would not be 1002# unexpected. 1003# 1004# Since: 0.14.0 1005# 1006# Example: 1007# 1008# -> { "execute": "quit" } 1009# <- { "return": {} } 1010## 1011{ 'command': 'quit' } 1012 1013## 1014# @stop: 1015# 1016# Stop all guest VCPU execution. 1017# 1018# Since: 0.14.0 1019# 1020# Notes: This function will succeed even if the guest is already in the stopped 1021# state. In "inmigrate" state, it will ensure that the guest 1022# remains paused once migration finishes, as if the -S option was 1023# passed on the command line. 1024# 1025# Example: 1026# 1027# -> { "execute": "stop" } 1028# <- { "return": {} } 1029# 1030## 1031{ 'command': 'stop' } 1032 1033## 1034# @system_reset: 1035# 1036# Performs a hard reset of a guest. 1037# 1038# Since: 0.14.0 1039# 1040# Example: 1041# 1042# -> { "execute": "system_reset" } 1043# <- { "return": {} } 1044# 1045## 1046{ 'command': 'system_reset' } 1047 1048## 1049# @system_powerdown: 1050# 1051# Requests that a guest perform a powerdown operation. 1052# 1053# Since: 0.14.0 1054# 1055# Notes: A guest may or may not respond to this command. This command 1056# returning does not indicate that a guest has accepted the request or 1057# that it has shut down. Many guests will respond to this command by 1058# prompting the user in some way. 1059# Example: 1060# 1061# -> { "execute": "system_powerdown" } 1062# <- { "return": {} } 1063# 1064## 1065{ 'command': 'system_powerdown' } 1066 1067## 1068# @cpu-add: 1069# 1070# Adds CPU with specified ID 1071# 1072# @id: ID of CPU to be created, valid values [0..max_cpus) 1073# 1074# Returns: Nothing on success 1075# 1076# Since: 1.5 1077# 1078# Example: 1079# 1080# -> { "execute": "cpu-add", "arguments": { "id": 2 } } 1081# <- { "return": {} } 1082# 1083## 1084{ 'command': 'cpu-add', 'data': {'id': 'int'} } 1085 1086## 1087# @memsave: 1088# 1089# Save a portion of guest memory to a file. 1090# 1091# @val: the virtual address of the guest to start from 1092# 1093# @size: the size of memory region to save 1094# 1095# @filename: the file to save the memory to as binary data 1096# 1097# @cpu-index: the index of the virtual CPU to use for translating the 1098# virtual address (defaults to CPU 0) 1099# 1100# Returns: Nothing on success 1101# 1102# Since: 0.14.0 1103# 1104# Notes: Errors were not reliably returned until 1.1 1105# 1106# Example: 1107# 1108# -> { "execute": "memsave", 1109# "arguments": { "val": 10, 1110# "size": 100, 1111# "filename": "/tmp/virtual-mem-dump" } } 1112# <- { "return": {} } 1113# 1114## 1115{ 'command': 'memsave', 1116 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} } 1117 1118## 1119# @pmemsave: 1120# 1121# Save a portion of guest physical memory to a file. 1122# 1123# @val: the physical address of the guest to start from 1124# 1125# @size: the size of memory region to save 1126# 1127# @filename: the file to save the memory to as binary data 1128# 1129# Returns: Nothing on success 1130# 1131# Since: 0.14.0 1132# 1133# Notes: Errors were not reliably returned until 1.1 1134# 1135# Example: 1136# 1137# -> { "execute": "pmemsave", 1138# "arguments": { "val": 10, 1139# "size": 100, 1140# "filename": "/tmp/physical-mem-dump" } } 1141# <- { "return": {} } 1142# 1143## 1144{ 'command': 'pmemsave', 1145 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} } 1146 1147## 1148# @cont: 1149# 1150# Resume guest VCPU execution. 1151# 1152# Since: 0.14.0 1153# 1154# Returns: If successful, nothing 1155# 1156# Notes: This command will succeed if the guest is currently running. It 1157# will also succeed if the guest is in the "inmigrate" state; in 1158# this case, the effect of the command is to make sure the guest 1159# starts once migration finishes, removing the effect of the -S 1160# command line option if it was passed. 1161# 1162# Example: 1163# 1164# -> { "execute": "cont" } 1165# <- { "return": {} } 1166# 1167## 1168{ 'command': 'cont' } 1169 1170## 1171# @system_wakeup: 1172# 1173# Wakeup guest from suspend. Does nothing in case the guest isn't suspended. 1174# 1175# Since: 1.1 1176# 1177# Returns: nothing. 1178# 1179# Example: 1180# 1181# -> { "execute": "system_wakeup" } 1182# <- { "return": {} } 1183# 1184## 1185{ 'command': 'system_wakeup' } 1186 1187## 1188# @inject-nmi: 1189# 1190# Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or all CPUs (ppc64). 1191# The command fails when the guest doesn't support injecting. 1192# 1193# Returns: If successful, nothing 1194# 1195# Since: 0.14.0 1196# 1197# Note: prior to 2.1, this command was only supported for x86 and s390 VMs 1198# 1199# Example: 1200# 1201# -> { "execute": "inject-nmi" } 1202# <- { "return": {} } 1203# 1204## 1205{ 'command': 'inject-nmi' } 1206 1207## 1208# @balloon: 1209# 1210# Request the balloon driver to change its balloon size. 1211# 1212# @value: the target size of the balloon in bytes 1213# 1214# Returns: Nothing on success 1215# If the balloon driver is enabled but not functional because the KVM 1216# kernel module cannot support it, KvmMissingCap 1217# If no balloon device is present, DeviceNotActive 1218# 1219# Notes: This command just issues a request to the guest. When it returns, 1220# the balloon size may not have changed. A guest can change the balloon 1221# size independent of this command. 1222# 1223# Since: 0.14.0 1224# 1225# Example: 1226# 1227# -> { "execute": "balloon", "arguments": { "value": 536870912 } } 1228# <- { "return": {} } 1229# 1230## 1231{ 'command': 'balloon', 'data': {'value': 'int'} } 1232 1233## 1234# @human-monitor-command: 1235# 1236# Execute a command on the human monitor and return the output. 1237# 1238# @command-line: the command to execute in the human monitor 1239# 1240# @cpu-index: The CPU to use for commands that require an implicit CPU 1241# 1242# Returns: the output of the command as a string 1243# 1244# Since: 0.14.0 1245# 1246# Notes: This command only exists as a stop-gap. Its use is highly 1247# discouraged. The semantics of this command are not 1248# guaranteed: this means that command names, arguments and 1249# responses can change or be removed at ANY time. Applications 1250# that rely on long term stability guarantees should NOT 1251# use this command. 1252# 1253# Known limitations: 1254# 1255# * This command is stateless, this means that commands that depend 1256# on state information (such as getfd) might not work 1257# 1258# * Commands that prompt the user for data don't currently work 1259# 1260# Example: 1261# 1262# -> { "execute": "human-monitor-command", 1263# "arguments": { "command-line": "info kvm" } } 1264# <- { "return": "kvm support: enabled\r\n" } 1265# 1266## 1267{ 'command': 'human-monitor-command', 1268 'data': {'command-line': 'str', '*cpu-index': 'int'}, 1269 'returns': 'str' } 1270 1271## 1272# @ObjectPropertyInfo: 1273# 1274# @name: the name of the property 1275# 1276# @type: the type of the property. This will typically come in one of four 1277# forms: 1278# 1279# 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'. 1280# These types are mapped to the appropriate JSON type. 1281# 1282# 2) A child type in the form 'child<subtype>' where subtype is a qdev 1283# device type name. Child properties create the composition tree. 1284# 1285# 3) A link type in the form 'link<subtype>' where subtype is a qdev 1286# device type name. Link properties form the device model graph. 1287# 1288# @description: if specified, the description of the property. 1289# 1290# Since: 1.2 1291## 1292{ 'struct': 'ObjectPropertyInfo', 1293 'data': { 'name': 'str', 'type': 'str', '*description': 'str' } } 1294 1295## 1296# @qom-list: 1297# 1298# This command will list any properties of a object given a path in the object 1299# model. 1300# 1301# @path: the path within the object model. See @qom-get for a description of 1302# this parameter. 1303# 1304# Returns: a list of @ObjectPropertyInfo that describe the properties of the 1305# object. 1306# 1307# Since: 1.2 1308## 1309{ 'command': 'qom-list', 1310 'data': { 'path': 'str' }, 1311 'returns': [ 'ObjectPropertyInfo' ] } 1312 1313## 1314# @qom-get: 1315# 1316# This command will get a property from a object model path and return the 1317# value. 1318# 1319# @path: The path within the object model. There are two forms of supported 1320# paths--absolute and partial paths. 1321# 1322# Absolute paths are derived from the root object and can follow child<> 1323# or link<> properties. Since they can follow link<> properties, they 1324# can be arbitrarily long. Absolute paths look like absolute filenames 1325# and are prefixed with a leading slash. 1326# 1327# Partial paths look like relative filenames. They do not begin 1328# with a prefix. The matching rules for partial paths are subtle but 1329# designed to make specifying objects easy. At each level of the 1330# composition tree, the partial path is matched as an absolute path. 1331# The first match is not returned. At least two matches are searched 1332# for. A successful result is only returned if only one match is 1333# found. If more than one match is found, a flag is return to 1334# indicate that the match was ambiguous. 1335# 1336# @property: The property name to read 1337# 1338# Returns: The property value. The type depends on the property 1339# type. child<> and link<> properties are returned as #str 1340# pathnames. All integer property types (u8, u16, etc) are 1341# returned as #int. 1342# 1343# Since: 1.2 1344## 1345{ 'command': 'qom-get', 1346 'data': { 'path': 'str', 'property': 'str' }, 1347 'returns': 'any' } 1348 1349## 1350# @qom-set: 1351# 1352# This command will set a property from a object model path. 1353# 1354# @path: see @qom-get for a description of this parameter 1355# 1356# @property: the property name to set 1357# 1358# @value: a value who's type is appropriate for the property type. See @qom-get 1359# for a description of type mapping. 1360# 1361# Since: 1.2 1362## 1363{ 'command': 'qom-set', 1364 'data': { 'path': 'str', 'property': 'str', 'value': 'any' } } 1365 1366## 1367# @change: 1368# 1369# This command is multiple commands multiplexed together. 1370# 1371# @device: This is normally the name of a block device but it may also be 'vnc'. 1372# when it's 'vnc', then sub command depends on @target 1373# 1374# @target: If @device is a block device, then this is the new filename. 1375# If @device is 'vnc', then if the value 'password' selects the vnc 1376# change password command. Otherwise, this specifies a new server URI 1377# address to listen to for VNC connections. 1378# 1379# @arg: If @device is a block device, then this is an optional format to open 1380# the device with. 1381# If @device is 'vnc' and @target is 'password', this is the new VNC 1382# password to set. See change-vnc-password for additional notes. 1383# 1384# Returns: Nothing on success. 1385# If @device is not a valid block device, DeviceNotFound 1386# 1387# Notes: This interface is deprecated, and it is strongly recommended that you 1388# avoid using it. For changing block devices, use 1389# blockdev-change-medium; for changing VNC parameters, use 1390# change-vnc-password. 1391# 1392# Since: 0.14.0 1393# 1394# Example: 1395# 1396# 1. Change a removable medium 1397# 1398# -> { "execute": "change", 1399# "arguments": { "device": "ide1-cd0", 1400# "target": "/srv/images/Fedora-12-x86_64-DVD.iso" } } 1401# <- { "return": {} } 1402# 1403# 2. Change VNC password 1404# 1405# -> { "execute": "change", 1406# "arguments": { "device": "vnc", "target": "password", 1407# "arg": "foobar1" } } 1408# <- { "return": {} } 1409# 1410## 1411{ 'command': 'change', 1412 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} } 1413 1414## 1415# @ObjectTypeInfo: 1416# 1417# This structure describes a search result from @qom-list-types 1418# 1419# @name: the type name found in the search 1420# 1421# @abstract: the type is abstract and can't be directly instantiated. 1422# Omitted if false. (since 2.10) 1423# 1424# @parent: Name of parent type, if any (since 2.10) 1425# 1426# Since: 1.1 1427## 1428{ 'struct': 'ObjectTypeInfo', 1429 'data': { 'name': 'str', '*abstract': 'bool', '*parent': 'str' } } 1430 1431## 1432# @qom-list-types: 1433# 1434# This command will return a list of types given search parameters 1435# 1436# @implements: if specified, only return types that implement this type name 1437# 1438# @abstract: if true, include abstract types in the results 1439# 1440# Returns: a list of @ObjectTypeInfo or an empty list if no results are found 1441# 1442# Since: 1.1 1443## 1444{ 'command': 'qom-list-types', 1445 'data': { '*implements': 'str', '*abstract': 'bool' }, 1446 'returns': [ 'ObjectTypeInfo' ] } 1447 1448## 1449# @device-list-properties: 1450# 1451# List properties associated with a device. 1452# 1453# @typename: the type name of a device 1454# 1455# Returns: a list of ObjectPropertyInfo describing a devices properties 1456# 1457# Since: 1.2 1458## 1459{ 'command': 'device-list-properties', 1460 'data': { 'typename': 'str'}, 1461 'returns': [ 'ObjectPropertyInfo' ] } 1462 1463## 1464# @qom-list-properties: 1465# 1466# List properties associated with a QOM object. 1467# 1468# @typename: the type name of an object 1469# 1470# Returns: a list of ObjectPropertyInfo describing object properties 1471# 1472# Since: 2.12 1473## 1474{ 'command': 'qom-list-properties', 1475 'data': { 'typename': 'str'}, 1476 'returns': [ 'ObjectPropertyInfo' ] } 1477 1478## 1479# @xen-set-global-dirty-log: 1480# 1481# Enable or disable the global dirty log mode. 1482# 1483# @enable: true to enable, false to disable. 1484# 1485# Returns: nothing 1486# 1487# Since: 1.3 1488# 1489# Example: 1490# 1491# -> { "execute": "xen-set-global-dirty-log", 1492# "arguments": { "enable": true } } 1493# <- { "return": {} } 1494# 1495## 1496{ 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } } 1497 1498## 1499# @device_add: 1500# 1501# @driver: the name of the new device's driver 1502# 1503# @bus: the device's parent bus (device tree path) 1504# 1505# @id: the device's ID, must be unique 1506# 1507# Additional arguments depend on the type. 1508# 1509# Add a device. 1510# 1511# Notes: 1512# 1. For detailed information about this command, please refer to the 1513# 'docs/qdev-device-use.txt' file. 1514# 1515# 2. It's possible to list device properties by running QEMU with the 1516# "-device DEVICE,help" command-line argument, where DEVICE is the 1517# device's name 1518# 1519# Example: 1520# 1521# -> { "execute": "device_add", 1522# "arguments": { "driver": "e1000", "id": "net1", 1523# "bus": "pci.0", 1524# "mac": "52:54:00:12:34:56" } } 1525# <- { "return": {} } 1526# 1527# TODO: This command effectively bypasses QAPI completely due to its 1528# "additional arguments" business. It shouldn't have been added to 1529# the schema in this form. It should be qapified properly, or 1530# replaced by a properly qapified command. 1531# 1532# Since: 0.13 1533## 1534{ 'command': 'device_add', 1535 'data': {'driver': 'str', '*bus': 'str', '*id': 'str'}, 1536 'gen': false } # so we can get the additional arguments 1537 1538## 1539# @device_del: 1540# 1541# Remove a device from a guest 1542# 1543# @id: the device's ID or QOM path 1544# 1545# Returns: Nothing on success 1546# If @id is not a valid device, DeviceNotFound 1547# 1548# Notes: When this command completes, the device may not be removed from the 1549# guest. Hot removal is an operation that requires guest cooperation. 1550# This command merely requests that the guest begin the hot removal 1551# process. Completion of the device removal process is signaled with a 1552# DEVICE_DELETED event. Guest reset will automatically complete removal 1553# for all devices. 1554# 1555# Since: 0.14.0 1556# 1557# Example: 1558# 1559# -> { "execute": "device_del", 1560# "arguments": { "id": "net1" } } 1561# <- { "return": {} } 1562# 1563# -> { "execute": "device_del", 1564# "arguments": { "id": "/machine/peripheral-anon/device[0]" } } 1565# <- { "return": {} } 1566# 1567## 1568{ 'command': 'device_del', 'data': {'id': 'str'} } 1569 1570## 1571# @DEVICE_DELETED: 1572# 1573# Emitted whenever the device removal completion is acknowledged by the guest. 1574# At this point, it's safe to reuse the specified device ID. Device removal can 1575# be initiated by the guest or by HMP/QMP commands. 1576# 1577# @device: device name 1578# 1579# @path: device path 1580# 1581# Since: 1.5 1582# 1583# Example: 1584# 1585# <- { "event": "DEVICE_DELETED", 1586# "data": { "device": "virtio-net-pci-0", 1587# "path": "/machine/peripheral/virtio-net-pci-0" }, 1588# "timestamp": { "seconds": 1265044230, "microseconds": 450486 } } 1589# 1590## 1591{ 'event': 'DEVICE_DELETED', 1592 'data': { '*device': 'str', 'path': 'str' } } 1593 1594## 1595# @DumpGuestMemoryFormat: 1596# 1597# An enumeration of guest-memory-dump's format. 1598# 1599# @elf: elf format 1600# 1601# @kdump-zlib: kdump-compressed format with zlib-compressed 1602# 1603# @kdump-lzo: kdump-compressed format with lzo-compressed 1604# 1605# @kdump-snappy: kdump-compressed format with snappy-compressed 1606# 1607# Since: 2.0 1608## 1609{ 'enum': 'DumpGuestMemoryFormat', 1610 'data': [ 'elf', 'kdump-zlib', 'kdump-lzo', 'kdump-snappy' ] } 1611 1612## 1613# @dump-guest-memory: 1614# 1615# Dump guest's memory to vmcore. It is a synchronous operation that can take 1616# very long depending on the amount of guest memory. 1617# 1618# @paging: if true, do paging to get guest's memory mapping. This allows 1619# using gdb to process the core file. 1620# 1621# IMPORTANT: this option can make QEMU allocate several gigabytes 1622# of RAM. This can happen for a large guest, or a 1623# malicious guest pretending to be large. 1624# 1625# Also, paging=true has the following limitations: 1626# 1627# 1. The guest may be in a catastrophic state or can have corrupted 1628# memory, which cannot be trusted 1629# 2. The guest can be in real-mode even if paging is enabled. For 1630# example, the guest uses ACPI to sleep, and ACPI sleep state 1631# goes in real-mode 1632# 3. Currently only supported on i386 and x86_64. 1633# 1634# @protocol: the filename or file descriptor of the vmcore. The supported 1635# protocols are: 1636# 1637# 1. file: the protocol starts with "file:", and the following 1638# string is the file's path. 1639# 2. fd: the protocol starts with "fd:", and the following string 1640# is the fd's name. 1641# 1642# @detach: if true, QMP will return immediately rather than 1643# waiting for the dump to finish. The user can track progress 1644# using "query-dump". (since 2.6). 1645# 1646# @begin: if specified, the starting physical address. 1647# 1648# @length: if specified, the memory size, in bytes. If you don't 1649# want to dump all guest's memory, please specify the start @begin 1650# and @length 1651# 1652# @format: if specified, the format of guest memory dump. But non-elf 1653# format is conflict with paging and filter, ie. @paging, @begin and 1654# @length is not allowed to be specified with non-elf @format at the 1655# same time (since 2.0) 1656# 1657# Note: All boolean arguments default to false 1658# 1659# Returns: nothing on success 1660# 1661# Since: 1.2 1662# 1663# Example: 1664# 1665# -> { "execute": "dump-guest-memory", 1666# "arguments": { "protocol": "fd:dump" } } 1667# <- { "return": {} } 1668# 1669## 1670{ 'command': 'dump-guest-memory', 1671 'data': { 'paging': 'bool', 'protocol': 'str', '*detach': 'bool', 1672 '*begin': 'int', '*length': 'int', 1673 '*format': 'DumpGuestMemoryFormat'} } 1674 1675## 1676# @DumpStatus: 1677# 1678# Describe the status of a long-running background guest memory dump. 1679# 1680# @none: no dump-guest-memory has started yet. 1681# 1682# @active: there is one dump running in background. 1683# 1684# @completed: the last dump has finished successfully. 1685# 1686# @failed: the last dump has failed. 1687# 1688# Since: 2.6 1689## 1690{ 'enum': 'DumpStatus', 1691 'data': [ 'none', 'active', 'completed', 'failed' ] } 1692 1693## 1694# @DumpQueryResult: 1695# 1696# The result format for 'query-dump'. 1697# 1698# @status: enum of @DumpStatus, which shows current dump status 1699# 1700# @completed: bytes written in latest dump (uncompressed) 1701# 1702# @total: total bytes to be written in latest dump (uncompressed) 1703# 1704# Since: 2.6 1705## 1706{ 'struct': 'DumpQueryResult', 1707 'data': { 'status': 'DumpStatus', 1708 'completed': 'int', 1709 'total': 'int' } } 1710 1711## 1712# @query-dump: 1713# 1714# Query latest dump status. 1715# 1716# Returns: A @DumpStatus object showing the dump status. 1717# 1718# Since: 2.6 1719# 1720# Example: 1721# 1722# -> { "execute": "query-dump" } 1723# <- { "return": { "status": "active", "completed": 1024000, 1724# "total": 2048000 } } 1725# 1726## 1727{ 'command': 'query-dump', 'returns': 'DumpQueryResult' } 1728 1729## 1730# @DUMP_COMPLETED: 1731# 1732# Emitted when background dump has completed 1733# 1734# @result: final dump status 1735# 1736# @error: human-readable error string that provides 1737# hint on why dump failed. Only presents on failure. The 1738# user should not try to interpret the error string. 1739# 1740# Since: 2.6 1741# 1742# Example: 1743# 1744# { "event": "DUMP_COMPLETED", 1745# "data": {"result": {"total": 1090650112, "status": "completed", 1746# "completed": 1090650112} } } 1747# 1748## 1749{ 'event': 'DUMP_COMPLETED' , 1750 'data': { 'result': 'DumpQueryResult', '*error': 'str' } } 1751 1752## 1753# @DumpGuestMemoryCapability: 1754# 1755# A list of the available formats for dump-guest-memory 1756# 1757# Since: 2.0 1758## 1759{ 'struct': 'DumpGuestMemoryCapability', 1760 'data': { 1761 'formats': ['DumpGuestMemoryFormat'] } } 1762 1763## 1764# @query-dump-guest-memory-capability: 1765# 1766# Returns the available formats for dump-guest-memory 1767# 1768# Returns: A @DumpGuestMemoryCapability object listing available formats for 1769# dump-guest-memory 1770# 1771# Since: 2.0 1772# 1773# Example: 1774# 1775# -> { "execute": "query-dump-guest-memory-capability" } 1776# <- { "return": { "formats": 1777# ["elf", "kdump-zlib", "kdump-lzo", "kdump-snappy"] } 1778# 1779## 1780{ 'command': 'query-dump-guest-memory-capability', 1781 'returns': 'DumpGuestMemoryCapability' } 1782 1783## 1784# @dump-skeys: 1785# 1786# Dump guest's storage keys 1787# 1788# @filename: the path to the file to dump to 1789# 1790# This command is only supported on s390 architecture. 1791# 1792# Since: 2.5 1793# 1794# Example: 1795# 1796# -> { "execute": "dump-skeys", 1797# "arguments": { "filename": "/tmp/skeys" } } 1798# <- { "return": {} } 1799# 1800## 1801{ 'command': 'dump-skeys', 1802 'data': { 'filename': 'str' } } 1803 1804## 1805# @object-add: 1806# 1807# Create a QOM object. 1808# 1809# @qom-type: the class name for the object to be created 1810# 1811# @id: the name of the new object 1812# 1813# @props: a dictionary of properties to be passed to the backend 1814# 1815# Returns: Nothing on success 1816# Error if @qom-type is not a valid class name 1817# 1818# Since: 2.0 1819# 1820# Example: 1821# 1822# -> { "execute": "object-add", 1823# "arguments": { "qom-type": "rng-random", "id": "rng1", 1824# "props": { "filename": "/dev/hwrng" } } } 1825# <- { "return": {} } 1826# 1827## 1828{ 'command': 'object-add', 1829 'data': {'qom-type': 'str', 'id': 'str', '*props': 'any'} } 1830 1831## 1832# @object-del: 1833# 1834# Remove a QOM object. 1835# 1836# @id: the name of the QOM object to remove 1837# 1838# Returns: Nothing on success 1839# Error if @id is not a valid id for a QOM object 1840# 1841# Since: 2.0 1842# 1843# Example: 1844# 1845# -> { "execute": "object-del", "arguments": { "id": "rng1" } } 1846# <- { "return": {} } 1847# 1848## 1849{ 'command': 'object-del', 'data': {'id': 'str'} } 1850 1851## 1852# @getfd: 1853# 1854# Receive a file descriptor via SCM rights and assign it a name 1855# 1856# @fdname: file descriptor name 1857# 1858# Returns: Nothing on success 1859# 1860# Since: 0.14.0 1861# 1862# Notes: If @fdname already exists, the file descriptor assigned to 1863# it will be closed and replaced by the received file 1864# descriptor. 1865# 1866# The 'closefd' command can be used to explicitly close the 1867# file descriptor when it is no longer needed. 1868# 1869# Example: 1870# 1871# -> { "execute": "getfd", "arguments": { "fdname": "fd1" } } 1872# <- { "return": {} } 1873# 1874## 1875{ 'command': 'getfd', 'data': {'fdname': 'str'} } 1876 1877## 1878# @closefd: 1879# 1880# Close a file descriptor previously passed via SCM rights 1881# 1882# @fdname: file descriptor name 1883# 1884# Returns: Nothing on success 1885# 1886# Since: 0.14.0 1887# 1888# Example: 1889# 1890# -> { "execute": "closefd", "arguments": { "fdname": "fd1" } } 1891# <- { "return": {} } 1892# 1893## 1894{ 'command': 'closefd', 'data': {'fdname': 'str'} } 1895 1896## 1897# @MachineInfo: 1898# 1899# Information describing a machine. 1900# 1901# @name: the name of the machine 1902# 1903# @alias: an alias for the machine name 1904# 1905# @is-default: whether the machine is default 1906# 1907# @cpu-max: maximum number of CPUs supported by the machine type 1908# (since 1.5.0) 1909# 1910# @hotpluggable-cpus: cpu hotplug via -device is supported (since 2.7.0) 1911# 1912# Since: 1.2.0 1913## 1914{ 'struct': 'MachineInfo', 1915 'data': { 'name': 'str', '*alias': 'str', 1916 '*is-default': 'bool', 'cpu-max': 'int', 1917 'hotpluggable-cpus': 'bool'} } 1918 1919## 1920# @query-machines: 1921# 1922# Return a list of supported machines 1923# 1924# Returns: a list of MachineInfo 1925# 1926# Since: 1.2.0 1927## 1928{ 'command': 'query-machines', 'returns': ['MachineInfo'] } 1929 1930## 1931# @CpuDefinitionInfo: 1932# 1933# Virtual CPU definition. 1934# 1935# @name: the name of the CPU definition 1936# 1937# @migration-safe: whether a CPU definition can be safely used for 1938# migration in combination with a QEMU compatibility machine 1939# when migrating between different QMU versions and between 1940# hosts with different sets of (hardware or software) 1941# capabilities. If not provided, information is not available 1942# and callers should not assume the CPU definition to be 1943# migration-safe. (since 2.8) 1944# 1945# @static: whether a CPU definition is static and will not change depending on 1946# QEMU version, machine type, machine options and accelerator options. 1947# A static model is always migration-safe. (since 2.8) 1948# 1949# @unavailable-features: List of properties that prevent 1950# the CPU model from running in the current 1951# host. (since 2.8) 1952# @typename: Type name that can be used as argument to @device-list-properties, 1953# to introspect properties configurable using -cpu or -global. 1954# (since 2.9) 1955# 1956# @unavailable-features is a list of QOM property names that 1957# represent CPU model attributes that prevent the CPU from running. 1958# If the QOM property is read-only, that means there's no known 1959# way to make the CPU model run in the current host. Implementations 1960# that choose not to provide specific information return the 1961# property name "type". 1962# If the property is read-write, it means that it MAY be possible 1963# to run the CPU model in the current host if that property is 1964# changed. Management software can use it as hints to suggest or 1965# choose an alternative for the user, or just to generate meaningful 1966# error messages explaining why the CPU model can't be used. 1967# If @unavailable-features is an empty list, the CPU model is 1968# runnable using the current host and machine-type. 1969# If @unavailable-features is not present, runnability 1970# information for the CPU is not available. 1971# 1972# Since: 1.2.0 1973## 1974{ 'struct': 'CpuDefinitionInfo', 1975 'data': { 'name': 'str', '*migration-safe': 'bool', 'static': 'bool', 1976 '*unavailable-features': [ 'str' ], 'typename': 'str' } } 1977 1978## 1979# @MemoryInfo: 1980# 1981# Actual memory information in bytes. 1982# 1983# @base-memory: size of "base" memory specified with command line 1984# option -m. 1985# 1986# @plugged-memory: size of memory that can be hot-unplugged. This field 1987# is omitted if target doesn't support memory hotplug 1988# (i.e. CONFIG_MEM_HOTPLUG not defined on build time). 1989# 1990# Since: 2.11.0 1991## 1992{ 'struct': 'MemoryInfo', 1993 'data' : { 'base-memory': 'size', '*plugged-memory': 'size' } } 1994 1995## 1996# @query-memory-size-summary: 1997# 1998# Return the amount of initially allocated and present hotpluggable (if 1999# enabled) memory in bytes. 2000# 2001# Example: 2002# 2003# -> { "execute": "query-memory-size-summary" } 2004# <- { "return": { "base-memory": 4294967296, "plugged-memory": 0 } } 2005# 2006# Since: 2.11.0 2007## 2008{ 'command': 'query-memory-size-summary', 'returns': 'MemoryInfo' } 2009 2010## 2011# @query-cpu-definitions: 2012# 2013# Return a list of supported virtual CPU definitions 2014# 2015# Returns: a list of CpuDefInfo 2016# 2017# Since: 1.2.0 2018## 2019{ 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] } 2020 2021## 2022# @CpuModelInfo: 2023# 2024# Virtual CPU model. 2025# 2026# A CPU model consists of the name of a CPU definition, to which 2027# delta changes are applied (e.g. features added/removed). Most magic values 2028# that an architecture might require should be hidden behind the name. 2029# However, if required, architectures can expose relevant properties. 2030# 2031# @name: the name of the CPU definition the model is based on 2032# @props: a dictionary of QOM properties to be applied 2033# 2034# Since: 2.8.0 2035## 2036{ 'struct': 'CpuModelInfo', 2037 'data': { 'name': 'str', 2038 '*props': 'any' } } 2039 2040## 2041# @CpuModelExpansionType: 2042# 2043# An enumeration of CPU model expansion types. 2044# 2045# @static: Expand to a static CPU model, a combination of a static base 2046# model name and property delta changes. As the static base model will 2047# never change, the expanded CPU model will be the same, independent of 2048# independent of QEMU version, machine type, machine options, and 2049# accelerator options. Therefore, the resulting model can be used by 2050# tooling without having to specify a compatibility machine - e.g. when 2051# displaying the "host" model. static CPU models are migration-safe. 2052# 2053# @full: Expand all properties. The produced model is not guaranteed to be 2054# migration-safe, but allows tooling to get an insight and work with 2055# model details. 2056# 2057# Note: When a non-migration-safe CPU model is expanded in static mode, some 2058# features enabled by the CPU model may be omitted, because they can't be 2059# implemented by a static CPU model definition (e.g. cache info passthrough and 2060# PMU passthrough in x86). If you need an accurate representation of the 2061# features enabled by a non-migration-safe CPU model, use @full. If you need a 2062# static representation that will keep ABI compatibility even when changing QEMU 2063# version or machine-type, use @static (but keep in mind that some features may 2064# be omitted). 2065# 2066# Since: 2.8.0 2067## 2068{ 'enum': 'CpuModelExpansionType', 2069 'data': [ 'static', 'full' ] } 2070 2071 2072## 2073# @CpuModelExpansionInfo: 2074# 2075# The result of a cpu model expansion. 2076# 2077# @model: the expanded CpuModelInfo. 2078# 2079# Since: 2.8.0 2080## 2081{ 'struct': 'CpuModelExpansionInfo', 2082 'data': { 'model': 'CpuModelInfo' } } 2083 2084 2085## 2086# @query-cpu-model-expansion: 2087# 2088# Expands a given CPU model (or a combination of CPU model + additional options) 2089# to different granularities, allowing tooling to get an understanding what a 2090# specific CPU model looks like in QEMU under a certain configuration. 2091# 2092# This interface can be used to query the "host" CPU model. 2093# 2094# The data returned by this command may be affected by: 2095# 2096# * QEMU version: CPU models may look different depending on the QEMU version. 2097# (Except for CPU models reported as "static" in query-cpu-definitions.) 2098# * machine-type: CPU model may look different depending on the machine-type. 2099# (Except for CPU models reported as "static" in query-cpu-definitions.) 2100# * machine options (including accelerator): in some architectures, CPU models 2101# may look different depending on machine and accelerator options. (Except for 2102# CPU models reported as "static" in query-cpu-definitions.) 2103# * "-cpu" arguments and global properties: arguments to the -cpu option and 2104# global properties may affect expansion of CPU models. Using 2105# query-cpu-model-expansion while using these is not advised. 2106# 2107# Some architectures may not support all expansion types. s390x supports 2108# "full" and "static". 2109# 2110# Returns: a CpuModelExpansionInfo. Returns an error if expanding CPU models is 2111# not supported, if the model cannot be expanded, if the model contains 2112# an unknown CPU definition name, unknown properties or properties 2113# with a wrong type. Also returns an error if an expansion type is 2114# not supported. 2115# 2116# Since: 2.8.0 2117## 2118{ 'command': 'query-cpu-model-expansion', 2119 'data': { 'type': 'CpuModelExpansionType', 2120 'model': 'CpuModelInfo' }, 2121 'returns': 'CpuModelExpansionInfo' } 2122 2123## 2124# @CpuModelCompareResult: 2125# 2126# An enumeration of CPU model comparison results. The result is usually 2127# calculated using e.g. CPU features or CPU generations. 2128# 2129# @incompatible: If model A is incompatible to model B, model A is not 2130# guaranteed to run where model B runs and the other way around. 2131# 2132# @identical: If model A is identical to model B, model A is guaranteed to run 2133# where model B runs and the other way around. 2134# 2135# @superset: If model A is a superset of model B, model B is guaranteed to run 2136# where model A runs. There are no guarantees about the other way. 2137# 2138# @subset: If model A is a subset of model B, model A is guaranteed to run 2139# where model B runs. There are no guarantees about the other way. 2140# 2141# Since: 2.8.0 2142## 2143{ 'enum': 'CpuModelCompareResult', 2144 'data': [ 'incompatible', 'identical', 'superset', 'subset' ] } 2145 2146## 2147# @CpuModelCompareInfo: 2148# 2149# The result of a CPU model comparison. 2150# 2151# @result: The result of the compare operation. 2152# @responsible-properties: List of properties that led to the comparison result 2153# not being identical. 2154# 2155# @responsible-properties is a list of QOM property names that led to 2156# both CPUs not being detected as identical. For identical models, this 2157# list is empty. 2158# If a QOM property is read-only, that means there's no known way to make the 2159# CPU models identical. If the special property name "type" is included, the 2160# models are by definition not identical and cannot be made identical. 2161# 2162# Since: 2.8.0 2163## 2164{ 'struct': 'CpuModelCompareInfo', 2165 'data': {'result': 'CpuModelCompareResult', 2166 'responsible-properties': ['str'] 2167 } 2168} 2169 2170## 2171# @query-cpu-model-comparison: 2172# 2173# Compares two CPU models, returning how they compare in a specific 2174# configuration. The results indicates how both models compare regarding 2175# runnability. This result can be used by tooling to make decisions if a 2176# certain CPU model will run in a certain configuration or if a compatible 2177# CPU model has to be created by baselining. 2178# 2179# Usually, a CPU model is compared against the maximum possible CPU model 2180# of a certain configuration (e.g. the "host" model for KVM). If that CPU 2181# model is identical or a subset, it will run in that configuration. 2182# 2183# The result returned by this command may be affected by: 2184# 2185# * QEMU version: CPU models may look different depending on the QEMU version. 2186# (Except for CPU models reported as "static" in query-cpu-definitions.) 2187# * machine-type: CPU model may look different depending on the machine-type. 2188# (Except for CPU models reported as "static" in query-cpu-definitions.) 2189# * machine options (including accelerator): in some architectures, CPU models 2190# may look different depending on machine and accelerator options. (Except for 2191# CPU models reported as "static" in query-cpu-definitions.) 2192# * "-cpu" arguments and global properties: arguments to the -cpu option and 2193# global properties may affect expansion of CPU models. Using 2194# query-cpu-model-expansion while using these is not advised. 2195# 2196# Some architectures may not support comparing CPU models. s390x supports 2197# comparing CPU models. 2198# 2199# Returns: a CpuModelBaselineInfo. Returns an error if comparing CPU models is 2200# not supported, if a model cannot be used, if a model contains 2201# an unknown cpu definition name, unknown properties or properties 2202# with wrong types. 2203# 2204# Since: 2.8.0 2205## 2206{ 'command': 'query-cpu-model-comparison', 2207 'data': { 'modela': 'CpuModelInfo', 'modelb': 'CpuModelInfo' }, 2208 'returns': 'CpuModelCompareInfo' } 2209 2210## 2211# @CpuModelBaselineInfo: 2212# 2213# The result of a CPU model baseline. 2214# 2215# @model: the baselined CpuModelInfo. 2216# 2217# Since: 2.8.0 2218## 2219{ 'struct': 'CpuModelBaselineInfo', 2220 'data': { 'model': 'CpuModelInfo' } } 2221 2222## 2223# @query-cpu-model-baseline: 2224# 2225# Baseline two CPU models, creating a compatible third model. The created 2226# model will always be a static, migration-safe CPU model (see "static" 2227# CPU model expansion for details). 2228# 2229# This interface can be used by tooling to create a compatible CPU model out 2230# two CPU models. The created CPU model will be identical to or a subset of 2231# both CPU models when comparing them. Therefore, the created CPU model is 2232# guaranteed to run where the given CPU models run. 2233# 2234# The result returned by this command may be affected by: 2235# 2236# * QEMU version: CPU models may look different depending on the QEMU version. 2237# (Except for CPU models reported as "static" in query-cpu-definitions.) 2238# * machine-type: CPU model may look different depending on the machine-type. 2239# (Except for CPU models reported as "static" in query-cpu-definitions.) 2240# * machine options (including accelerator): in some architectures, CPU models 2241# may look different depending on machine and accelerator options. (Except for 2242# CPU models reported as "static" in query-cpu-definitions.) 2243# * "-cpu" arguments and global properties: arguments to the -cpu option and 2244# global properties may affect expansion of CPU models. Using 2245# query-cpu-model-expansion while using these is not advised. 2246# 2247# Some architectures may not support baselining CPU models. s390x supports 2248# baselining CPU models. 2249# 2250# Returns: a CpuModelBaselineInfo. Returns an error if baselining CPU models is 2251# not supported, if a model cannot be used, if a model contains 2252# an unknown cpu definition name, unknown properties or properties 2253# with wrong types. 2254# 2255# Since: 2.8.0 2256## 2257{ 'command': 'query-cpu-model-baseline', 2258 'data': { 'modela': 'CpuModelInfo', 2259 'modelb': 'CpuModelInfo' }, 2260 'returns': 'CpuModelBaselineInfo' } 2261 2262## 2263# @AddfdInfo: 2264# 2265# Information about a file descriptor that was added to an fd set. 2266# 2267# @fdset-id: The ID of the fd set that @fd was added to. 2268# 2269# @fd: The file descriptor that was received via SCM rights and 2270# added to the fd set. 2271# 2272# Since: 1.2.0 2273## 2274{ 'struct': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} } 2275 2276## 2277# @add-fd: 2278# 2279# Add a file descriptor, that was passed via SCM rights, to an fd set. 2280# 2281# @fdset-id: The ID of the fd set to add the file descriptor to. 2282# 2283# @opaque: A free-form string that can be used to describe the fd. 2284# 2285# Returns: @AddfdInfo on success 2286# 2287# If file descriptor was not received, FdNotSupplied 2288# 2289# If @fdset-id is a negative value, InvalidParameterValue 2290# 2291# Notes: The list of fd sets is shared by all monitor connections. 2292# 2293# If @fdset-id is not specified, a new fd set will be created. 2294# 2295# Since: 1.2.0 2296# 2297# Example: 2298# 2299# -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } } 2300# <- { "return": { "fdset-id": 1, "fd": 3 } } 2301# 2302## 2303{ 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'}, 2304 'returns': 'AddfdInfo' } 2305 2306## 2307# @remove-fd: 2308# 2309# Remove a file descriptor from an fd set. 2310# 2311# @fdset-id: The ID of the fd set that the file descriptor belongs to. 2312# 2313# @fd: The file descriptor that is to be removed. 2314# 2315# Returns: Nothing on success 2316# If @fdset-id or @fd is not found, FdNotFound 2317# 2318# Since: 1.2.0 2319# 2320# Notes: The list of fd sets is shared by all monitor connections. 2321# 2322# If @fd is not specified, all file descriptors in @fdset-id 2323# will be removed. 2324# 2325# Example: 2326# 2327# -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } } 2328# <- { "return": {} } 2329# 2330## 2331{ 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} } 2332 2333## 2334# @FdsetFdInfo: 2335# 2336# Information about a file descriptor that belongs to an fd set. 2337# 2338# @fd: The file descriptor value. 2339# 2340# @opaque: A free-form string that can be used to describe the fd. 2341# 2342# Since: 1.2.0 2343## 2344{ 'struct': 'FdsetFdInfo', 2345 'data': {'fd': 'int', '*opaque': 'str'} } 2346 2347## 2348# @FdsetInfo: 2349# 2350# Information about an fd set. 2351# 2352# @fdset-id: The ID of the fd set. 2353# 2354# @fds: A list of file descriptors that belong to this fd set. 2355# 2356# Since: 1.2.0 2357## 2358{ 'struct': 'FdsetInfo', 2359 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} } 2360 2361## 2362# @query-fdsets: 2363# 2364# Return information describing all fd sets. 2365# 2366# Returns: A list of @FdsetInfo 2367# 2368# Since: 1.2.0 2369# 2370# Note: The list of fd sets is shared by all monitor connections. 2371# 2372# Example: 2373# 2374# -> { "execute": "query-fdsets" } 2375# <- { "return": [ 2376# { 2377# "fds": [ 2378# { 2379# "fd": 30, 2380# "opaque": "rdonly:/path/to/file" 2381# }, 2382# { 2383# "fd": 24, 2384# "opaque": "rdwr:/path/to/file" 2385# } 2386# ], 2387# "fdset-id": 1 2388# }, 2389# { 2390# "fds": [ 2391# { 2392# "fd": 28 2393# }, 2394# { 2395# "fd": 29 2396# } 2397# ], 2398# "fdset-id": 0 2399# } 2400# ] 2401# } 2402# 2403## 2404{ 'command': 'query-fdsets', 'returns': ['FdsetInfo'] } 2405 2406## 2407# @TargetInfo: 2408# 2409# Information describing the QEMU target. 2410# 2411# @arch: the target architecture (eg "x86_64", "i386", etc) 2412# 2413# Since: 1.2.0 2414## 2415{ 'struct': 'TargetInfo', 2416 'data': { 'arch': 'str' } } 2417 2418## 2419# @query-target: 2420# 2421# Return information about the target for this QEMU 2422# 2423# Returns: TargetInfo 2424# 2425# Since: 1.2.0 2426## 2427{ 'command': 'query-target', 'returns': 'TargetInfo' } 2428 2429## 2430# @AcpiTableOptions: 2431# 2432# Specify an ACPI table on the command line to load. 2433# 2434# At most one of @file and @data can be specified. The list of files specified 2435# by any one of them is loaded and concatenated in order. If both are omitted, 2436# @data is implied. 2437# 2438# Other fields / optargs can be used to override fields of the generic ACPI 2439# table header; refer to the ACPI specification 5.0, section 5.2.6 System 2440# Description Table Header. If a header field is not overridden, then the 2441# corresponding value from the concatenated blob is used (in case of @file), or 2442# it is filled in with a hard-coded value (in case of @data). 2443# 2444# String fields are copied into the matching ACPI member from lowest address 2445# upwards, and silently truncated / NUL-padded to length. 2446# 2447# @sig: table signature / identifier (4 bytes) 2448# 2449# @rev: table revision number (dependent on signature, 1 byte) 2450# 2451# @oem_id: OEM identifier (6 bytes) 2452# 2453# @oem_table_id: OEM table identifier (8 bytes) 2454# 2455# @oem_rev: OEM-supplied revision number (4 bytes) 2456# 2457# @asl_compiler_id: identifier of the utility that created the table 2458# (4 bytes) 2459# 2460# @asl_compiler_rev: revision number of the utility that created the 2461# table (4 bytes) 2462# 2463# @file: colon (:) separated list of pathnames to load and 2464# concatenate as table data. The resultant binary blob is expected to 2465# have an ACPI table header. At least one file is required. This field 2466# excludes @data. 2467# 2468# @data: colon (:) separated list of pathnames to load and 2469# concatenate as table data. The resultant binary blob must not have an 2470# ACPI table header. At least one file is required. This field excludes 2471# @file. 2472# 2473# Since: 1.5 2474## 2475{ 'struct': 'AcpiTableOptions', 2476 'data': { 2477 '*sig': 'str', 2478 '*rev': 'uint8', 2479 '*oem_id': 'str', 2480 '*oem_table_id': 'str', 2481 '*oem_rev': 'uint32', 2482 '*asl_compiler_id': 'str', 2483 '*asl_compiler_rev': 'uint32', 2484 '*file': 'str', 2485 '*data': 'str' }} 2486 2487## 2488# @CommandLineParameterType: 2489# 2490# Possible types for an option parameter. 2491# 2492# @string: accepts a character string 2493# 2494# @boolean: accepts "on" or "off" 2495# 2496# @number: accepts a number 2497# 2498# @size: accepts a number followed by an optional suffix (K)ilo, 2499# (M)ega, (G)iga, (T)era 2500# 2501# Since: 1.5 2502## 2503{ 'enum': 'CommandLineParameterType', 2504 'data': ['string', 'boolean', 'number', 'size'] } 2505 2506## 2507# @CommandLineParameterInfo: 2508# 2509# Details about a single parameter of a command line option. 2510# 2511# @name: parameter name 2512# 2513# @type: parameter @CommandLineParameterType 2514# 2515# @help: human readable text string, not suitable for parsing. 2516# 2517# @default: default value string (since 2.1) 2518# 2519# Since: 1.5 2520## 2521{ 'struct': 'CommandLineParameterInfo', 2522 'data': { 'name': 'str', 2523 'type': 'CommandLineParameterType', 2524 '*help': 'str', 2525 '*default': 'str' } } 2526 2527## 2528# @CommandLineOptionInfo: 2529# 2530# Details about a command line option, including its list of parameter details 2531# 2532# @option: option name 2533# 2534# @parameters: an array of @CommandLineParameterInfo 2535# 2536# Since: 1.5 2537## 2538{ 'struct': 'CommandLineOptionInfo', 2539 'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } } 2540 2541## 2542# @query-command-line-options: 2543# 2544# Query command line option schema. 2545# 2546# @option: option name 2547# 2548# Returns: list of @CommandLineOptionInfo for all options (or for the given 2549# @option). Returns an error if the given @option doesn't exist. 2550# 2551# Since: 1.5 2552# 2553# Example: 2554# 2555# -> { "execute": "query-command-line-options", 2556# "arguments": { "option": "option-rom" } } 2557# <- { "return": [ 2558# { 2559# "parameters": [ 2560# { 2561# "name": "romfile", 2562# "type": "string" 2563# }, 2564# { 2565# "name": "bootindex", 2566# "type": "number" 2567# } 2568# ], 2569# "option": "option-rom" 2570# } 2571# ] 2572# } 2573# 2574## 2575{'command': 'query-command-line-options', 'data': { '*option': 'str' }, 2576 'returns': ['CommandLineOptionInfo'] } 2577 2578## 2579# @X86CPURegister32: 2580# 2581# A X86 32-bit register 2582# 2583# Since: 1.5 2584## 2585{ 'enum': 'X86CPURegister32', 2586 'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] } 2587 2588## 2589# @X86CPUFeatureWordInfo: 2590# 2591# Information about a X86 CPU feature word 2592# 2593# @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word 2594# 2595# @cpuid-input-ecx: Input ECX value for CPUID instruction for that 2596# feature word 2597# 2598# @cpuid-register: Output register containing the feature bits 2599# 2600# @features: value of output register, containing the feature bits 2601# 2602# Since: 1.5 2603## 2604{ 'struct': 'X86CPUFeatureWordInfo', 2605 'data': { 'cpuid-input-eax': 'int', 2606 '*cpuid-input-ecx': 'int', 2607 'cpuid-register': 'X86CPURegister32', 2608 'features': 'int' } } 2609 2610## 2611# @DummyForceArrays: 2612# 2613# Not used by QMP; hack to let us use X86CPUFeatureWordInfoList internally 2614# 2615# Since: 2.5 2616## 2617{ 'struct': 'DummyForceArrays', 2618 'data': { 'unused': ['X86CPUFeatureWordInfo'] } } 2619 2620 2621## 2622# @NumaOptionsType: 2623# 2624# @node: NUMA nodes configuration 2625# 2626# @dist: NUMA distance configuration (since 2.10) 2627# 2628# @cpu: property based CPU(s) to node mapping (Since: 2.10) 2629# 2630# Since: 2.1 2631## 2632{ 'enum': 'NumaOptionsType', 2633 'data': [ 'node', 'dist', 'cpu' ] } 2634 2635## 2636# @NumaOptions: 2637# 2638# A discriminated record of NUMA options. (for OptsVisitor) 2639# 2640# Since: 2.1 2641## 2642{ 'union': 'NumaOptions', 2643 'base': { 'type': 'NumaOptionsType' }, 2644 'discriminator': 'type', 2645 'data': { 2646 'node': 'NumaNodeOptions', 2647 'dist': 'NumaDistOptions', 2648 'cpu': 'NumaCpuOptions' }} 2649 2650## 2651# @NumaNodeOptions: 2652# 2653# Create a guest NUMA node. (for OptsVisitor) 2654# 2655# @nodeid: NUMA node ID (increase by 1 from 0 if omitted) 2656# 2657# @cpus: VCPUs belonging to this node (assign VCPUS round-robin 2658# if omitted) 2659# 2660# @mem: memory size of this node; mutually exclusive with @memdev. 2661# Equally divide total memory among nodes if both @mem and @memdev are 2662# omitted. 2663# 2664# @memdev: memory backend object. If specified for one node, 2665# it must be specified for all nodes. 2666# 2667# Since: 2.1 2668## 2669{ 'struct': 'NumaNodeOptions', 2670 'data': { 2671 '*nodeid': 'uint16', 2672 '*cpus': ['uint16'], 2673 '*mem': 'size', 2674 '*memdev': 'str' }} 2675 2676## 2677# @NumaDistOptions: 2678# 2679# Set the distance between 2 NUMA nodes. 2680# 2681# @src: source NUMA node. 2682# 2683# @dst: destination NUMA node. 2684# 2685# @val: NUMA distance from source node to destination node. 2686# When a node is unreachable from another node, set the distance 2687# between them to 255. 2688# 2689# Since: 2.10 2690## 2691{ 'struct': 'NumaDistOptions', 2692 'data': { 2693 'src': 'uint16', 2694 'dst': 'uint16', 2695 'val': 'uint8' }} 2696 2697## 2698# @NumaCpuOptions: 2699# 2700# Option "-numa cpu" overrides default cpu to node mapping. 2701# It accepts the same set of cpu properties as returned by 2702# query-hotpluggable-cpus[].props, where node-id could be used to 2703# override default node mapping. 2704# 2705# Since: 2.10 2706## 2707{ 'struct': 'NumaCpuOptions', 2708 'base': 'CpuInstanceProperties', 2709 'data' : {} } 2710 2711## 2712# @HostMemPolicy: 2713# 2714# Host memory policy types 2715# 2716# @default: restore default policy, remove any nondefault policy 2717# 2718# @preferred: set the preferred host nodes for allocation 2719# 2720# @bind: a strict policy that restricts memory allocation to the 2721# host nodes specified 2722# 2723# @interleave: memory allocations are interleaved across the set 2724# of host nodes specified 2725# 2726# Since: 2.1 2727## 2728{ 'enum': 'HostMemPolicy', 2729 'data': [ 'default', 'preferred', 'bind', 'interleave' ] } 2730 2731## 2732# @Memdev: 2733# 2734# Information about memory backend 2735# 2736# @id: backend's ID if backend has 'id' property (since 2.9) 2737# 2738# @size: memory backend size 2739# 2740# @merge: enables or disables memory merge support 2741# 2742# @dump: includes memory backend's memory in a core dump or not 2743# 2744# @prealloc: enables or disables memory preallocation 2745# 2746# @host-nodes: host nodes for its memory policy 2747# 2748# @policy: memory policy of memory backend 2749# 2750# Since: 2.1 2751## 2752{ 'struct': 'Memdev', 2753 'data': { 2754 '*id': 'str', 2755 'size': 'size', 2756 'merge': 'bool', 2757 'dump': 'bool', 2758 'prealloc': 'bool', 2759 'host-nodes': ['uint16'], 2760 'policy': 'HostMemPolicy' }} 2761 2762## 2763# @query-memdev: 2764# 2765# Returns information for all memory backends. 2766# 2767# Returns: a list of @Memdev. 2768# 2769# Since: 2.1 2770# 2771# Example: 2772# 2773# -> { "execute": "query-memdev" } 2774# <- { "return": [ 2775# { 2776# "id": "mem1", 2777# "size": 536870912, 2778# "merge": false, 2779# "dump": true, 2780# "prealloc": false, 2781# "host-nodes": [0, 1], 2782# "policy": "bind" 2783# }, 2784# { 2785# "size": 536870912, 2786# "merge": false, 2787# "dump": true, 2788# "prealloc": true, 2789# "host-nodes": [2, 3], 2790# "policy": "preferred" 2791# } 2792# ] 2793# } 2794# 2795## 2796{ 'command': 'query-memdev', 'returns': ['Memdev'] } 2797 2798## 2799# @PCDIMMDeviceInfo: 2800# 2801# PCDIMMDevice state information 2802# 2803# @id: device's ID 2804# 2805# @addr: physical address, where device is mapped 2806# 2807# @size: size of memory that the device provides 2808# 2809# @slot: slot number at which device is plugged in 2810# 2811# @node: NUMA node number where device is plugged in 2812# 2813# @memdev: memory backend linked with device 2814# 2815# @hotplugged: true if device was hotplugged 2816# 2817# @hotpluggable: true if device if could be added/removed while machine is running 2818# 2819# Since: 2.1 2820## 2821{ 'struct': 'PCDIMMDeviceInfo', 2822 'data': { '*id': 'str', 2823 'addr': 'int', 2824 'size': 'int', 2825 'slot': 'int', 2826 'node': 'int', 2827 'memdev': 'str', 2828 'hotplugged': 'bool', 2829 'hotpluggable': 'bool' 2830 } 2831} 2832 2833## 2834# @MemoryDeviceInfo: 2835# 2836# Union containing information about a memory device 2837# 2838# Since: 2.1 2839## 2840{ 'union': 'MemoryDeviceInfo', 'data': {'dimm': 'PCDIMMDeviceInfo'} } 2841 2842## 2843# @query-memory-devices: 2844# 2845# Lists available memory devices and their state 2846# 2847# Since: 2.1 2848# 2849# Example: 2850# 2851# -> { "execute": "query-memory-devices" } 2852# <- { "return": [ { "data": 2853# { "addr": 5368709120, 2854# "hotpluggable": true, 2855# "hotplugged": true, 2856# "id": "d1", 2857# "memdev": "/objects/memX", 2858# "node": 0, 2859# "size": 1073741824, 2860# "slot": 0}, 2861# "type": "dimm" 2862# } ] } 2863# 2864## 2865{ 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] } 2866 2867## 2868# @MEM_UNPLUG_ERROR: 2869# 2870# Emitted when memory hot unplug error occurs. 2871# 2872# @device: device name 2873# 2874# @msg: Informative message 2875# 2876# Since: 2.4 2877# 2878# Example: 2879# 2880# <- { "event": "MEM_UNPLUG_ERROR" 2881# "data": { "device": "dimm1", 2882# "msg": "acpi: device unplug for unsupported device" 2883# }, 2884# "timestamp": { "seconds": 1265044230, "microseconds": 450486 } } 2885# 2886## 2887{ 'event': 'MEM_UNPLUG_ERROR', 2888 'data': { 'device': 'str', 'msg': 'str' } } 2889 2890## 2891# @ACPISlotType: 2892# 2893# @DIMM: memory slot 2894# @CPU: logical CPU slot (since 2.7) 2895## 2896{ 'enum': 'ACPISlotType', 'data': [ 'DIMM', 'CPU' ] } 2897 2898## 2899# @ACPIOSTInfo: 2900# 2901# OSPM Status Indication for a device 2902# For description of possible values of @source and @status fields 2903# see "_OST (OSPM Status Indication)" chapter of ACPI5.0 spec. 2904# 2905# @device: device ID associated with slot 2906# 2907# @slot: slot ID, unique per slot of a given @slot-type 2908# 2909# @slot-type: type of the slot 2910# 2911# @source: an integer containing the source event 2912# 2913# @status: an integer containing the status code 2914# 2915# Since: 2.1 2916## 2917{ 'struct': 'ACPIOSTInfo', 2918 'data' : { '*device': 'str', 2919 'slot': 'str', 2920 'slot-type': 'ACPISlotType', 2921 'source': 'int', 2922 'status': 'int' } } 2923 2924## 2925# @query-acpi-ospm-status: 2926# 2927# Return a list of ACPIOSTInfo for devices that support status 2928# reporting via ACPI _OST method. 2929# 2930# Since: 2.1 2931# 2932# Example: 2933# 2934# -> { "execute": "query-acpi-ospm-status" } 2935# <- { "return": [ { "device": "d1", "slot": "0", "slot-type": "DIMM", "source": 1, "status": 0}, 2936# { "slot": "1", "slot-type": "DIMM", "source": 0, "status": 0}, 2937# { "slot": "2", "slot-type": "DIMM", "source": 0, "status": 0}, 2938# { "slot": "3", "slot-type": "DIMM", "source": 0, "status": 0} 2939# ]} 2940# 2941## 2942{ 'command': 'query-acpi-ospm-status', 'returns': ['ACPIOSTInfo'] } 2943 2944## 2945# @ACPI_DEVICE_OST: 2946# 2947# Emitted when guest executes ACPI _OST method. 2948# 2949# @info: OSPM Status Indication 2950# 2951# Since: 2.1 2952# 2953# Example: 2954# 2955# <- { "event": "ACPI_DEVICE_OST", 2956# "data": { "device": "d1", "slot": "0", 2957# "slot-type": "DIMM", "source": 1, "status": 0 } } 2958# 2959## 2960{ 'event': 'ACPI_DEVICE_OST', 2961 'data': { 'info': 'ACPIOSTInfo' } } 2962 2963## 2964# @rtc-reset-reinjection: 2965# 2966# This command will reset the RTC interrupt reinjection backlog. 2967# Can be used if another mechanism to synchronize guest time 2968# is in effect, for example QEMU guest agent's guest-set-time 2969# command. 2970# 2971# Since: 2.1 2972# 2973# Example: 2974# 2975# -> { "execute": "rtc-reset-reinjection" } 2976# <- { "return": {} } 2977# 2978## 2979{ 'command': 'rtc-reset-reinjection' } 2980 2981## 2982# @RTC_CHANGE: 2983# 2984# Emitted when the guest changes the RTC time. 2985# 2986# @offset: offset between base RTC clock (as specified by -rtc base), and 2987# new RTC clock value 2988# 2989# Note: This event is rate-limited. 2990# 2991# Since: 0.13.0 2992# 2993# Example: 2994# 2995# <- { "event": "RTC_CHANGE", 2996# "data": { "offset": 78 }, 2997# "timestamp": { "seconds": 1267020223, "microseconds": 435656 } } 2998# 2999## 3000{ 'event': 'RTC_CHANGE', 3001 'data': { 'offset': 'int' } } 3002 3003## 3004# @ReplayMode: 3005# 3006# Mode of the replay subsystem. 3007# 3008# @none: normal execution mode. Replay or record are not enabled. 3009# 3010# @record: record mode. All non-deterministic data is written into the 3011# replay log. 3012# 3013# @play: replay mode. Non-deterministic data required for system execution 3014# is read from the log. 3015# 3016# Since: 2.5 3017## 3018{ 'enum': 'ReplayMode', 3019 'data': [ 'none', 'record', 'play' ] } 3020 3021## 3022# @xen-load-devices-state: 3023# 3024# Load the state of all devices from file. The RAM and the block devices 3025# of the VM are not loaded by this command. 3026# 3027# @filename: the file to load the state of the devices from as binary 3028# data. See xen-save-devices-state.txt for a description of the binary 3029# format. 3030# 3031# Since: 2.7 3032# 3033# Example: 3034# 3035# -> { "execute": "xen-load-devices-state", 3036# "arguments": { "filename": "/tmp/resume" } } 3037# <- { "return": {} } 3038# 3039## 3040{ 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} } 3041 3042## 3043# @GICCapability: 3044# 3045# The struct describes capability for a specific GIC (Generic 3046# Interrupt Controller) version. These bits are not only decided by 3047# QEMU/KVM software version, but also decided by the hardware that 3048# the program is running upon. 3049# 3050# @version: version of GIC to be described. Currently, only 2 and 3 3051# are supported. 3052# 3053# @emulated: whether current QEMU/hardware supports emulated GIC 3054# device in user space. 3055# 3056# @kernel: whether current QEMU/hardware supports hardware 3057# accelerated GIC device in kernel. 3058# 3059# Since: 2.6 3060## 3061{ 'struct': 'GICCapability', 3062 'data': { 'version': 'int', 3063 'emulated': 'bool', 3064 'kernel': 'bool' } } 3065 3066## 3067# @query-gic-capabilities: 3068# 3069# This command is ARM-only. It will return a list of GICCapability 3070# objects that describe its capability bits. 3071# 3072# Returns: a list of GICCapability objects. 3073# 3074# Since: 2.6 3075# 3076# Example: 3077# 3078# -> { "execute": "query-gic-capabilities" } 3079# <- { "return": [{ "version": 2, "emulated": true, "kernel": false }, 3080# { "version": 3, "emulated": false, "kernel": true } ] } 3081# 3082## 3083{ 'command': 'query-gic-capabilities', 'returns': ['GICCapability'] } 3084 3085## 3086# @CpuInstanceProperties: 3087# 3088# List of properties to be used for hotplugging a CPU instance, 3089# it should be passed by management with device_add command when 3090# a CPU is being hotplugged. 3091# 3092# @node-id: NUMA node ID the CPU belongs to 3093# @socket-id: socket number within node/board the CPU belongs to 3094# @core-id: core number within socket the CPU belongs to 3095# @thread-id: thread number within core the CPU belongs to 3096# 3097# Note: currently there are 4 properties that could be present 3098# but management should be prepared to pass through other 3099# properties with device_add command to allow for future 3100# interface extension. This also requires the filed names to be kept in 3101# sync with the properties passed to -device/device_add. 3102# 3103# Since: 2.7 3104## 3105{ 'struct': 'CpuInstanceProperties', 3106 'data': { '*node-id': 'int', 3107 '*socket-id': 'int', 3108 '*core-id': 'int', 3109 '*thread-id': 'int' 3110 } 3111} 3112 3113## 3114# @HotpluggableCPU: 3115# 3116# @type: CPU object type for usage with device_add command 3117# @props: list of properties to be used for hotplugging CPU 3118# @vcpus-count: number of logical VCPU threads @HotpluggableCPU provides 3119# @qom-path: link to existing CPU object if CPU is present or 3120# omitted if CPU is not present. 3121# 3122# Since: 2.7 3123## 3124{ 'struct': 'HotpluggableCPU', 3125 'data': { 'type': 'str', 3126 'vcpus-count': 'int', 3127 'props': 'CpuInstanceProperties', 3128 '*qom-path': 'str' 3129 } 3130} 3131 3132## 3133# @query-hotpluggable-cpus: 3134# 3135# Returns: a list of HotpluggableCPU objects. 3136# 3137# Since: 2.7 3138# 3139# Example: 3140# 3141# For pseries machine type started with -smp 2,cores=2,maxcpus=4 -cpu POWER8: 3142# 3143# -> { "execute": "query-hotpluggable-cpus" } 3144# <- {"return": [ 3145# { "props": { "core": 8 }, "type": "POWER8-spapr-cpu-core", 3146# "vcpus-count": 1 }, 3147# { "props": { "core": 0 }, "type": "POWER8-spapr-cpu-core", 3148# "vcpus-count": 1, "qom-path": "/machine/unattached/device[0]"} 3149# ]}' 3150# 3151# For pc machine type started with -smp 1,maxcpus=2: 3152# 3153# -> { "execute": "query-hotpluggable-cpus" } 3154# <- {"return": [ 3155# { 3156# "type": "qemu64-x86_64-cpu", "vcpus-count": 1, 3157# "props": {"core-id": 0, "socket-id": 1, "thread-id": 0} 3158# }, 3159# { 3160# "qom-path": "/machine/unattached/device[0]", 3161# "type": "qemu64-x86_64-cpu", "vcpus-count": 1, 3162# "props": {"core-id": 0, "socket-id": 0, "thread-id": 0} 3163# } 3164# ]} 3165# 3166# For s390x-virtio-ccw machine type started with -smp 1,maxcpus=2 -cpu qemu 3167# (Since: 2.11): 3168# 3169# -> { "execute": "query-hotpluggable-cpus" } 3170# <- {"return": [ 3171# { 3172# "type": "qemu-s390x-cpu", "vcpus-count": 1, 3173# "props": { "core-id": 1 } 3174# }, 3175# { 3176# "qom-path": "/machine/unattached/device[0]", 3177# "type": "qemu-s390x-cpu", "vcpus-count": 1, 3178# "props": { "core-id": 0 } 3179# } 3180# ]} 3181# 3182## 3183{ 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU'] } 3184 3185## 3186# @GuidInfo: 3187# 3188# GUID information. 3189# 3190# @guid: the globally unique identifier 3191# 3192# Since: 2.9 3193## 3194{ 'struct': 'GuidInfo', 'data': {'guid': 'str'} } 3195 3196## 3197# @query-vm-generation-id: 3198# 3199# Show Virtual Machine Generation ID 3200# 3201# Since: 2.9 3202## 3203{ 'command': 'query-vm-generation-id', 'returns': 'GuidInfo' } 3204