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