1# -*- Mode: Python -*- 2# 3# This work is licensed under the terms of the GNU GPL, version 2 or later. 4# See the COPYING file in the top-level directory. 5 6## 7# = Machines 8## 9 10## 11# @SysEmuTarget: 12# 13# The comprehensive enumeration of QEMU system emulation ("softmmu") 14# targets. Run "./configure --help" in the project root directory, and 15# look for the *-softmmu targets near the "--target-list" option. The 16# individual target constants are not documented here, for the time 17# being. 18# 19# Notes: The resulting QMP strings can be appended to the "qemu-system-" 20# prefix to produce the corresponding QEMU executable name. This 21# is true even for "qemu-system-x86_64". 22# 23# Since: 3.0 24## 25{ 'enum' : 'SysEmuTarget', 26 'data' : [ 'aarch64', 'alpha', 'arm', 'cris', 'hppa', 'i386', 'lm32', 27 'm68k', 'microblaze', 'microblazeel', 'mips', 'mips64', 28 'mips64el', 'mipsel', 'moxie', 'nios2', 'or1k', 'ppc', 29 'ppc64', 'riscv32', 'riscv64', 's390x', 'sh4', 30 'sh4eb', 'sparc', 'sparc64', 'tricore', 'unicore32', 31 'x86_64', 'xtensa', 'xtensaeb' ] } 32 33## 34# @CpuInfoArch: 35# 36# An enumeration of cpu types that enable additional information during 37# @query-cpus and @query-cpus-fast. 38# 39# @s390: since 2.12 40# 41# @riscv: since 2.12 42# 43# Since: 2.6 44## 45{ 'enum': 'CpuInfoArch', 46 'data': ['x86', 'sparc', 'ppc', 'mips', 'tricore', 's390', 'riscv', 'other' ] } 47 48## 49# @CpuInfo: 50# 51# Information about a virtual CPU 52# 53# @CPU: the index of the virtual CPU 54# 55# @current: this only exists for backwards compatibility and should be ignored 56# 57# @halted: true if the virtual CPU is in the halt state. Halt usually refers 58# to a processor specific low power mode. 59# 60# @qom_path: path to the CPU object in the QOM tree (since 2.4) 61# 62# @thread_id: ID of the underlying host thread 63# 64# @props: properties describing to which node/socket/core/thread 65# virtual CPU belongs to, provided if supported by board (since 2.10) 66# 67# @arch: architecture of the cpu, which determines which additional fields 68# will be listed (since 2.6) 69# 70# Since: 0.14.0 71# 72# Notes: @halted is a transient state that changes frequently. By the time the 73# data is sent to the client, the guest may no longer be halted. 74## 75{ 'union': 'CpuInfo', 76 'base': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', 77 'qom_path': 'str', 'thread_id': 'int', 78 '*props': 'CpuInstanceProperties', 'arch': 'CpuInfoArch' }, 79 'discriminator': 'arch', 80 'data': { 'x86': 'CpuInfoX86', 81 'sparc': 'CpuInfoSPARC', 82 'ppc': 'CpuInfoPPC', 83 'mips': 'CpuInfoMIPS', 84 'tricore': 'CpuInfoTricore', 85 's390': 'CpuInfoS390', 86 'riscv': 'CpuInfoRISCV' } } 87 88## 89# @CpuInfoX86: 90# 91# Additional information about a virtual i386 or x86_64 CPU 92# 93# @pc: the 64-bit instruction pointer 94# 95# Since: 2.6 96## 97{ 'struct': 'CpuInfoX86', 'data': { 'pc': 'int' } } 98 99## 100# @CpuInfoSPARC: 101# 102# Additional information about a virtual SPARC CPU 103# 104# @pc: the PC component of the instruction pointer 105# 106# @npc: the NPC component of the instruction pointer 107# 108# Since: 2.6 109## 110{ 'struct': 'CpuInfoSPARC', 'data': { 'pc': 'int', 'npc': 'int' } } 111 112## 113# @CpuInfoPPC: 114# 115# Additional information about a virtual PPC CPU 116# 117# @nip: the instruction pointer 118# 119# Since: 2.6 120## 121{ 'struct': 'CpuInfoPPC', 'data': { 'nip': 'int' } } 122 123## 124# @CpuInfoMIPS: 125# 126# Additional information about a virtual MIPS CPU 127# 128# @PC: the instruction pointer 129# 130# Since: 2.6 131## 132{ 'struct': 'CpuInfoMIPS', 'data': { 'PC': 'int' } } 133 134## 135# @CpuInfoTricore: 136# 137# Additional information about a virtual Tricore CPU 138# 139# @PC: the instruction pointer 140# 141# Since: 2.6 142## 143{ 'struct': 'CpuInfoTricore', 'data': { 'PC': 'int' } } 144 145## 146# @CpuInfoRISCV: 147# 148# Additional information about a virtual RISCV CPU 149# 150# @pc: the instruction pointer 151# 152# Since 2.12 153## 154{ 'struct': 'CpuInfoRISCV', 'data': { 'pc': 'int' } } 155 156## 157# @CpuS390State: 158# 159# An enumeration of cpu states that can be assumed by a virtual 160# S390 CPU 161# 162# Since: 2.12 163## 164{ 'enum': 'CpuS390State', 165 'prefix': 'S390_CPU_STATE', 166 'data': [ 'uninitialized', 'stopped', 'check-stop', 'operating', 'load' ] } 167 168## 169# @CpuInfoS390: 170# 171# Additional information about a virtual S390 CPU 172# 173# @cpu-state: the virtual CPU's state 174# 175# Since: 2.12 176## 177{ 'struct': 'CpuInfoS390', 'data': { 'cpu-state': 'CpuS390State' } } 178 179## 180# @query-cpus: 181# 182# Returns a list of information about each virtual CPU. 183# 184# This command causes vCPU threads to exit to userspace, which causes 185# a small interruption to guest CPU execution. This will have a negative 186# impact on realtime guests and other latency sensitive guest workloads. 187# It is recommended to use @query-cpus-fast instead of this command to 188# avoid the vCPU interruption. 189# 190# Returns: a list of @CpuInfo for each virtual CPU 191# 192# Since: 0.14.0 193# 194# Example: 195# 196# -> { "execute": "query-cpus" } 197# <- { "return": [ 198# { 199# "CPU":0, 200# "current":true, 201# "halted":false, 202# "qom_path":"/machine/unattached/device[0]", 203# "arch":"x86", 204# "pc":3227107138, 205# "thread_id":3134 206# }, 207# { 208# "CPU":1, 209# "current":false, 210# "halted":true, 211# "qom_path":"/machine/unattached/device[2]", 212# "arch":"x86", 213# "pc":7108165, 214# "thread_id":3135 215# } 216# ] 217# } 218# 219# Notes: This interface is deprecated (since 2.12.0), and it is strongly 220# recommended that you avoid using it. Use @query-cpus-fast to 221# obtain information about virtual CPUs. 222# 223## 224{ 'command': 'query-cpus', 'returns': ['CpuInfo'] } 225 226## 227# @CpuInfoFast: 228# 229# Information about a virtual CPU 230# 231# @cpu-index: index of the virtual CPU 232# 233# @qom-path: path to the CPU object in the QOM tree 234# 235# @thread-id: ID of the underlying host thread 236# 237# @props: properties describing to which node/socket/core/thread 238# virtual CPU belongs to, provided if supported by board 239# 240# @arch: base architecture of the cpu; deprecated since 3.0.0 in favor 241# of @target 242# 243# @target: the QEMU system emulation target, which determines which 244# additional fields will be listed (since 3.0) 245# 246# Since: 2.12 247# 248## 249{ 'union' : 'CpuInfoFast', 250 'base' : { 'cpu-index' : 'int', 251 'qom-path' : 'str', 252 'thread-id' : 'int', 253 '*props' : 'CpuInstanceProperties', 254 'arch' : 'CpuInfoArch', 255 'target' : 'SysEmuTarget' }, 256 'discriminator' : 'target', 257 'data' : { 's390x' : 'CpuInfoS390' } } 258 259## 260# @query-cpus-fast: 261# 262# Returns information about all virtual CPUs. This command does not 263# incur a performance penalty and should be used in production 264# instead of query-cpus. 265# 266# Returns: list of @CpuInfoFast 267# 268# Since: 2.12 269# 270# Example: 271# 272# -> { "execute": "query-cpus-fast" } 273# <- { "return": [ 274# { 275# "thread-id": 25627, 276# "props": { 277# "core-id": 0, 278# "thread-id": 0, 279# "socket-id": 0 280# }, 281# "qom-path": "/machine/unattached/device[0]", 282# "arch":"x86", 283# "target":"x86_64", 284# "cpu-index": 0 285# }, 286# { 287# "thread-id": 25628, 288# "props": { 289# "core-id": 0, 290# "thread-id": 0, 291# "socket-id": 1 292# }, 293# "qom-path": "/machine/unattached/device[2]", 294# "arch":"x86", 295# "target":"x86_64", 296# "cpu-index": 1 297# } 298# ] 299# } 300## 301{ 'command': 'query-cpus-fast', 'returns': [ 'CpuInfoFast' ] } 302 303## 304# @cpu-add: 305# 306# Adds CPU with specified ID. 307# 308# @id: ID of CPU to be created, valid values [0..max_cpus) 309# 310# Returns: Nothing on success 311# 312# Since: 1.5 313# 314# Note: This command is deprecated. The `device_add` command should be 315# used instead. See the `query-hotpluggable-cpus` command for 316# details. 317# 318# Example: 319# 320# -> { "execute": "cpu-add", "arguments": { "id": 2 } } 321# <- { "return": {} } 322# 323## 324{ 'command': 'cpu-add', 'data': {'id': 'int'} } 325 326## 327# @MachineInfo: 328# 329# Information describing a machine. 330# 331# @name: the name of the machine 332# 333# @alias: an alias for the machine name 334# 335# @is-default: whether the machine is default 336# 337# @cpu-max: maximum number of CPUs supported by the machine type 338# (since 1.5.0) 339# 340# @hotpluggable-cpus: cpu hotplug via -device is supported (since 2.7.0) 341# 342# @numa-mem-supported: true if '-numa node,mem' option is supported by 343# the machine type and false otherwise (since 4.1) 344# 345# @deprecated: if true, the machine type is deprecated and may be removed 346# in future versions of QEMU according to the QEMU deprecation 347# policy (since 4.1.0) 348# 349# @default-cpu-type: default CPU model typename if none is requested via 350# the -cpu argument. (since 4.2) 351# 352# Since: 1.2.0 353## 354{ 'struct': 'MachineInfo', 355 'data': { 'name': 'str', '*alias': 'str', 356 '*is-default': 'bool', 'cpu-max': 'int', 357 'hotpluggable-cpus': 'bool', 'numa-mem-supported': 'bool', 358 'deprecated': 'bool', '*default-cpu-type': 'str' } } 359 360## 361# @query-machines: 362# 363# Return a list of supported machines 364# 365# Returns: a list of MachineInfo 366# 367# Since: 1.2.0 368## 369{ 'command': 'query-machines', 'returns': ['MachineInfo'] } 370 371## 372# @CurrentMachineParams: 373# 374# Information describing the running machine parameters. 375# 376# @wakeup-suspend-support: true if the machine supports wake up from 377# suspend 378# 379# Since: 4.0 380## 381{ 'struct': 'CurrentMachineParams', 382 'data': { 'wakeup-suspend-support': 'bool'} } 383 384## 385# @query-current-machine: 386# 387# Return information on the current virtual machine. 388# 389# Returns: CurrentMachineParams 390# 391# Since: 4.0 392## 393{ 'command': 'query-current-machine', 'returns': 'CurrentMachineParams' } 394 395## 396# @TargetInfo: 397# 398# Information describing the QEMU target. 399# 400# @arch: the target architecture 401# 402# Since: 1.2.0 403## 404{ 'struct': 'TargetInfo', 405 'data': { 'arch': 'SysEmuTarget' } } 406 407## 408# @query-target: 409# 410# Return information about the target for this QEMU 411# 412# Returns: TargetInfo 413# 414# Since: 1.2.0 415## 416{ 'command': 'query-target', 'returns': 'TargetInfo' } 417 418## 419# @NumaOptionsType: 420# 421# @node: NUMA nodes configuration 422# 423# @dist: NUMA distance configuration (since 2.10) 424# 425# @cpu: property based CPU(s) to node mapping (Since: 2.10) 426# 427# @hmat-lb: memory latency and bandwidth information (Since: 5.0) 428# 429# @hmat-cache: memory side cache information (Since: 5.0) 430# 431# Since: 2.1 432## 433{ 'enum': 'NumaOptionsType', 434 'data': [ 'node', 'dist', 'cpu', 'hmat-lb', 'hmat-cache' ] } 435 436## 437# @NumaOptions: 438# 439# A discriminated record of NUMA options. (for OptsVisitor) 440# 441# Since: 2.1 442## 443{ 'union': 'NumaOptions', 444 'base': { 'type': 'NumaOptionsType' }, 445 'discriminator': 'type', 446 'data': { 447 'node': 'NumaNodeOptions', 448 'dist': 'NumaDistOptions', 449 'cpu': 'NumaCpuOptions', 450 'hmat-lb': 'NumaHmatLBOptions', 451 'hmat-cache': 'NumaHmatCacheOptions' }} 452 453## 454# @NumaNodeOptions: 455# 456# Create a guest NUMA node. (for OptsVisitor) 457# 458# @nodeid: NUMA node ID (increase by 1 from 0 if omitted) 459# 460# @cpus: VCPUs belonging to this node (assign VCPUS round-robin 461# if omitted) 462# 463# @mem: memory size of this node; mutually exclusive with @memdev. 464# Equally divide total memory among nodes if both @mem and @memdev are 465# omitted. 466# 467# @memdev: memory backend object. If specified for one node, 468# it must be specified for all nodes. 469# 470# @initiator: defined in ACPI 6.3 Chapter 5.2.27.3 Table 5-145, 471# points to the nodeid which has the memory controller 472# responsible for this NUMA node. This field provides 473# additional information as to the initiator node that 474# is closest (as in directly attached) to this node, and 475# therefore has the best performance (since 5.0) 476# 477# Since: 2.1 478## 479{ 'struct': 'NumaNodeOptions', 480 'data': { 481 '*nodeid': 'uint16', 482 '*cpus': ['uint16'], 483 '*mem': 'size', 484 '*memdev': 'str', 485 '*initiator': 'uint16' }} 486 487## 488# @NumaDistOptions: 489# 490# Set the distance between 2 NUMA nodes. 491# 492# @src: source NUMA node. 493# 494# @dst: destination NUMA node. 495# 496# @val: NUMA distance from source node to destination node. 497# When a node is unreachable from another node, set the distance 498# between them to 255. 499# 500# Since: 2.10 501## 502{ 'struct': 'NumaDistOptions', 503 'data': { 504 'src': 'uint16', 505 'dst': 'uint16', 506 'val': 'uint8' }} 507 508## 509# @X86CPURegister32: 510# 511# A X86 32-bit register 512# 513# Since: 1.5 514## 515{ 'enum': 'X86CPURegister32', 516 'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] } 517 518## 519# @X86CPUFeatureWordInfo: 520# 521# Information about a X86 CPU feature word 522# 523# @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word 524# 525# @cpuid-input-ecx: Input ECX value for CPUID instruction for that 526# feature word 527# 528# @cpuid-register: Output register containing the feature bits 529# 530# @features: value of output register, containing the feature bits 531# 532# Since: 1.5 533## 534{ 'struct': 'X86CPUFeatureWordInfo', 535 'data': { 'cpuid-input-eax': 'int', 536 '*cpuid-input-ecx': 'int', 537 'cpuid-register': 'X86CPURegister32', 538 'features': 'int' } } 539 540## 541# @DummyForceArrays: 542# 543# Not used by QMP; hack to let us use X86CPUFeatureWordInfoList internally 544# 545# Since: 2.5 546## 547{ 'struct': 'DummyForceArrays', 548 'data': { 'unused': ['X86CPUFeatureWordInfo'] } } 549 550## 551# @NumaCpuOptions: 552# 553# Option "-numa cpu" overrides default cpu to node mapping. 554# It accepts the same set of cpu properties as returned by 555# query-hotpluggable-cpus[].props, where node-id could be used to 556# override default node mapping. 557# 558# Since: 2.10 559## 560{ 'struct': 'NumaCpuOptions', 561 'base': 'CpuInstanceProperties', 562 'data' : {} } 563 564## 565# @HmatLBMemoryHierarchy: 566# 567# The memory hierarchy in the System Locality Latency and Bandwidth 568# Information Structure of HMAT (Heterogeneous Memory Attribute Table) 569# 570# For more information about @HmatLBMemoryHierarchy, see chapter 571# 5.2.27.4: Table 5-146: Field "Flags" of ACPI 6.3 spec. 572# 573# @memory: the structure represents the memory performance 574# 575# @first-level: first level of memory side cache 576# 577# @second-level: second level of memory side cache 578# 579# @third-level: third level of memory side cache 580# 581# Since: 5.0 582## 583{ 'enum': 'HmatLBMemoryHierarchy', 584 'data': [ 'memory', 'first-level', 'second-level', 'third-level' ] } 585 586## 587# @HmatLBDataType: 588# 589# Data type in the System Locality Latency and Bandwidth 590# Information Structure of HMAT (Heterogeneous Memory Attribute Table) 591# 592# For more information about @HmatLBDataType, see chapter 593# 5.2.27.4: Table 5-146: Field "Data Type" of ACPI 6.3 spec. 594# 595# @access-latency: access latency (nanoseconds) 596# 597# @read-latency: read latency (nanoseconds) 598# 599# @write-latency: write latency (nanoseconds) 600# 601# @access-bandwidth: access bandwidth (Bytes per second) 602# 603# @read-bandwidth: read bandwidth (Bytes per second) 604# 605# @write-bandwidth: write bandwidth (Bytes per second) 606# 607# Since: 5.0 608## 609{ 'enum': 'HmatLBDataType', 610 'data': [ 'access-latency', 'read-latency', 'write-latency', 611 'access-bandwidth', 'read-bandwidth', 'write-bandwidth' ] } 612 613## 614# @NumaHmatLBOptions: 615# 616# Set the system locality latency and bandwidth information 617# between Initiator and Target proximity Domains. 618# 619# For more information about @NumaHmatLBOptions, see chapter 620# 5.2.27.4: Table 5-146 of ACPI 6.3 spec. 621# 622# @initiator: the Initiator Proximity Domain. 623# 624# @target: the Target Proximity Domain. 625# 626# @hierarchy: the Memory Hierarchy. Indicates the performance 627# of memory or side cache. 628# 629# @data-type: presents the type of data, access/read/write 630# latency or hit latency. 631# 632# @latency: the value of latency from @initiator to @target 633# proximity domain, the latency unit is "ns(nanosecond)". 634# 635# @bandwidth: the value of bandwidth between @initiator and @target 636# proximity domain, the bandwidth unit is 637# "Bytes per second". 638# 639# Since: 5.0 640## 641{ 'struct': 'NumaHmatLBOptions', 642 'data': { 643 'initiator': 'uint16', 644 'target': 'uint16', 645 'hierarchy': 'HmatLBMemoryHierarchy', 646 'data-type': 'HmatLBDataType', 647 '*latency': 'uint64', 648 '*bandwidth': 'size' }} 649 650## 651# @HmatCacheAssociativity: 652# 653# Cache associativity in the Memory Side Cache Information Structure 654# of HMAT 655# 656# For more information of @HmatCacheAssociativity, see chapter 657# 5.2.27.5: Table 5-147 of ACPI 6.3 spec. 658# 659# @none: None (no memory side cache in this proximity domain, 660# or cache associativity unknown) 661# 662# @direct: Direct Mapped 663# 664# @complex: Complex Cache Indexing (implementation specific) 665# 666# Since: 5.0 667## 668{ 'enum': 'HmatCacheAssociativity', 669 'data': [ 'none', 'direct', 'complex' ] } 670 671## 672# @HmatCacheWritePolicy: 673# 674# Cache write policy in the Memory Side Cache Information Structure 675# of HMAT 676# 677# For more information of @HmatCacheWritePolicy, see chapter 678# 5.2.27.5: Table 5-147: Field "Cache Attributes" of ACPI 6.3 spec. 679# 680# @none: None (no memory side cache in this proximity domain, 681# or cache write policy unknown) 682# 683# @write-back: Write Back (WB) 684# 685# @write-through: Write Through (WT) 686# 687# Since: 5.0 688## 689{ 'enum': 'HmatCacheWritePolicy', 690 'data': [ 'none', 'write-back', 'write-through' ] } 691 692## 693# @NumaHmatCacheOptions: 694# 695# Set the memory side cache information for a given memory domain. 696# 697# For more information of @NumaHmatCacheOptions, see chapter 698# 5.2.27.5: Table 5-147: Field "Cache Attributes" of ACPI 6.3 spec. 699# 700# @node-id: the memory proximity domain to which the memory belongs. 701# 702# @size: the size of memory side cache in bytes. 703# 704# @level: the cache level described in this structure. 705# 706# @associativity: the cache associativity, 707# none/direct-mapped/complex(complex cache indexing). 708# 709# @policy: the write policy, none/write-back/write-through. 710# 711# @line: the cache Line size in bytes. 712# 713# Since: 5.0 714## 715{ 'struct': 'NumaHmatCacheOptions', 716 'data': { 717 'node-id': 'uint32', 718 'size': 'size', 719 'level': 'uint8', 720 'associativity': 'HmatCacheAssociativity', 721 'policy': 'HmatCacheWritePolicy', 722 'line': 'uint16' }} 723 724## 725# @HostMemPolicy: 726# 727# Host memory policy types 728# 729# @default: restore default policy, remove any nondefault policy 730# 731# @preferred: set the preferred host nodes for allocation 732# 733# @bind: a strict policy that restricts memory allocation to the 734# host nodes specified 735# 736# @interleave: memory allocations are interleaved across the set 737# of host nodes specified 738# 739# Since: 2.1 740## 741{ 'enum': 'HostMemPolicy', 742 'data': [ 'default', 'preferred', 'bind', 'interleave' ] } 743 744## 745# @Memdev: 746# 747# Information about memory backend 748# 749# @id: backend's ID if backend has 'id' property (since 2.9) 750# 751# @size: memory backend size 752# 753# @merge: enables or disables memory merge support 754# 755# @dump: includes memory backend's memory in a core dump or not 756# 757# @prealloc: enables or disables memory preallocation 758# 759# @host-nodes: host nodes for its memory policy 760# 761# @policy: memory policy of memory backend 762# 763# Since: 2.1 764## 765{ 'struct': 'Memdev', 766 'data': { 767 '*id': 'str', 768 'size': 'size', 769 'merge': 'bool', 770 'dump': 'bool', 771 'prealloc': 'bool', 772 'host-nodes': ['uint16'], 773 'policy': 'HostMemPolicy' }} 774 775## 776# @query-memdev: 777# 778# Returns information for all memory backends. 779# 780# Returns: a list of @Memdev. 781# 782# Since: 2.1 783# 784# Example: 785# 786# -> { "execute": "query-memdev" } 787# <- { "return": [ 788# { 789# "id": "mem1", 790# "size": 536870912, 791# "merge": false, 792# "dump": true, 793# "prealloc": false, 794# "host-nodes": [0, 1], 795# "policy": "bind" 796# }, 797# { 798# "size": 536870912, 799# "merge": false, 800# "dump": true, 801# "prealloc": true, 802# "host-nodes": [2, 3], 803# "policy": "preferred" 804# } 805# ] 806# } 807# 808## 809{ 'command': 'query-memdev', 'returns': ['Memdev'], 'allow-preconfig': true } 810 811## 812# @CpuInstanceProperties: 813# 814# List of properties to be used for hotplugging a CPU instance, 815# it should be passed by management with device_add command when 816# a CPU is being hotplugged. 817# 818# @node-id: NUMA node ID the CPU belongs to 819# @socket-id: socket number within node/board the CPU belongs to 820# @die-id: die number within node/board the CPU belongs to (Since 4.1) 821# @core-id: core number within die the CPU belongs to# @thread-id: thread number within core the CPU belongs to 822# 823# Note: currently there are 5 properties that could be present 824# but management should be prepared to pass through other 825# properties with device_add command to allow for future 826# interface extension. This also requires the filed names to be kept in 827# sync with the properties passed to -device/device_add. 828# 829# Since: 2.7 830## 831{ 'struct': 'CpuInstanceProperties', 832 'data': { '*node-id': 'int', 833 '*socket-id': 'int', 834 '*die-id': 'int', 835 '*core-id': 'int', 836 '*thread-id': 'int' 837 } 838} 839 840## 841# @HotpluggableCPU: 842# 843# @type: CPU object type for usage with device_add command 844# @props: list of properties to be used for hotplugging CPU 845# @vcpus-count: number of logical VCPU threads @HotpluggableCPU provides 846# @qom-path: link to existing CPU object if CPU is present or 847# omitted if CPU is not present. 848# 849# Since: 2.7 850## 851{ 'struct': 'HotpluggableCPU', 852 'data': { 'type': 'str', 853 'vcpus-count': 'int', 854 'props': 'CpuInstanceProperties', 855 '*qom-path': 'str' 856 } 857} 858 859## 860# @query-hotpluggable-cpus: 861# 862# TODO: Better documentation; currently there is none. 863# 864# Returns: a list of HotpluggableCPU objects. 865# 866# Since: 2.7 867# 868# Example: 869# 870# For pseries machine type started with -smp 2,cores=2,maxcpus=4 -cpu POWER8: 871# 872# -> { "execute": "query-hotpluggable-cpus" } 873# <- {"return": [ 874# { "props": { "core": 8 }, "type": "POWER8-spapr-cpu-core", 875# "vcpus-count": 1 }, 876# { "props": { "core": 0 }, "type": "POWER8-spapr-cpu-core", 877# "vcpus-count": 1, "qom-path": "/machine/unattached/device[0]"} 878# ]}' 879# 880# For pc machine type started with -smp 1,maxcpus=2: 881# 882# -> { "execute": "query-hotpluggable-cpus" } 883# <- {"return": [ 884# { 885# "type": "qemu64-x86_64-cpu", "vcpus-count": 1, 886# "props": {"core-id": 0, "socket-id": 1, "thread-id": 0} 887# }, 888# { 889# "qom-path": "/machine/unattached/device[0]", 890# "type": "qemu64-x86_64-cpu", "vcpus-count": 1, 891# "props": {"core-id": 0, "socket-id": 0, "thread-id": 0} 892# } 893# ]} 894# 895# For s390x-virtio-ccw machine type started with -smp 1,maxcpus=2 -cpu qemu 896# (Since: 2.11): 897# 898# -> { "execute": "query-hotpluggable-cpus" } 899# <- {"return": [ 900# { 901# "type": "qemu-s390x-cpu", "vcpus-count": 1, 902# "props": { "core-id": 1 } 903# }, 904# { 905# "qom-path": "/machine/unattached/device[0]", 906# "type": "qemu-s390x-cpu", "vcpus-count": 1, 907# "props": { "core-id": 0 } 908# } 909# ]} 910# 911## 912{ 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU'], 913 'allow-preconfig': true } 914 915## 916# @set-numa-node: 917# 918# Runtime equivalent of '-numa' CLI option, available at 919# preconfigure stage to configure numa mapping before initializing 920# machine. 921# 922# Since 3.0 923## 924{ 'command': 'set-numa-node', 'boxed': true, 925 'data': 'NumaOptions', 926 'allow-preconfig': true 927} 928