]> Git Repo - qemu.git/blame_incremental - qapi-schema.json
qmp-commands: move 'system_reset' doc to schema
[qemu.git] / qapi-schema.json
... / ...
CommitLineData
1# -*- Mode: Python -*-
2#
3# QAPI Schema
4
5# QAPI common definitions
6{ 'include': 'qapi/common.json' }
7
8# QAPI crypto definitions
9{ 'include': 'qapi/crypto.json' }
10
11# QAPI block definitions
12{ 'include': 'qapi/block.json' }
13
14# QAPI event definitions
15{ 'include': 'qapi/event.json' }
16
17# Tracing commands
18{ 'include': 'qapi/trace.json' }
19
20# QAPI introspection
21{ 'include': 'qapi/introspect.json' }
22
23##
24# = QMP commands
25##
26
27##
28# @qmp_capabilities:
29#
30# Enable QMP capabilities.
31#
32# Arguments: None.
33#
34# Example:
35#
36# -> { "execute": "qmp_capabilities" }
37# <- { "return": {} }
38#
39# Notes: This command is valid exactly when first connecting: it must be
40# issued before any other command will be accepted, and will fail once the
41# monitor is accepting other commands. (see qemu docs/qmp-spec.txt)
42#
43# Since: 0.13
44#
45##
46{ 'command': 'qmp_capabilities' }
47
48##
49# @LostTickPolicy:
50#
51# Policy for handling lost ticks in timer devices.
52#
53# @discard: throw away the missed tick(s) and continue with future injection
54# normally. Guest time may be delayed, unless the OS has explicit
55# handling of lost ticks
56#
57# @delay: continue to deliver ticks at the normal rate. Guest time will be
58# delayed due to the late tick
59#
60# @merge: merge the missed tick(s) into one tick and inject. Guest time
61# may be delayed, depending on how the OS reacts to the merging
62# of ticks
63#
64# @slew: deliver ticks at a higher rate to catch up with the missed tick. The
65# guest time should not be delayed once catchup is complete.
66#
67# Since: 2.0
68##
69{ 'enum': 'LostTickPolicy',
70 'data': ['discard', 'delay', 'merge', 'slew' ] }
71
72##
73# @add_client:
74#
75# Allow client connections for VNC, Spice and socket based
76# character devices to be passed in to QEMU via SCM_RIGHTS.
77#
78# @protocol: protocol name. Valid names are "vnc", "spice" or the
79# name of a character device (eg. from -chardev id=XXXX)
80#
81# @fdname: file descriptor name previously passed via 'getfd' command
82#
83# @skipauth: #optional whether to skip authentication. Only applies
84# to "vnc" and "spice" protocols
85#
86# @tls: #optional whether to perform TLS. Only applies to the "spice"
87# protocol
88#
89# Returns: nothing on success.
90#
91# Since: 0.14.0
92#
93# Example:
94#
95# -> { "execute": "add_client", "arguments": { "protocol": "vnc",
96# "fdname": "myclient" } }
97# <- { "return": {} }
98#
99##
100{ 'command': 'add_client',
101 'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
102 '*tls': 'bool' } }
103
104##
105# @NameInfo:
106#
107# Guest name information.
108#
109# @name: #optional The name of the guest
110#
111# Since: 0.14.0
112##
113{ 'struct': 'NameInfo', 'data': {'*name': 'str'} }
114
115##
116# @query-name:
117#
118# Return the name information of a guest.
119#
120# Returns: @NameInfo of the guest
121#
122# Since: 0.14.0
123#
124# Example:
125#
126# -> { "execute": "query-name" }
127# <- { "return": { "name": "qemu-name" } }
128#
129##
130{ 'command': 'query-name', 'returns': 'NameInfo' }
131
132##
133# @KvmInfo:
134#
135# Information about support for KVM acceleration
136#
137# @enabled: true if KVM acceleration is active
138#
139# @present: true if KVM acceleration is built into this executable
140#
141# Since: 0.14.0
142##
143{ 'struct': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
144
145##
146# @query-kvm:
147#
148# Returns information about KVM acceleration
149#
150# Returns: @KvmInfo
151#
152# Since: 0.14.0
153#
154# Example:
155#
156# -> { "execute": "query-kvm" }
157# <- { "return": { "enabled": true, "present": true } }
158#
159##
160{ 'command': 'query-kvm', 'returns': 'KvmInfo' }
161
162##
163# @RunState:
164#
165# An enumeration of VM run states.
166#
167# @debug: QEMU is running on a debugger
168#
169# @finish-migrate: guest is paused to finish the migration process
170#
171# @inmigrate: guest is paused waiting for an incoming migration. Note
172# that this state does not tell whether the machine will start at the
173# end of the migration. This depends on the command-line -S option and
174# any invocation of 'stop' or 'cont' that has happened since QEMU was
175# started.
176#
177# @internal-error: An internal error that prevents further guest execution
178# has occurred
179#
180# @io-error: the last IOP has failed and the device is configured to pause
181# on I/O errors
182#
183# @paused: guest has been paused via the 'stop' command
184#
185# @postmigrate: guest is paused following a successful 'migrate'
186#
187# @prelaunch: QEMU was started with -S and guest has not started
188#
189# @restore-vm: guest is paused to restore VM state
190#
191# @running: guest is actively running
192#
193# @save-vm: guest is paused to save the VM state
194#
195# @shutdown: guest is shut down (and -no-shutdown is in use)
196#
197# @suspended: guest is suspended (ACPI S3)
198#
199# @watchdog: the watchdog action is configured to pause and has been triggered
200#
201# @guest-panicked: guest has been panicked as a result of guest OS panic
202#
203# @colo: guest is paused to save/restore VM state under colo checkpoint,
204# VM can not get into this state unless colo capability is enabled
205# for migration. (since 2.8)
206##
207{ 'enum': 'RunState',
208 'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
209 'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
210 'running', 'save-vm', 'shutdown', 'suspended', 'watchdog',
211 'guest-panicked', 'colo' ] }
212
213##
214# @StatusInfo:
215#
216# Information about VCPU run state
217#
218# @running: true if all VCPUs are runnable, false if not runnable
219#
220# @singlestep: true if VCPUs are in single-step mode
221#
222# @status: the virtual machine @RunState
223#
224# Since: 0.14.0
225#
226# Notes: @singlestep is enabled through the GDB stub
227##
228{ 'struct': 'StatusInfo',
229 'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
230
231##
232# @query-status:
233#
234# Query the run status of all VCPUs
235#
236# Returns: @StatusInfo reflecting all VCPUs
237#
238# Since: 0.14.0
239#
240# Example:
241#
242# -> { "execute": "query-status" }
243# <- { "return": { "running": true,
244# "singlestep": false,
245# "status": "running" } }
246#
247##
248{ 'command': 'query-status', 'returns': 'StatusInfo' }
249
250##
251# @UuidInfo:
252#
253# Guest UUID information (Universally Unique Identifier).
254#
255# @UUID: the UUID of the guest
256#
257# Since: 0.14.0
258#
259# Notes: If no UUID was specified for the guest, a null UUID is returned.
260##
261{ 'struct': 'UuidInfo', 'data': {'UUID': 'str'} }
262
263##
264# @query-uuid:
265#
266# Query the guest UUID information.
267#
268# Returns: The @UuidInfo for the guest
269#
270# Since: 0.14.0
271#
272# Example:
273#
274# -> { "execute": "query-uuid" }
275# <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
276#
277##
278{ 'command': 'query-uuid', 'returns': 'UuidInfo' }
279
280##
281# @ChardevInfo:
282#
283# Information about a character device.
284#
285# @label: the label of the character device
286#
287# @filename: the filename of the character device
288#
289# @frontend-open: shows whether the frontend device attached to this backend
290# (eg. with the chardev=... option) is in open or closed state
291# (since 2.1)
292#
293# Notes: @filename is encoded using the QEMU command line character device
294# encoding. See the QEMU man page for details.
295#
296# Since: 0.14.0
297##
298{ 'struct': 'ChardevInfo', 'data': {'label': 'str',
299 'filename': 'str',
300 'frontend-open': 'bool'} }
301
302##
303# @query-chardev:
304#
305# Returns information about current character devices.
306#
307# Returns: a list of @ChardevInfo
308#
309# Since: 0.14.0
310#
311# Example:
312#
313# -> { "execute": "query-chardev" }
314# <- {
315# "return": [
316# {
317# "label": "charchannel0",
318# "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.agent,server",
319# "frontend-open": false
320# },
321# {
322# "label": "charmonitor",
323# "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.monitor,server",
324# "frontend-open": true
325# },
326# {
327# "label": "charserial0",
328# "filename": "pty:/dev/pts/2",
329# "frontend-open": true
330# }
331# ]
332# }
333#
334##
335{ 'command': 'query-chardev', 'returns': ['ChardevInfo'] }
336
337##
338# @ChardevBackendInfo:
339#
340# Information about a character device backend
341#
342# @name: The backend name
343#
344# Since: 2.0
345##
346{ 'struct': 'ChardevBackendInfo', 'data': {'name': 'str'} }
347
348##
349# @query-chardev-backends:
350#
351# Returns information about character device backends.
352#
353# Returns: a list of @ChardevBackendInfo
354#
355# Since: 2.0
356#
357# Example:
358#
359# -> { "execute": "query-chardev-backends" }
360# <- {
361# "return":[
362# {
363# "name":"udp"
364# },
365# {
366# "name":"tcp"
367# },
368# {
369# "name":"unix"
370# },
371# {
372# "name":"spiceport"
373# }
374# ]
375# }
376#
377##
378{ 'command': 'query-chardev-backends', 'returns': ['ChardevBackendInfo'] }
379
380##
381# @DataFormat:
382#
383# An enumeration of data format.
384#
385# @utf8: Data is a UTF-8 string (RFC 3629)
386#
387# @base64: Data is Base64 encoded binary (RFC 3548)
388#
389# Since: 1.4
390##
391{ 'enum': 'DataFormat',
392 'data': [ 'utf8', 'base64' ] }
393
394##
395# @ringbuf-write:
396#
397# Write to a ring buffer character device.
398#
399# @device: the ring buffer character device name
400#
401# @data: data to write
402#
403# @format: #optional data encoding (default 'utf8').
404# - base64: data must be base64 encoded text. Its binary
405# decoding gets written.
406# - utf8: data's UTF-8 encoding is written
407# - data itself is always Unicode regardless of format, like
408# any other string.
409#
410# Returns: Nothing on success
411#
412# Since: 1.4
413#
414# Example:
415#
416# -> { "execute": "ringbuf-write",
417# "arguments": { "device": "foo",
418# "data": "abcdefgh",
419# "format": "utf8" } }
420# <- { "return": {} }
421#
422##
423{ 'command': 'ringbuf-write',
424 'data': {'device': 'str', 'data': 'str',
425 '*format': 'DataFormat'} }
426
427##
428# @ringbuf-read:
429#
430# Read from a ring buffer character device.
431#
432# @device: the ring buffer character device name
433#
434# @size: how many bytes to read at most
435#
436# @format: #optional data encoding (default 'utf8').
437# - base64: the data read is returned in base64 encoding.
438# - utf8: the data read is interpreted as UTF-8.
439# Bug: can screw up when the buffer contains invalid UTF-8
440# sequences, NUL characters, after the ring buffer lost
441# data, and when reading stops because the size limit is
442# reached.
443# - The return value is always Unicode regardless of format,
444# like any other string.
445#
446# Returns: data read from the device
447#
448# Since: 1.4
449#
450# Example:
451#
452# -> { "execute": "ringbuf-read",
453# "arguments": { "device": "foo",
454# "size": 1000,
455# "format": "utf8" } }
456# <- { "return": "abcdefgh" }
457#
458##
459{ 'command': 'ringbuf-read',
460 'data': {'device': 'str', 'size': 'int', '*format': 'DataFormat'},
461 'returns': 'str' }
462
463##
464# @EventInfo:
465#
466# Information about a QMP event
467#
468# @name: The event name
469#
470# Since: 1.2.0
471##
472{ 'struct': 'EventInfo', 'data': {'name': 'str'} }
473
474##
475# @query-events:
476#
477# Return a list of supported QMP events by this server
478#
479# Returns: A list of @EventInfo for all supported events
480#
481# Since: 1.2.0
482#
483# Example:
484#
485# -> { "execute": "query-events" }
486# <- {
487# "return": [
488# {
489# "name":"SHUTDOWN"
490# },
491# {
492# "name":"RESET"
493# }
494# ]
495# }
496#
497# Note: This example has been shortened as the real response is too long.
498#
499##
500{ 'command': 'query-events', 'returns': ['EventInfo'] }
501
502##
503# @MigrationStats:
504#
505# Detailed migration status.
506#
507# @transferred: amount of bytes already transferred to the target VM
508#
509# @remaining: amount of bytes remaining to be transferred to the target VM
510#
511# @total: total amount of bytes involved in the migration process
512#
513# @duplicate: number of duplicate (zero) pages (since 1.2)
514#
515# @skipped: number of skipped zero pages (since 1.5)
516#
517# @normal: number of normal pages (since 1.2)
518#
519# @normal-bytes: number of normal bytes sent (since 1.2)
520#
521# @dirty-pages-rate: number of pages dirtied by second by the
522# guest (since 1.3)
523#
524# @mbps: throughput in megabits/sec. (since 1.6)
525#
526# @dirty-sync-count: number of times that dirty ram was synchronized (since 2.1)
527#
528# @postcopy-requests: The number of page requests received from the destination
529# (since 2.7)
530#
531# Since: 0.14.0
532##
533{ 'struct': 'MigrationStats',
534 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
535 'duplicate': 'int', 'skipped': 'int', 'normal': 'int',
536 'normal-bytes': 'int', 'dirty-pages-rate' : 'int',
537 'mbps' : 'number', 'dirty-sync-count' : 'int',
538 'postcopy-requests' : 'int' } }
539
540##
541# @XBZRLECacheStats:
542#
543# Detailed XBZRLE migration cache statistics
544#
545# @cache-size: XBZRLE cache size
546#
547# @bytes: amount of bytes already transferred to the target VM
548#
549# @pages: amount of pages transferred to the target VM
550#
551# @cache-miss: number of cache miss
552#
553# @cache-miss-rate: rate of cache miss (since 2.1)
554#
555# @overflow: number of overflows
556#
557# Since: 1.2
558##
559{ 'struct': 'XBZRLECacheStats',
560 'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
561 'cache-miss': 'int', 'cache-miss-rate': 'number',
562 'overflow': 'int' } }
563
564##
565# @MigrationStatus:
566#
567# An enumeration of migration status.
568#
569# @none: no migration has ever happened.
570#
571# @setup: migration process has been initiated.
572#
573# @cancelling: in the process of cancelling migration.
574#
575# @cancelled: cancelling migration is finished.
576#
577# @active: in the process of doing migration.
578#
579# @postcopy-active: like active, but now in postcopy mode. (since 2.5)
580#
581# @completed: migration is finished.
582#
583# @failed: some error occurred during migration process.
584#
585# @colo: VM is in the process of fault tolerance, VM can not get into this
586# state unless colo capability is enabled for migration. (since 2.8)
587#
588# Since: 2.3
589#
590##
591{ 'enum': 'MigrationStatus',
592 'data': [ 'none', 'setup', 'cancelling', 'cancelled',
593 'active', 'postcopy-active', 'completed', 'failed', 'colo' ] }
594
595##
596# @MigrationInfo:
597#
598# Information about current migration process.
599#
600# @status: #optional @MigrationStatus describing the current migration status.
601# If this field is not returned, no migration process
602# has been initiated
603#
604# @ram: #optional @MigrationStats containing detailed migration
605# status, only returned if status is 'active' or
606# 'completed'(since 1.2)
607#
608# @disk: #optional @MigrationStats containing detailed disk migration
609# status, only returned if status is 'active' and it is a block
610# migration
611#
612# @xbzrle-cache: #optional @XBZRLECacheStats containing detailed XBZRLE
613# migration statistics, only returned if XBZRLE feature is on and
614# status is 'active' or 'completed' (since 1.2)
615#
616# @total-time: #optional total amount of milliseconds since migration started.
617# If migration has ended, it returns the total migration
618# time. (since 1.2)
619#
620# @downtime: #optional only present when migration finishes correctly
621# total downtime in milliseconds for the guest.
622# (since 1.3)
623#
624# @expected-downtime: #optional only present while migration is active
625# expected downtime in milliseconds for the guest in last walk
626# of the dirty bitmap. (since 1.3)
627#
628# @setup-time: #optional amount of setup time in milliseconds _before_ the
629# iterations begin but _after_ the QMP command is issued. This is designed
630# to provide an accounting of any activities (such as RDMA pinning) which
631# may be expensive, but do not actually occur during the iterative
632# migration rounds themselves. (since 1.6)
633#
634# @cpu-throttle-percentage: #optional percentage of time guest cpus are being
635# throttled during auto-converge. This is only present when auto-converge
636# has started throttling guest cpus. (Since 2.7)
637#
638# @error-desc: #optional the human readable error description string, when
639# @status is 'failed'. Clients should not attempt to parse the
640# error strings. (Since 2.7)
641#
642# Since: 0.14.0
643##
644{ 'struct': 'MigrationInfo',
645 'data': {'*status': 'MigrationStatus', '*ram': 'MigrationStats',
646 '*disk': 'MigrationStats',
647 '*xbzrle-cache': 'XBZRLECacheStats',
648 '*total-time': 'int',
649 '*expected-downtime': 'int',
650 '*downtime': 'int',
651 '*setup-time': 'int',
652 '*cpu-throttle-percentage': 'int',
653 '*error-desc': 'str'} }
654
655##
656# @query-migrate:
657#
658# Returns information about current migration process. If migration
659# is active there will be another json-object with RAM migration
660# status and if block migration is active another one with block
661# migration status.
662#
663# Returns: @MigrationInfo
664#
665# Since: 0.14.0
666#
667# Example:
668#
669# 1. Before the first migration
670#
671# -> { "execute": "query-migrate" }
672# <- { "return": {} }
673#
674# 2. Migration is done and has succeeded
675#
676# -> { "execute": "query-migrate" }
677# <- { "return": {
678# "status": "completed",
679# "ram":{
680# "transferred":123,
681# "remaining":123,
682# "total":246,
683# "total-time":12345,
684# "setup-time":12345,
685# "downtime":12345,
686# "duplicate":123,
687# "normal":123,
688# "normal-bytes":123456,
689# "dirty-sync-count":15
690# }
691# }
692# }
693#
694# 3. Migration is done and has failed
695#
696# -> { "execute": "query-migrate" }
697# <- { "return": { "status": "failed" } }
698#
699# 4. Migration is being performed and is not a block migration:
700#
701# -> { "execute": "query-migrate" }
702# <- {
703# "return":{
704# "status":"active",
705# "ram":{
706# "transferred":123,
707# "remaining":123,
708# "total":246,
709# "total-time":12345,
710# "setup-time":12345,
711# "expected-downtime":12345,
712# "duplicate":123,
713# "normal":123,
714# "normal-bytes":123456,
715# "dirty-sync-count":15
716# }
717# }
718# }
719#
720# 5. Migration is being performed and is a block migration:
721#
722# -> { "execute": "query-migrate" }
723# <- {
724# "return":{
725# "status":"active",
726# "ram":{
727# "total":1057024,
728# "remaining":1053304,
729# "transferred":3720,
730# "total-time":12345,
731# "setup-time":12345,
732# "expected-downtime":12345,
733# "duplicate":123,
734# "normal":123,
735# "normal-bytes":123456,
736# "dirty-sync-count":15
737# },
738# "disk":{
739# "total":20971520,
740# "remaining":20880384,
741# "transferred":91136
742# }
743# }
744# }
745#
746# 6. Migration is being performed and XBZRLE is active:
747#
748# -> { "execute": "query-migrate" }
749# <- {
750# "return":{
751# "status":"active",
752# "capabilities" : [ { "capability": "xbzrle", "state" : true } ],
753# "ram":{
754# "total":1057024,
755# "remaining":1053304,
756# "transferred":3720,
757# "total-time":12345,
758# "setup-time":12345,
759# "expected-downtime":12345,
760# "duplicate":10,
761# "normal":3333,
762# "normal-bytes":3412992,
763# "dirty-sync-count":15
764# },
765# "xbzrle-cache":{
766# "cache-size":67108864,
767# "bytes":20971520,
768# "pages":2444343,
769# "cache-miss":2244,
770# "cache-miss-rate":0.123,
771# "overflow":34434
772# }
773# }
774# }
775#
776##
777{ 'command': 'query-migrate', 'returns': 'MigrationInfo' }
778
779##
780# @MigrationCapability:
781#
782# Migration capabilities enumeration
783#
784# @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
785# This feature allows us to minimize migration traffic for certain work
786# loads, by sending compressed difference of the pages
787#
788# @rdma-pin-all: Controls whether or not the entire VM memory footprint is
789# mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage.
790# Disabled by default. (since 2.0)
791#
792# @zero-blocks: During storage migration encode blocks of zeroes efficiently. This
793# essentially saves 1MB of zeroes per block on the wire. Enabling requires
794# source and target VM to support this feature. To enable it is sufficient
795# to enable the capability on the source VM. The feature is disabled by
796# default. (since 1.6)
797#
798# @compress: Use multiple compression threads to accelerate live migration.
799# This feature can help to reduce the migration traffic, by sending
800# compressed pages. Please note that if compress and xbzrle are both
801# on, compress only takes effect in the ram bulk stage, after that,
802# it will be disabled and only xbzrle takes effect, this can help to
803# minimize migration traffic. The feature is disabled by default.
804# (since 2.4 )
805#
806# @events: generate events for each migration state change
807# (since 2.4 )
808#
809# @auto-converge: If enabled, QEMU will automatically throttle down the guest
810# to speed up convergence of RAM migration. (since 1.6)
811#
812# @postcopy-ram: Start executing on the migration target before all of RAM has
813# been migrated, pulling the remaining pages along as needed. NOTE: If
814# the migration fails during postcopy the VM will fail. (since 2.6)
815#
816# @x-colo: If enabled, migration will never end, and the state of the VM on the
817# primary side will be migrated continuously to the VM on secondary
818# side, this process is called COarse-Grain LOck Stepping (COLO) for
819# Non-stop Service. (since 2.8)
820#
821# Since: 1.2
822##
823{ 'enum': 'MigrationCapability',
824 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks',
825 'compress', 'events', 'postcopy-ram', 'x-colo'] }
826
827##
828# @MigrationCapabilityStatus:
829#
830# Migration capability information
831#
832# @capability: capability enum
833#
834# @state: capability state bool
835#
836# Since: 1.2
837##
838{ 'struct': 'MigrationCapabilityStatus',
839 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
840
841##
842# @migrate-set-capabilities:
843#
844# Enable/Disable the following migration capabilities (like xbzrle)
845#
846# @capabilities: json array of capability modifications to make
847#
848# Since: 1.2
849#
850# Example:
851#
852# -> { "execute": "migrate-set-capabilities" , "arguments":
853# { "capabilities": [ { "capability": "xbzrle", "state": true } ] } }
854#
855##
856{ 'command': 'migrate-set-capabilities',
857 'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
858
859##
860# @query-migrate-capabilities:
861#
862# Returns information about the current migration capabilities status
863#
864# Returns: @MigrationCapabilitiesStatus
865#
866# Since: 1.2
867#
868# Example:
869#
870# -> { "execute": "query-migrate-capabilities" }
871# <- { "return": [
872# {"state": false, "capability": "xbzrle"},
873# {"state": false, "capability": "rdma-pin-all"},
874# {"state": false, "capability": "auto-converge"},
875# {"state": false, "capability": "zero-blocks"},
876# {"state": false, "capability": "compress"},
877# {"state": true, "capability": "events"},
878# {"state": false, "capability": "postcopy-ram"},
879# {"state": false, "capability": "x-colo"}
880# ]}
881#
882##
883{ 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}
884
885##
886# @MigrationParameter:
887#
888# Migration parameters enumeration
889#
890# @compress-level: Set the compression level to be used in live migration,
891# the compression level is an integer between 0 and 9, where 0 means
892# no compression, 1 means the best compression speed, and 9 means best
893# compression ratio which will consume more CPU.
894#
895# @compress-threads: Set compression thread count to be used in live migration,
896# the compression thread count is an integer between 1 and 255.
897#
898# @decompress-threads: Set decompression thread count to be used in live
899# migration, the decompression thread count is an integer between 1
900# and 255. Usually, decompression is at least 4 times as fast as
901# compression, so set the decompress-threads to the number about 1/4
902# of compress-threads is adequate.
903#
904# @cpu-throttle-initial: Initial percentage of time guest cpus are throttled
905# when migration auto-converge is activated. The
906# default value is 20. (Since 2.7)
907#
908# @cpu-throttle-increment: throttle percentage increase each time
909# auto-converge detects that migration is not making
910# progress. The default value is 10. (Since 2.7)
911#
912# @tls-creds: ID of the 'tls-creds' object that provides credentials for
913# establishing a TLS connection over the migration data channel.
914# On the outgoing side of the migration, the credentials must
915# be for a 'client' endpoint, while for the incoming side the
916# credentials must be for a 'server' endpoint. Setting this
917# will enable TLS for all migrations. The default is unset,
918# resulting in unsecured migration at the QEMU level. (Since 2.7)
919#
920# @tls-hostname: hostname of the target host for the migration. This is
921# required when using x509 based TLS credentials and the
922# migration URI does not already include a hostname. For
923# example if using fd: or exec: based migration, the
924# hostname must be provided so that the server's x509
925# certificate identity can be validated. (Since 2.7)
926#
927# @max-bandwidth: to set maximum speed for migration. maximum speed in
928# bytes per second. (Since 2.8)
929#
930# @downtime-limit: set maximum tolerated downtime for migration. maximum
931# downtime in milliseconds (Since 2.8)
932#
933# @x-checkpoint-delay: The delay time (in ms) between two COLO checkpoints in
934# periodic mode. (Since 2.8)
935#
936# Since: 2.4
937##
938{ 'enum': 'MigrationParameter',
939 'data': ['compress-level', 'compress-threads', 'decompress-threads',
940 'cpu-throttle-initial', 'cpu-throttle-increment',
941 'tls-creds', 'tls-hostname', 'max-bandwidth',
942 'downtime-limit', 'x-checkpoint-delay' ] }
943
944##
945# @migrate-set-parameters:
946#
947# Set various migration parameters. See MigrationParameters for details.
948#
949# Since: 2.4
950#
951# Example:
952#
953# -> { "execute": "migrate-set-parameters" ,
954# "arguments": { "compress-level": 1 } }
955#
956##
957{ 'command': 'migrate-set-parameters', 'boxed': true,
958 'data': 'MigrationParameters' }
959
960##
961# @MigrationParameters:
962#
963# Optional members can be omitted on input ('migrate-set-parameters')
964# but most members will always be present on output
965# ('query-migrate-parameters'), with the exception of tls-creds and
966# tls-hostname.
967#
968# @compress-level: #optional compression level
969#
970# @compress-threads: #optional compression thread count
971#
972# @decompress-threads: #optional decompression thread count
973#
974# @cpu-throttle-initial: #optional Initial percentage of time guest cpus are
975# throttledwhen migration auto-converge is activated.
976# The default value is 20. (Since 2.7)
977#
978# @cpu-throttle-increment: #optional throttle percentage increase each time
979# auto-converge detects that migration is not making
980# progress. The default value is 10. (Since 2.7)
981#
982# @tls-creds: #optional ID of the 'tls-creds' object that provides credentials
983# for establishing a TLS connection over the migration data
984# channel. On the outgoing side of the migration, the credentials
985# must be for a 'client' endpoint, while for the incoming side the
986# credentials must be for a 'server' endpoint. Setting this
987# will enable TLS for all migrations. The default is unset,
988# resulting in unsecured migration at the QEMU level. (Since 2.7)
989#
990# @tls-hostname: #optional hostname of the target host for the migration. This
991# is required when using x509 based TLS credentials and the
992# migration URI does not already include a hostname. For
993# example if using fd: or exec: based migration, the
994# hostname must be provided so that the server's x509
995# certificate identity can be validated. (Since 2.7)
996#
997# @max-bandwidth: to set maximum speed for migration. maximum speed in
998# bytes per second. (Since 2.8)
999#
1000# @downtime-limit: set maximum tolerated downtime for migration. maximum
1001# downtime in milliseconds (Since 2.8)
1002#
1003# @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)
1004#
1005# Since: 2.4
1006##
1007{ 'struct': 'MigrationParameters',
1008 'data': { '*compress-level': 'int',
1009 '*compress-threads': 'int',
1010 '*decompress-threads': 'int',
1011 '*cpu-throttle-initial': 'int',
1012 '*cpu-throttle-increment': 'int',
1013 '*tls-creds': 'str',
1014 '*tls-hostname': 'str',
1015 '*max-bandwidth': 'int',
1016 '*downtime-limit': 'int',
1017 '*x-checkpoint-delay': 'int'} }
1018
1019##
1020# @query-migrate-parameters:
1021#
1022# Returns information about the current migration parameters
1023#
1024# Returns: @MigrationParameters
1025#
1026# Since: 2.4
1027#
1028# Example:
1029#
1030# -> { "execute": "query-migrate-parameters" }
1031# <- { "return": {
1032# "decompress-threads": 2,
1033# "cpu-throttle-increment": 10,
1034# "compress-threads": 8,
1035# "compress-level": 1,
1036# "cpu-throttle-initial": 20,
1037# "max-bandwidth": 33554432,
1038# "downtime-limit": 300
1039# }
1040# }
1041#
1042##
1043{ 'command': 'query-migrate-parameters',
1044 'returns': 'MigrationParameters' }
1045
1046##
1047# @client_migrate_info:
1048#
1049# Set migration information for remote display. This makes the server
1050# ask the client to automatically reconnect using the new parameters
1051# once migration finished successfully. Only implemented for SPICE.
1052#
1053# @protocol: must be "spice"
1054# @hostname: migration target hostname
1055# @port: #optional spice tcp port for plaintext channels
1056# @tls-port: #optional spice tcp port for tls-secured channels
1057# @cert-subject: #optional server certificate subject
1058#
1059# Since: 0.14.0
1060#
1061# Example:
1062#
1063# -> { "execute": "client_migrate_info",
1064# "arguments": { "protocol": "spice",
1065# "hostname": "virt42.lab.kraxel.org",
1066# "port": 1234 } }
1067# <- { "return": {} }
1068#
1069##
1070{ 'command': 'client_migrate_info',
1071 'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int',
1072 '*tls-port': 'int', '*cert-subject': 'str' } }
1073
1074##
1075# @migrate-start-postcopy:
1076#
1077# Followup to a migration command to switch the migration to postcopy mode.
1078# The postcopy-ram capability must be set before the original migration
1079# command.
1080#
1081# Since: 2.5
1082#
1083# Example:
1084#
1085# -> { "execute": "migrate-start-postcopy" }
1086# <- { "return": {} }
1087#
1088##
1089{ 'command': 'migrate-start-postcopy' }
1090
1091##
1092# @COLOMessage:
1093#
1094# The message transmission between Primary side and Secondary side.
1095#
1096# @checkpoint-ready: Secondary VM (SVM) is ready for checkpointing
1097#
1098# @checkpoint-request: Primary VM (PVM) tells SVM to prepare for checkpointing
1099#
1100# @checkpoint-reply: SVM gets PVM's checkpoint request
1101#
1102# @vmstate-send: VM's state will be sent by PVM.
1103#
1104# @vmstate-size: The total size of VMstate.
1105#
1106# @vmstate-received: VM's state has been received by SVM.
1107#
1108# @vmstate-loaded: VM's state has been loaded by SVM.
1109#
1110# Since: 2.8
1111##
1112{ 'enum': 'COLOMessage',
1113 'data': [ 'checkpoint-ready', 'checkpoint-request', 'checkpoint-reply',
1114 'vmstate-send', 'vmstate-size', 'vmstate-received',
1115 'vmstate-loaded' ] }
1116
1117##
1118# @COLOMode:
1119#
1120# The colo mode
1121#
1122# @unknown: unknown mode
1123#
1124# @primary: master side
1125#
1126# @secondary: slave side
1127#
1128# Since: 2.8
1129##
1130{ 'enum': 'COLOMode',
1131 'data': [ 'unknown', 'primary', 'secondary'] }
1132
1133##
1134# @FailoverStatus:
1135#
1136# An enumeration of COLO failover status
1137#
1138# @none: no failover has ever happened
1139#
1140# @require: got failover requirement but not handled
1141#
1142# @active: in the process of doing failover
1143#
1144# @completed: finish the process of failover
1145#
1146# Since: 2.8
1147##
1148{ 'enum': 'FailoverStatus',
1149 'data': [ 'none', 'require', 'active', 'completed'] }
1150
1151##
1152# @x-colo-lost-heartbeat:
1153#
1154# Tell qemu that heartbeat is lost, request it to do takeover procedures.
1155# If this command is sent to the PVM, the Primary side will exit COLO mode.
1156# If sent to the Secondary, the Secondary side will run failover work,
1157# then takes over server operation to become the service VM.
1158#
1159# Since: 2.8
1160##
1161{ 'command': 'x-colo-lost-heartbeat' }
1162
1163##
1164# @MouseInfo:
1165#
1166# Information about a mouse device.
1167#
1168# @name: the name of the mouse device
1169#
1170# @index: the index of the mouse device
1171#
1172# @current: true if this device is currently receiving mouse events
1173#
1174# @absolute: true if this device supports absolute coordinates as input
1175#
1176# Since: 0.14.0
1177##
1178{ 'struct': 'MouseInfo',
1179 'data': {'name': 'str', 'index': 'int', 'current': 'bool',
1180 'absolute': 'bool'} }
1181
1182##
1183# @query-mice:
1184#
1185# Returns information about each active mouse device
1186#
1187# Returns: a list of @MouseInfo for each device
1188#
1189# Since: 0.14.0
1190#
1191# Example:
1192#
1193# -> { "execute": "query-mice" }
1194# <- { "return": [
1195# {
1196# "name":"QEMU Microsoft Mouse",
1197# "index":0,
1198# "current":false,
1199# "absolute":false
1200# },
1201# {
1202# "name":"QEMU PS/2 Mouse",
1203# "index":1,
1204# "current":true,
1205# "absolute":true
1206# }
1207# ]
1208# }
1209#
1210##
1211{ 'command': 'query-mice', 'returns': ['MouseInfo'] }
1212
1213##
1214# @CpuInfoArch:
1215#
1216# An enumeration of cpu types that enable additional information during
1217# @query-cpus.
1218#
1219# Since: 2.6
1220##
1221{ 'enum': 'CpuInfoArch',
1222 'data': ['x86', 'sparc', 'ppc', 'mips', 'tricore', 'other' ] }
1223
1224##
1225# @CpuInfo:
1226#
1227# Information about a virtual CPU
1228#
1229# @CPU: the index of the virtual CPU
1230#
1231# @current: this only exists for backwards compatibility and should be ignored
1232#
1233# @halted: true if the virtual CPU is in the halt state. Halt usually refers
1234# to a processor specific low power mode.
1235#
1236# @qom_path: path to the CPU object in the QOM tree (since 2.4)
1237#
1238# @thread_id: ID of the underlying host thread
1239#
1240# @arch: architecture of the cpu, which determines which additional fields
1241# will be listed (since 2.6)
1242#
1243# Since: 0.14.0
1244#
1245# Notes: @halted is a transient state that changes frequently. By the time the
1246# data is sent to the client, the guest may no longer be halted.
1247##
1248{ 'union': 'CpuInfo',
1249 'base': {'CPU': 'int', 'current': 'bool', 'halted': 'bool',
1250 'qom_path': 'str', 'thread_id': 'int', 'arch': 'CpuInfoArch' },
1251 'discriminator': 'arch',
1252 'data': { 'x86': 'CpuInfoX86',
1253 'sparc': 'CpuInfoSPARC',
1254 'ppc': 'CpuInfoPPC',
1255 'mips': 'CpuInfoMIPS',
1256 'tricore': 'CpuInfoTricore',
1257 'other': 'CpuInfoOther' } }
1258
1259##
1260# @CpuInfoX86:
1261#
1262# Additional information about a virtual i386 or x86_64 CPU
1263#
1264# @pc: the 64-bit instruction pointer
1265#
1266# Since: 2.6
1267##
1268{ 'struct': 'CpuInfoX86', 'data': { 'pc': 'int' } }
1269
1270##
1271# @CpuInfoSPARC:
1272#
1273# Additional information about a virtual SPARC CPU
1274#
1275# @pc: the PC component of the instruction pointer
1276#
1277# @npc: the NPC component of the instruction pointer
1278#
1279# Since: 2.6
1280##
1281{ 'struct': 'CpuInfoSPARC', 'data': { 'pc': 'int', 'npc': 'int' } }
1282
1283##
1284# @CpuInfoPPC:
1285#
1286# Additional information about a virtual PPC CPU
1287#
1288# @nip: the instruction pointer
1289#
1290# Since: 2.6
1291##
1292{ 'struct': 'CpuInfoPPC', 'data': { 'nip': 'int' } }
1293
1294##
1295# @CpuInfoMIPS:
1296#
1297# Additional information about a virtual MIPS CPU
1298#
1299# @PC: the instruction pointer
1300#
1301# Since: 2.6
1302##
1303{ 'struct': 'CpuInfoMIPS', 'data': { 'PC': 'int' } }
1304
1305##
1306# @CpuInfoTricore:
1307#
1308# Additional information about a virtual Tricore CPU
1309#
1310# @PC: the instruction pointer
1311#
1312# Since: 2.6
1313##
1314{ 'struct': 'CpuInfoTricore', 'data': { 'PC': 'int' } }
1315
1316##
1317# @CpuInfoOther:
1318#
1319# No additional information is available about the virtual CPU
1320#
1321# Since: 2.6
1322#
1323##
1324{ 'struct': 'CpuInfoOther', 'data': { } }
1325
1326##
1327# @query-cpus:
1328#
1329# Returns a list of information about each virtual CPU.
1330#
1331# Returns: a list of @CpuInfo for each virtual CPU
1332#
1333# Since: 0.14.0
1334#
1335# Example:
1336#
1337# -> { "execute": "query-cpus" }
1338# <- { "return": [
1339# {
1340# "CPU":0,
1341# "current":true,
1342# "halted":false,
1343# "qom_path":"/machine/unattached/device[0]",
1344# "arch":"x86",
1345# "pc":3227107138,
1346# "thread_id":3134
1347# },
1348# {
1349# "CPU":1,
1350# "current":false,
1351# "halted":true,
1352# "qom_path":"/machine/unattached/device[2]",
1353# "arch":"x86",
1354# "pc":7108165,
1355# "thread_id":3135
1356# }
1357# ]
1358# }
1359#
1360##
1361{ 'command': 'query-cpus', 'returns': ['CpuInfo'] }
1362
1363##
1364# @IOThreadInfo:
1365#
1366# Information about an iothread
1367#
1368# @id: the identifier of the iothread
1369#
1370# @thread-id: ID of the underlying host thread
1371#
1372# Since: 2.0
1373##
1374{ 'struct': 'IOThreadInfo',
1375 'data': {'id': 'str', 'thread-id': 'int'} }
1376
1377##
1378# @query-iothreads:
1379#
1380# Returns a list of information about each iothread.
1381#
1382# Note: this list excludes the QEMU main loop thread, which is not declared
1383# using the -object iothread command-line option. It is always the main thread
1384# of the process.
1385#
1386# Returns: a list of @IOThreadInfo for each iothread
1387#
1388# Since: 2.0
1389#
1390# Example:
1391#
1392# -> { "execute": "query-iothreads" }
1393# <- { "return": [
1394# {
1395# "id":"iothread0",
1396# "thread-id":3134
1397# },
1398# {
1399# "id":"iothread1",
1400# "thread-id":3135
1401# }
1402# ]
1403# }
1404#
1405##
1406{ 'command': 'query-iothreads', 'returns': ['IOThreadInfo'] }
1407
1408##
1409# @NetworkAddressFamily:
1410#
1411# The network address family
1412#
1413# @ipv4: IPV4 family
1414#
1415# @ipv6: IPV6 family
1416#
1417# @unix: unix socket
1418#
1419# @vsock: vsock family (since 2.8)
1420#
1421# @unknown: otherwise
1422#
1423# Since: 2.1
1424##
1425{ 'enum': 'NetworkAddressFamily',
1426 'data': [ 'ipv4', 'ipv6', 'unix', 'vsock', 'unknown' ] }
1427
1428##
1429# @VncBasicInfo:
1430#
1431# The basic information for vnc network connection
1432#
1433# @host: IP address
1434#
1435# @service: The service name of the vnc port. This may depend on the host
1436# system's service database so symbolic names should not be relied
1437# on.
1438#
1439# @family: address family
1440#
1441# @websocket: true in case the socket is a websocket (since 2.3).
1442#
1443# Since: 2.1
1444##
1445{ 'struct': 'VncBasicInfo',
1446 'data': { 'host': 'str',
1447 'service': 'str',
1448 'family': 'NetworkAddressFamily',
1449 'websocket': 'bool' } }
1450
1451##
1452# @VncServerInfo:
1453#
1454# The network connection information for server
1455#
1456# @auth: #optional, authentication method
1457#
1458# Since: 2.1
1459##
1460{ 'struct': 'VncServerInfo',
1461 'base': 'VncBasicInfo',
1462 'data': { '*auth': 'str' } }
1463
1464##
1465# @VncClientInfo:
1466#
1467# Information about a connected VNC client.
1468#
1469# @x509_dname: #optional If x509 authentication is in use, the Distinguished
1470# Name of the client.
1471#
1472# @sasl_username: #optional If SASL authentication is in use, the SASL username
1473# used for authentication.
1474#
1475# Since: 0.14.0
1476##
1477{ 'struct': 'VncClientInfo',
1478 'base': 'VncBasicInfo',
1479 'data': { '*x509_dname': 'str', '*sasl_username': 'str' } }
1480
1481##
1482# @VncInfo:
1483#
1484# Information about the VNC session.
1485#
1486# @enabled: true if the VNC server is enabled, false otherwise
1487#
1488# @host: #optional The hostname the VNC server is bound to. This depends on
1489# the name resolution on the host and may be an IP address.
1490#
1491# @family: #optional 'ipv6' if the host is listening for IPv6 connections
1492# 'ipv4' if the host is listening for IPv4 connections
1493# 'unix' if the host is listening on a unix domain socket
1494# 'unknown' otherwise
1495#
1496# @service: #optional The service name of the server's port. This may depends
1497# on the host system's service database so symbolic names should not
1498# be relied on.
1499#
1500# @auth: #optional the current authentication type used by the server
1501# 'none' if no authentication is being used
1502# 'vnc' if VNC authentication is being used
1503# 'vencrypt+plain' if VEncrypt is used with plain text authentication
1504# 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
1505# 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
1506# 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
1507# 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
1508# 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
1509# 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
1510# 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
1511# 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
1512#
1513# @clients: a list of @VncClientInfo of all currently connected clients
1514#
1515# Since: 0.14.0
1516##
1517{ 'struct': 'VncInfo',
1518 'data': {'enabled': 'bool', '*host': 'str',
1519 '*family': 'NetworkAddressFamily',
1520 '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
1521
1522##
1523# @VncPrimaryAuth:
1524#
1525# vnc primary authentication method.
1526#
1527# Since: 2.3
1528##
1529{ 'enum': 'VncPrimaryAuth',
1530 'data': [ 'none', 'vnc', 'ra2', 'ra2ne', 'tight', 'ultra',
1531 'tls', 'vencrypt', 'sasl' ] }
1532
1533##
1534# @VncVencryptSubAuth:
1535#
1536# vnc sub authentication method with vencrypt.
1537#
1538# Since: 2.3
1539##
1540{ 'enum': 'VncVencryptSubAuth',
1541 'data': [ 'plain',
1542 'tls-none', 'x509-none',
1543 'tls-vnc', 'x509-vnc',
1544 'tls-plain', 'x509-plain',
1545 'tls-sasl', 'x509-sasl' ] }
1546
1547##
1548# @VncInfo2:
1549#
1550# Information about a vnc server
1551#
1552# @id: vnc server name.
1553#
1554# @server: A list of @VncBasincInfo describing all listening sockets.
1555# The list can be empty (in case the vnc server is disabled).
1556# It also may have multiple entries: normal + websocket,
1557# possibly also ipv4 + ipv6 in the future.
1558#
1559# @clients: A list of @VncClientInfo of all currently connected clients.
1560# The list can be empty, for obvious reasons.
1561#
1562# @auth: The current authentication type used by the server
1563#
1564# @vencrypt: #optional The vencrypt sub authentication type used by the server,
1565# only specified in case auth == vencrypt.
1566#
1567# @display: #optional The display device the vnc server is linked to.
1568#
1569# Since: 2.3
1570##
1571{ 'struct': 'VncInfo2',
1572 'data': { 'id' : 'str',
1573 'server' : ['VncBasicInfo'],
1574 'clients' : ['VncClientInfo'],
1575 'auth' : 'VncPrimaryAuth',
1576 '*vencrypt' : 'VncVencryptSubAuth',
1577 '*display' : 'str' } }
1578
1579##
1580# @query-vnc:
1581#
1582# Returns information about the current VNC server
1583#
1584# Returns: @VncInfo
1585#
1586# Since: 0.14.0
1587#
1588# Example:
1589#
1590# -> { "execute": "query-vnc" }
1591# <- { "return": {
1592# "enabled":true,
1593# "host":"0.0.0.0",
1594# "service":"50402",
1595# "auth":"vnc",
1596# "family":"ipv4",
1597# "clients":[
1598# {
1599# "host":"127.0.0.1",
1600# "service":"50401",
1601# "family":"ipv4"
1602# }
1603# ]
1604# }
1605# }
1606#
1607##
1608{ 'command': 'query-vnc', 'returns': 'VncInfo' }
1609
1610##
1611# @query-vnc-servers:
1612#
1613# Returns a list of vnc servers. The list can be empty.
1614#
1615# Returns: a list of @VncInfo2
1616#
1617# Since: 2.3
1618##
1619{ 'command': 'query-vnc-servers', 'returns': ['VncInfo2'] }
1620
1621##
1622# @SpiceBasicInfo:
1623#
1624# The basic information for SPICE network connection
1625#
1626# @host: IP address
1627#
1628# @port: port number
1629#
1630# @family: address family
1631#
1632# Since: 2.1
1633##
1634{ 'struct': 'SpiceBasicInfo',
1635 'data': { 'host': 'str',
1636 'port': 'str',
1637 'family': 'NetworkAddressFamily' } }
1638
1639##
1640# @SpiceServerInfo:
1641#
1642# Information about a SPICE server
1643#
1644# @auth: #optional, authentication method
1645#
1646# Since: 2.1
1647##
1648{ 'struct': 'SpiceServerInfo',
1649 'base': 'SpiceBasicInfo',
1650 'data': { '*auth': 'str' } }
1651
1652##
1653# @SpiceChannel:
1654#
1655# Information about a SPICE client channel.
1656#
1657# @connection-id: SPICE connection id number. All channels with the same id
1658# belong to the same SPICE session.
1659#
1660# @channel-type: SPICE channel type number. "1" is the main control
1661# channel, filter for this one if you want to track spice
1662# sessions only
1663#
1664# @channel-id: SPICE channel ID number. Usually "0", might be different when
1665# multiple channels of the same type exist, such as multiple
1666# display channels in a multihead setup
1667#
1668# @tls: true if the channel is encrypted, false otherwise.
1669#
1670# Since: 0.14.0
1671##
1672{ 'struct': 'SpiceChannel',
1673 'base': 'SpiceBasicInfo',
1674 'data': {'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
1675 'tls': 'bool'} }
1676
1677##
1678# @SpiceQueryMouseMode:
1679#
1680# An enumeration of Spice mouse states.
1681#
1682# @client: Mouse cursor position is determined by the client.
1683#
1684# @server: Mouse cursor position is determined by the server.
1685#
1686# @unknown: No information is available about mouse mode used by
1687# the spice server.
1688#
1689# Note: spice/enums.h has a SpiceMouseMode already, hence the name.
1690#
1691# Since: 1.1
1692##
1693{ 'enum': 'SpiceQueryMouseMode',
1694 'data': [ 'client', 'server', 'unknown' ] }
1695
1696##
1697# @SpiceInfo:
1698#
1699# Information about the SPICE session.
1700#
1701# @enabled: true if the SPICE server is enabled, false otherwise
1702#
1703# @migrated: true if the last guest migration completed and spice
1704# migration had completed as well. false otherwise. (since 1.4)
1705#
1706# @host: #optional The hostname the SPICE server is bound to. This depends on
1707# the name resolution on the host and may be an IP address.
1708#
1709# @port: #optional The SPICE server's port number.
1710#
1711# @compiled-version: #optional SPICE server version.
1712#
1713# @tls-port: #optional The SPICE server's TLS port number.
1714#
1715# @auth: #optional the current authentication type used by the server
1716# 'none' if no authentication is being used
1717# 'spice' uses SASL or direct TLS authentication, depending on command
1718# line options
1719#
1720# @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
1721# be determined by the client or the server, or unknown if spice
1722# server doesn't provide this information. (since: 1.1)
1723#
1724# @channels: a list of @SpiceChannel for each active spice channel
1725#
1726# Since: 0.14.0
1727##
1728{ 'struct': 'SpiceInfo',
1729 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
1730 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
1731 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
1732
1733##
1734# @query-spice:
1735#
1736# Returns information about the current SPICE server
1737#
1738# Returns: @SpiceInfo
1739#
1740# Since: 0.14.0
1741#
1742# Example:
1743#
1744# -> { "execute": "query-spice" }
1745# <- { "return": {
1746# "enabled": true,
1747# "auth": "spice",
1748# "port": 5920,
1749# "tls-port": 5921,
1750# "host": "0.0.0.0",
1751# "channels": [
1752# {
1753# "port": "54924",
1754# "family": "ipv4",
1755# "channel-type": 1,
1756# "connection-id": 1804289383,
1757# "host": "127.0.0.1",
1758# "channel-id": 0,
1759# "tls": true
1760# },
1761# {
1762# "port": "36710",
1763# "family": "ipv4",
1764# "channel-type": 4,
1765# "connection-id": 1804289383,
1766# "host": "127.0.0.1",
1767# "channel-id": 0,
1768# "tls": false
1769# },
1770# [ ... more channels follow ... ]
1771# ]
1772# }
1773# }
1774#
1775##
1776{ 'command': 'query-spice', 'returns': 'SpiceInfo' }
1777
1778##
1779# @BalloonInfo:
1780#
1781# Information about the guest balloon device.
1782#
1783# @actual: the number of bytes the balloon currently contains
1784#
1785# Since: 0.14.0
1786#
1787##
1788{ 'struct': 'BalloonInfo', 'data': {'actual': 'int' } }
1789
1790##
1791# @query-balloon:
1792#
1793# Return information about the balloon device.
1794#
1795# Returns: @BalloonInfo on success
1796#
1797# If the balloon driver is enabled but not functional because the KVM
1798# kernel module cannot support it, KvmMissingCap
1799#
1800# If no balloon device is present, DeviceNotActive
1801#
1802# Since: 0.14.0
1803#
1804# Example:
1805#
1806# -> { "execute": "query-balloon" }
1807# <- { "return": {
1808# "actual": 1073741824,
1809# }
1810# }
1811#
1812##
1813{ 'command': 'query-balloon', 'returns': 'BalloonInfo' }
1814
1815##
1816# @PciMemoryRange:
1817#
1818# A PCI device memory region
1819#
1820# @base: the starting address (guest physical)
1821#
1822# @limit: the ending address (guest physical)
1823#
1824# Since: 0.14.0
1825##
1826{ 'struct': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
1827
1828##
1829# @PciMemoryRegion:
1830#
1831# Information about a PCI device I/O region.
1832#
1833# @bar: the index of the Base Address Register for this region
1834#
1835# @type: 'io' if the region is a PIO region
1836# 'memory' if the region is a MMIO region
1837#
1838# @size: memory size
1839#
1840# @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
1841#
1842# @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
1843#
1844# Since: 0.14.0
1845##
1846{ 'struct': 'PciMemoryRegion',
1847 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
1848 '*prefetch': 'bool', '*mem_type_64': 'bool' } }
1849
1850##
1851# @PciBusInfo:
1852#
1853# Information about a bus of a PCI Bridge device
1854#
1855# @number: primary bus interface number. This should be the number of the
1856# bus the device resides on.
1857#
1858# @secondary: secondary bus interface number. This is the number of the
1859# main bus for the bridge
1860#
1861# @subordinate: This is the highest number bus that resides below the
1862# bridge.
1863#
1864# @io_range: The PIO range for all devices on this bridge
1865#
1866# @memory_range: The MMIO range for all devices on this bridge
1867#
1868# @prefetchable_range: The range of prefetchable MMIO for all devices on
1869# this bridge
1870#
1871# Since: 2.4
1872##
1873{ 'struct': 'PciBusInfo',
1874 'data': {'number': 'int', 'secondary': 'int', 'subordinate': 'int',
1875 'io_range': 'PciMemoryRange',
1876 'memory_range': 'PciMemoryRange',
1877 'prefetchable_range': 'PciMemoryRange' } }
1878
1879##
1880# @PciBridgeInfo:
1881#
1882# Information about a PCI Bridge device
1883#
1884# @bus: information about the bus the device resides on
1885#
1886# @devices: a list of @PciDeviceInfo for each device on this bridge
1887#
1888# Since: 0.14.0
1889##
1890{ 'struct': 'PciBridgeInfo',
1891 'data': {'bus': 'PciBusInfo', '*devices': ['PciDeviceInfo']} }
1892
1893##
1894# @PciDeviceClass:
1895#
1896# Information about the Class of a PCI device
1897#
1898# @desc: #optional a string description of the device's class
1899#
1900# @class: the class code of the device
1901#
1902# Since: 2.4
1903##
1904{ 'struct': 'PciDeviceClass',
1905 'data': {'*desc': 'str', 'class': 'int'} }
1906
1907##
1908# @PciDeviceId:
1909#
1910# Information about the Id of a PCI device
1911#
1912# @device: the PCI device id
1913#
1914# @vendor: the PCI vendor id
1915#
1916# Since: 2.4
1917##
1918{ 'struct': 'PciDeviceId',
1919 'data': {'device': 'int', 'vendor': 'int'} }
1920
1921##
1922# @PciDeviceInfo:
1923#
1924# Information about a PCI device
1925#
1926# @bus: the bus number of the device
1927#
1928# @slot: the slot the device is located in
1929#
1930# @function: the function of the slot used by the device
1931#
1932# @class_info: the class of the device
1933#
1934# @id: the PCI device id
1935#
1936# @irq: #optional if an IRQ is assigned to the device, the IRQ number
1937#
1938# @qdev_id: the device name of the PCI device
1939#
1940# @pci_bridge: if the device is a PCI bridge, the bridge information
1941#
1942# @regions: a list of the PCI I/O regions associated with the device
1943#
1944# Notes: the contents of @class_info.desc are not stable and should only be
1945# treated as informational.
1946#
1947# Since: 0.14.0
1948##
1949{ 'struct': 'PciDeviceInfo',
1950 'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
1951 'class_info': 'PciDeviceClass', 'id': 'PciDeviceId',
1952 '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
1953 'regions': ['PciMemoryRegion']} }
1954
1955##
1956# @PciInfo:
1957#
1958# Information about a PCI bus
1959#
1960# @bus: the bus index
1961#
1962# @devices: a list of devices on this bus
1963#
1964# Since: 0.14.0
1965##
1966{ 'struct': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
1967
1968##
1969# @query-pci:
1970#
1971# Return information about the PCI bus topology of the guest.
1972#
1973# Returns: a list of @PciInfo for each PCI bus. Each bus is
1974# represented by a json-object, which has a key with a json-array of
1975# all PCI devices attached to it. Each device is represented by a
1976# json-object.
1977#
1978# Since: 0.14.0
1979#
1980# Example:
1981#
1982# -> { "execute": "query-pci" }
1983# <- { "return": [
1984# {
1985# "bus": 0,
1986# "devices": [
1987# {
1988# "bus": 0,
1989# "qdev_id": "",
1990# "slot": 0,
1991# "class_info": {
1992# "class": 1536,
1993# "desc": "Host bridge"
1994# },
1995# "id": {
1996# "device": 32902,
1997# "vendor": 4663
1998# },
1999# "function": 0,
2000# "regions": [
2001# ]
2002# },
2003# {
2004# "bus": 0,
2005# "qdev_id": "",
2006# "slot": 1,
2007# "class_info": {
2008# "class": 1537,
2009# "desc": "ISA bridge"
2010# },
2011# "id": {
2012# "device": 32902,
2013# "vendor": 28672
2014# },
2015# "function": 0,
2016# "regions": [
2017# ]
2018# },
2019# {
2020# "bus": 0,
2021# "qdev_id": "",
2022# "slot": 1,
2023# "class_info": {
2024# "class": 257,
2025# "desc": "IDE controller"
2026# },
2027# "id": {
2028# "device": 32902,
2029# "vendor": 28688
2030# },
2031# "function": 1,
2032# "regions": [
2033# {
2034# "bar": 4,
2035# "size": 16,
2036# "address": 49152,
2037# "type": "io"
2038# }
2039# ]
2040# },
2041# {
2042# "bus": 0,
2043# "qdev_id": "",
2044# "slot": 2,
2045# "class_info": {
2046# "class": 768,
2047# "desc": "VGA controller"
2048# },
2049# "id": {
2050# "device": 4115,
2051# "vendor": 184
2052# },
2053# "function": 0,
2054# "regions": [
2055# {
2056# "prefetch": true,
2057# "mem_type_64": false,
2058# "bar": 0,
2059# "size": 33554432,
2060# "address": 4026531840,
2061# "type": "memory"
2062# },
2063# {
2064# "prefetch": false,
2065# "mem_type_64": false,
2066# "bar": 1,
2067# "size": 4096,
2068# "address": 4060086272,
2069# "type": "memory"
2070# },
2071# {
2072# "prefetch": false,
2073# "mem_type_64": false,
2074# "bar": 6,
2075# "size": 65536,
2076# "address": -1,
2077# "type": "memory"
2078# }
2079# ]
2080# },
2081# {
2082# "bus": 0,
2083# "qdev_id": "",
2084# "irq": 11,
2085# "slot": 4,
2086# "class_info": {
2087# "class": 1280,
2088# "desc": "RAM controller"
2089# },
2090# "id": {
2091# "device": 6900,
2092# "vendor": 4098
2093# },
2094# "function": 0,
2095# "regions": [
2096# {
2097# "bar": 0,
2098# "size": 32,
2099# "address": 49280,
2100# "type": "io"
2101# }
2102# ]
2103# }
2104# ]
2105# }
2106# ]
2107# }
2108#
2109# Note: This example has been shortened as the real response is too long.
2110#
2111##
2112{ 'command': 'query-pci', 'returns': ['PciInfo'] }
2113
2114##
2115# @quit:
2116#
2117# This command will cause the QEMU process to exit gracefully. While every
2118# attempt is made to send the QMP response before terminating, this is not
2119# guaranteed. When using this interface, a premature EOF would not be
2120# unexpected.
2121#
2122# Since: 0.14.0
2123#
2124# Example:
2125#
2126# -> { "execute": "quit" }
2127# <- { "return": {} }
2128##
2129{ 'command': 'quit' }
2130
2131##
2132# @stop:
2133#
2134# Stop all guest VCPU execution.
2135#
2136# Since: 0.14.0
2137#
2138# Notes: This function will succeed even if the guest is already in the stopped
2139# state. In "inmigrate" state, it will ensure that the guest
2140# remains paused once migration finishes, as if the -S option was
2141# passed on the command line.
2142#
2143# Example:
2144#
2145# -> { "execute": "stop" }
2146# <- { "return": {} }
2147#
2148##
2149{ 'command': 'stop' }
2150
2151##
2152# @system_reset:
2153#
2154# Performs a hard reset of a guest.
2155#
2156# Since: 0.14.0
2157#
2158# Example:
2159#
2160# -> { "execute": "system_reset" }
2161# <- { "return": {} }
2162#
2163##
2164{ 'command': 'system_reset' }
2165
2166##
2167# @system_powerdown:
2168#
2169# Requests that a guest perform a powerdown operation.
2170#
2171# Since: 0.14.0
2172#
2173# Notes: A guest may or may not respond to this command. This command
2174# returning does not indicate that a guest has accepted the request or
2175# that it has shut down. Many guests will respond to this command by
2176# prompting the user in some way.
2177##
2178{ 'command': 'system_powerdown' }
2179
2180##
2181# @cpu:
2182#
2183# This command is a nop that is only provided for the purposes of compatibility.
2184#
2185# Since: 0.14.0
2186#
2187# Notes: Do not use this command.
2188##
2189{ 'command': 'cpu', 'data': {'index': 'int'} }
2190
2191##
2192# @cpu-add:
2193#
2194# Adds CPU with specified ID
2195#
2196# @id: ID of CPU to be created, valid values [0..max_cpus)
2197#
2198# Returns: Nothing on success
2199#
2200# Since: 1.5
2201##
2202{ 'command': 'cpu-add', 'data': {'id': 'int'} }
2203
2204##
2205# @memsave:
2206#
2207# Save a portion of guest memory to a file.
2208#
2209# @val: the virtual address of the guest to start from
2210#
2211# @size: the size of memory region to save
2212#
2213# @filename: the file to save the memory to as binary data
2214#
2215# @cpu-index: #optional the index of the virtual CPU to use for translating the
2216# virtual address (defaults to CPU 0)
2217#
2218# Returns: Nothing on success
2219#
2220# Since: 0.14.0
2221#
2222# Notes: Errors were not reliably returned until 1.1
2223##
2224{ 'command': 'memsave',
2225 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
2226
2227##
2228# @pmemsave:
2229#
2230# Save a portion of guest physical memory to a file.
2231#
2232# @val: the physical address of the guest to start from
2233#
2234# @size: the size of memory region to save
2235#
2236# @filename: the file to save the memory to as binary data
2237#
2238# Returns: Nothing on success
2239#
2240# Since: 0.14.0
2241#
2242# Notes: Errors were not reliably returned until 1.1
2243##
2244{ 'command': 'pmemsave',
2245 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
2246
2247##
2248# @cont:
2249#
2250# Resume guest VCPU execution.
2251#
2252# Since: 0.14.0
2253#
2254# Returns: If successful, nothing
2255# If QEMU was started with an encrypted block device and a key has
2256# not yet been set, DeviceEncrypted.
2257#
2258# Notes: This command will succeed if the guest is currently running. It
2259# will also succeed if the guest is in the "inmigrate" state; in
2260# this case, the effect of the command is to make sure the guest
2261# starts once migration finishes, removing the effect of the -S
2262# command line option if it was passed.
2263##
2264{ 'command': 'cont' }
2265
2266##
2267# @system_wakeup:
2268#
2269# Wakeup guest from suspend. Does nothing in case the guest isn't suspended.
2270#
2271# Since: 1.1
2272#
2273# Returns: nothing.
2274##
2275{ 'command': 'system_wakeup' }
2276
2277##
2278# @inject-nmi:
2279#
2280# Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or all CPUs (ppc64).
2281#
2282# Returns: If successful, nothing
2283#
2284# Since: 0.14.0
2285#
2286# Note: prior to 2.1, this command was only supported for x86 and s390 VMs
2287##
2288{ 'command': 'inject-nmi' }
2289
2290##
2291# @set_link:
2292#
2293# Sets the link status of a virtual network adapter.
2294#
2295# @name: the device name of the virtual network adapter
2296#
2297# @up: true to set the link status to be up
2298#
2299# Returns: Nothing on success
2300# If @name is not a valid network device, DeviceNotFound
2301#
2302# Since: 0.14.0
2303#
2304# Notes: Not all network adapters support setting link status. This command
2305# will succeed even if the network adapter does not support link status
2306# notification.
2307##
2308{ 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
2309
2310##
2311# @balloon:
2312#
2313# Request the balloon driver to change its balloon size.
2314#
2315# @value: the target size of the balloon in bytes
2316#
2317# Returns: Nothing on success
2318# If the balloon driver is enabled but not functional because the KVM
2319# kernel module cannot support it, KvmMissingCap
2320# If no balloon device is present, DeviceNotActive
2321#
2322# Notes: This command just issues a request to the guest. When it returns,
2323# the balloon size may not have changed. A guest can change the balloon
2324# size independent of this command.
2325#
2326# Since: 0.14.0
2327##
2328{ 'command': 'balloon', 'data': {'value': 'int'} }
2329
2330##
2331# @Abort:
2332#
2333# This action can be used to test transaction failure.
2334#
2335# Since: 1.6
2336##
2337{ 'struct': 'Abort',
2338 'data': { } }
2339
2340##
2341# @ActionCompletionMode:
2342#
2343# An enumeration of Transactional completion modes.
2344#
2345# @individual: Do not attempt to cancel any other Actions if any Actions fail
2346# after the Transaction request succeeds. All Actions that
2347# can complete successfully will do so without waiting on others.
2348# This is the default.
2349#
2350# @grouped: If any Action fails after the Transaction succeeds, cancel all
2351# Actions. Actions do not complete until all Actions are ready to
2352# complete. May be rejected by Actions that do not support this
2353# completion mode.
2354#
2355# Since: 2.5
2356##
2357{ 'enum': 'ActionCompletionMode',
2358 'data': [ 'individual', 'grouped' ] }
2359
2360##
2361# @TransactionAction:
2362#
2363# A discriminated record of operations that can be performed with
2364# @transaction. Action @type can be:
2365#
2366# - @abort: since 1.6
2367# - @block-dirty-bitmap-add: since 2.5
2368# - @block-dirty-bitmap-clear: since 2.5
2369# - @blockdev-backup: since 2.3
2370# - @blockdev-snapshot: since 2.5
2371# - @blockdev-snapshot-internal-sync: since 1.7
2372# - @blockdev-snapshot-sync: since 1.1
2373# - @drive-backup: since 1.6
2374#
2375# Since: 1.1
2376##
2377{ 'union': 'TransactionAction',
2378 'data': {
2379 'abort': 'Abort',
2380 'block-dirty-bitmap-add': 'BlockDirtyBitmapAdd',
2381 'block-dirty-bitmap-clear': 'BlockDirtyBitmap',
2382 'blockdev-backup': 'BlockdevBackup',
2383 'blockdev-snapshot': 'BlockdevSnapshot',
2384 'blockdev-snapshot-internal-sync': 'BlockdevSnapshotInternal',
2385 'blockdev-snapshot-sync': 'BlockdevSnapshotSync',
2386 'drive-backup': 'DriveBackup'
2387 } }
2388
2389##
2390# @TransactionProperties:
2391#
2392# Optional arguments to modify the behavior of a Transaction.
2393#
2394# @completion-mode: #optional Controls how jobs launched asynchronously by
2395# Actions will complete or fail as a group.
2396# See @ActionCompletionMode for details.
2397#
2398# Since: 2.5
2399##
2400{ 'struct': 'TransactionProperties',
2401 'data': {
2402 '*completion-mode': 'ActionCompletionMode'
2403 }
2404}
2405
2406##
2407# @transaction:
2408#
2409# Executes a number of transactionable QMP commands atomically. If any
2410# operation fails, then the entire set of actions will be abandoned and the
2411# appropriate error returned.
2412#
2413# @actions: List of @TransactionAction;
2414# information needed for the respective operations.
2415#
2416# @properties: #optional structure of additional options to control the
2417# execution of the transaction. See @TransactionProperties
2418# for additional detail.
2419#
2420# Returns: nothing on success
2421# Errors depend on the operations of the transaction
2422#
2423# Note: The transaction aborts on the first failure. Therefore, there will be
2424# information on only one failed operation returned in an error condition, and
2425# subsequent actions will not have been attempted.
2426#
2427# Since: 1.1
2428##
2429{ 'command': 'transaction',
2430 'data': { 'actions': [ 'TransactionAction' ],
2431 '*properties': 'TransactionProperties'
2432 }
2433}
2434
2435##
2436# @human-monitor-command:
2437#
2438# Execute a command on the human monitor and return the output.
2439#
2440# @command-line: the command to execute in the human monitor
2441#
2442# @cpu-index: #optional The CPU to use for commands that require an implicit CPU
2443#
2444# Returns: the output of the command as a string
2445#
2446# Since: 0.14.0
2447#
2448# Notes: This command only exists as a stop-gap. Its use is highly
2449# discouraged. The semantics of this command are not guaranteed.
2450#
2451# Known limitations:
2452#
2453# * This command is stateless, this means that commands that depend
2454# on state information (such as getfd) might not work
2455#
2456# * Commands that prompt the user for data (eg. 'cont' when the block
2457# device is encrypted) don't currently work
2458##
2459{ 'command': 'human-monitor-command',
2460 'data': {'command-line': 'str', '*cpu-index': 'int'},
2461 'returns': 'str' }
2462
2463##
2464# @migrate_cancel:
2465#
2466# Cancel the current executing migration process.
2467#
2468# Returns: nothing on success
2469#
2470# Notes: This command succeeds even if there is no migration process running.
2471#
2472# Since: 0.14.0
2473##
2474{ 'command': 'migrate_cancel' }
2475
2476##
2477# @migrate_set_downtime:
2478#
2479# Set maximum tolerated downtime for migration.
2480#
2481# @value: maximum downtime in seconds
2482#
2483# Returns: nothing on success
2484#
2485# Notes: This command is deprecated in favor of 'migrate-set-parameters'
2486#
2487# Since: 0.14.0
2488##
2489{ 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
2490
2491##
2492# @migrate_set_speed:
2493#
2494# Set maximum speed for migration.
2495#
2496# @value: maximum speed in bytes.
2497#
2498# Returns: nothing on success
2499#
2500# Notes: This command is deprecated in favor of 'migrate-set-parameters'
2501#
2502# Since: 0.14.0
2503##
2504{ 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
2505
2506##
2507# @migrate-set-cache-size:
2508#
2509# Set XBZRLE cache size
2510#
2511# @value: cache size in bytes
2512#
2513# The size will be rounded down to the nearest power of 2.
2514# The cache size can be modified before and during ongoing migration
2515#
2516# Returns: nothing on success
2517#
2518# Since: 1.2
2519##
2520{ 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
2521
2522##
2523# @query-migrate-cache-size:
2524#
2525# query XBZRLE cache size
2526#
2527# Returns: XBZRLE cache size in bytes
2528#
2529# Since: 1.2
2530##
2531{ 'command': 'query-migrate-cache-size', 'returns': 'int' }
2532
2533##
2534# @ObjectPropertyInfo:
2535#
2536# @name: the name of the property
2537#
2538# @type: the type of the property. This will typically come in one of four
2539# forms:
2540#
2541# 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
2542# These types are mapped to the appropriate JSON type.
2543#
2544# 2) A child type in the form 'child<subtype>' where subtype is a qdev
2545# device type name. Child properties create the composition tree.
2546#
2547# 3) A link type in the form 'link<subtype>' where subtype is a qdev
2548# device type name. Link properties form the device model graph.
2549#
2550# Since: 1.2
2551##
2552{ 'struct': 'ObjectPropertyInfo',
2553 'data': { 'name': 'str', 'type': 'str' } }
2554
2555##
2556# @qom-list:
2557#
2558# This command will list any properties of a object given a path in the object
2559# model.
2560#
2561# @path: the path within the object model. See @qom-get for a description of
2562# this parameter.
2563#
2564# Returns: a list of @ObjectPropertyInfo that describe the properties of the
2565# object.
2566#
2567# Since: 1.2
2568##
2569{ 'command': 'qom-list',
2570 'data': { 'path': 'str' },
2571 'returns': [ 'ObjectPropertyInfo' ] }
2572
2573##
2574# @qom-get:
2575#
2576# This command will get a property from a object model path and return the
2577# value.
2578#
2579# @path: The path within the object model. There are two forms of supported
2580# paths--absolute and partial paths.
2581#
2582# Absolute paths are derived from the root object and can follow child<>
2583# or link<> properties. Since they can follow link<> properties, they
2584# can be arbitrarily long. Absolute paths look like absolute filenames
2585# and are prefixed with a leading slash.
2586#
2587# Partial paths look like relative filenames. They do not begin
2588# with a prefix. The matching rules for partial paths are subtle but
2589# designed to make specifying objects easy. At each level of the
2590# composition tree, the partial path is matched as an absolute path.
2591# The first match is not returned. At least two matches are searched
2592# for. A successful result is only returned if only one match is
2593# found. If more than one match is found, a flag is return to
2594# indicate that the match was ambiguous.
2595#
2596# @property: The property name to read
2597#
2598# Returns: The property value. The type depends on the property
2599# type. child<> and link<> properties are returned as #str
2600# pathnames. All integer property types (u8, u16, etc) are
2601# returned as #int.
2602#
2603# Since: 1.2
2604##
2605{ 'command': 'qom-get',
2606 'data': { 'path': 'str', 'property': 'str' },
2607 'returns': 'any' }
2608
2609##
2610# @qom-set:
2611#
2612# This command will set a property from a object model path.
2613#
2614# @path: see @qom-get for a description of this parameter
2615#
2616# @property: the property name to set
2617#
2618# @value: a value who's type is appropriate for the property type. See @qom-get
2619# for a description of type mapping.
2620#
2621# Since: 1.2
2622##
2623{ 'command': 'qom-set',
2624 'data': { 'path': 'str', 'property': 'str', 'value': 'any' } }
2625
2626##
2627# @set_password:
2628#
2629# Sets the password of a remote display session.
2630#
2631# @protocol: `vnc' to modify the VNC server password
2632# `spice' to modify the Spice server password
2633#
2634# @password: the new password
2635#
2636# @connected: #optional how to handle existing clients when changing the
2637# password. If nothing is specified, defaults to `keep'
2638# `fail' to fail the command if clients are connected
2639# `disconnect' to disconnect existing clients
2640# `keep' to maintain existing clients
2641#
2642# Returns: Nothing on success
2643# If Spice is not enabled, DeviceNotFound
2644#
2645# Since: 0.14.0
2646##
2647{ 'command': 'set_password',
2648 'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
2649
2650##
2651# @expire_password:
2652#
2653# Expire the password of a remote display server.
2654#
2655# @protocol: the name of the remote display protocol `vnc' or `spice'
2656#
2657# @time: when to expire the password.
2658# `now' to expire the password immediately
2659# `never' to cancel password expiration
2660# `+INT' where INT is the number of seconds from now (integer)
2661# `INT' where INT is the absolute time in seconds
2662#
2663# Returns: Nothing on success
2664# If @protocol is `spice' and Spice is not active, DeviceNotFound
2665#
2666# Since: 0.14.0
2667#
2668# Notes: Time is relative to the server and currently there is no way to
2669# coordinate server time with client time. It is not recommended to
2670# use the absolute time version of the @time parameter unless you're
2671# sure you are on the same machine as the QEMU instance.
2672##
2673{ 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
2674
2675##
2676# @change-vnc-password:
2677#
2678# Change the VNC server password.
2679#
2680# @password: the new password to use with VNC authentication
2681#
2682# Since: 1.1
2683#
2684# Notes: An empty password in this command will set the password to the empty
2685# string. Existing clients are unaffected by executing this command.
2686##
2687{ 'command': 'change-vnc-password', 'data': {'password': 'str'} }
2688
2689##
2690# @change:
2691#
2692# This command is multiple commands multiplexed together.
2693#
2694# @device: This is normally the name of a block device but it may also be 'vnc'.
2695# when it's 'vnc', then sub command depends on @target
2696#
2697# @target: If @device is a block device, then this is the new filename.
2698# If @device is 'vnc', then if the value 'password' selects the vnc
2699# change password command. Otherwise, this specifies a new server URI
2700# address to listen to for VNC connections.
2701#
2702# @arg: If @device is a block device, then this is an optional format to open
2703# the device with.
2704# If @device is 'vnc' and @target is 'password', this is the new VNC
2705# password to set. If this argument is an empty string, then no future
2706# logins will be allowed.
2707#
2708# Returns: Nothing on success.
2709# If @device is not a valid block device, DeviceNotFound
2710# If the new block device is encrypted, DeviceEncrypted. Note that
2711# if this error is returned, the device has been opened successfully
2712# and an additional call to @block_passwd is required to set the
2713# device's password. The behavior of reads and writes to the block
2714# device between when these calls are executed is undefined.
2715#
2716# Notes: This interface is deprecated, and it is strongly recommended that you
2717# avoid using it. For changing block devices, use
2718# blockdev-change-medium; for changing VNC parameters, use
2719# change-vnc-password.
2720#
2721# Since: 0.14.0
2722##
2723{ 'command': 'change',
2724 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
2725
2726##
2727# @ObjectTypeInfo:
2728#
2729# This structure describes a search result from @qom-list-types
2730#
2731# @name: the type name found in the search
2732#
2733# Since: 1.1
2734#
2735# Notes: This command is experimental and may change syntax in future releases.
2736##
2737{ 'struct': 'ObjectTypeInfo',
2738 'data': { 'name': 'str' } }
2739
2740##
2741# @qom-list-types:
2742#
2743# This command will return a list of types given search parameters
2744#
2745# @implements: if specified, only return types that implement this type name
2746#
2747# @abstract: if true, include abstract types in the results
2748#
2749# Returns: a list of @ObjectTypeInfo or an empty list if no results are found
2750#
2751# Since: 1.1
2752##
2753{ 'command': 'qom-list-types',
2754 'data': { '*implements': 'str', '*abstract': 'bool' },
2755 'returns': [ 'ObjectTypeInfo' ] }
2756
2757##
2758# @DevicePropertyInfo:
2759#
2760# Information about device properties.
2761#
2762# @name: the name of the property
2763# @type: the typename of the property
2764# @description: #optional if specified, the description of the property.
2765# (since 2.2)
2766#
2767# Since: 1.2
2768##
2769{ 'struct': 'DevicePropertyInfo',
2770 'data': { 'name': 'str', 'type': 'str', '*description': 'str' } }
2771
2772##
2773# @device-list-properties:
2774#
2775# List properties associated with a device.
2776#
2777# @typename: the type name of a device
2778#
2779# Returns: a list of DevicePropertyInfo describing a devices properties
2780#
2781# Since: 1.2
2782##
2783{ 'command': 'device-list-properties',
2784 'data': { 'typename': 'str'},
2785 'returns': [ 'DevicePropertyInfo' ] }
2786
2787##
2788# @migrate:
2789#
2790# Migrates the current running guest to another Virtual Machine.
2791#
2792# @uri: the Uniform Resource Identifier of the destination VM
2793#
2794# @blk: #optional do block migration (full disk copy)
2795#
2796# @inc: #optional incremental disk copy migration
2797#
2798# @detach: this argument exists only for compatibility reasons and
2799# is ignored by QEMU
2800#
2801# Returns: nothing on success
2802#
2803# Since: 0.14.0
2804##
2805{ 'command': 'migrate',
2806 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
2807
2808##
2809# @migrate-incoming:
2810#
2811# Start an incoming migration, the qemu must have been started
2812# with -incoming defer
2813#
2814# @uri: The Uniform Resource Identifier identifying the source or
2815# address to listen on
2816#
2817# Returns: nothing on success
2818#
2819# Since: 2.3
2820# Note: It's a bad idea to use a string for the uri, but it needs to stay
2821# compatible with -incoming and the format of the uri is already exposed
2822# above libvirt
2823##
2824{ 'command': 'migrate-incoming', 'data': {'uri': 'str' } }
2825
2826##
2827# @xen-save-devices-state:
2828#
2829# Save the state of all devices to file. The RAM and the block devices
2830# of the VM are not saved by this command.
2831#
2832# @filename: the file to save the state of the devices to as binary
2833# data. See xen-save-devices-state.txt for a description of the binary
2834# format.
2835#
2836# Returns: Nothing on success
2837#
2838# Since: 1.1
2839##
2840{ 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
2841
2842##
2843# @xen-set-global-dirty-log:
2844#
2845# Enable or disable the global dirty log mode.
2846#
2847# @enable: true to enable, false to disable.
2848#
2849# Returns: nothing
2850#
2851# Since: 1.3
2852##
2853{ 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
2854
2855##
2856# @device_add:
2857#
2858# @driver: the name of the new device's driver
2859#
2860# @bus: #optional the device's parent bus (device tree path)
2861#
2862# @id: #optional the device's ID, must be unique
2863#
2864# Additional arguments depend on the type.
2865#
2866# Add a device.
2867#
2868# Notes:
2869# 1. For detailed information about this command, please refer to the
2870# 'docs/qdev-device-use.txt' file.
2871#
2872# 2. It's possible to list device properties by running QEMU with the
2873# "-device DEVICE,help" command-line argument, where DEVICE is the
2874# device's name
2875#
2876# Example:
2877#
2878# -> { "execute": "device_add",
2879# "arguments": { "driver": "e1000", "id": "net1",
2880# "bus": "pci.0",
2881# "mac": "52:54:00:12:34:56" } }
2882# <- { "return": {} }
2883#
2884# TODO: This command effectively bypasses QAPI completely due to its
2885# "additional arguments" business. It shouldn't have been added to
2886# the schema in this form. It should be qapified properly, or
2887# replaced by a properly qapified command.
2888#
2889# Since: 0.13
2890##
2891{ 'command': 'device_add',
2892 'data': {'driver': 'str', '*bus': 'str', '*id': 'str'},
2893 'gen': false } # so we can get the additional arguments
2894
2895##
2896# @device_del:
2897#
2898# Remove a device from a guest
2899#
2900# @id: the name or QOM path of the device
2901#
2902# Returns: Nothing on success
2903# If @id is not a valid device, DeviceNotFound
2904#
2905# Notes: When this command completes, the device may not be removed from the
2906# guest. Hot removal is an operation that requires guest cooperation.
2907# This command merely requests that the guest begin the hot removal
2908# process. Completion of the device removal process is signaled with a
2909# DEVICE_DELETED event. Guest reset will automatically complete removal
2910# for all devices.
2911#
2912# Since: 0.14.0
2913##
2914{ 'command': 'device_del', 'data': {'id': 'str'} }
2915
2916##
2917# @DumpGuestMemoryFormat:
2918#
2919# An enumeration of guest-memory-dump's format.
2920#
2921# @elf: elf format
2922#
2923# @kdump-zlib: kdump-compressed format with zlib-compressed
2924#
2925# @kdump-lzo: kdump-compressed format with lzo-compressed
2926#
2927# @kdump-snappy: kdump-compressed format with snappy-compressed
2928#
2929# Since: 2.0
2930##
2931{ 'enum': 'DumpGuestMemoryFormat',
2932 'data': [ 'elf', 'kdump-zlib', 'kdump-lzo', 'kdump-snappy' ] }
2933
2934##
2935# @dump-guest-memory:
2936#
2937# Dump guest's memory to vmcore. It is a synchronous operation that can take
2938# very long depending on the amount of guest memory.
2939#
2940# @paging: if true, do paging to get guest's memory mapping. This allows
2941# using gdb to process the core file.
2942#
2943# IMPORTANT: this option can make QEMU allocate several gigabytes
2944# of RAM. This can happen for a large guest, or a
2945# malicious guest pretending to be large.
2946#
2947# Also, paging=true has the following limitations:
2948#
2949# 1. The guest may be in a catastrophic state or can have corrupted
2950# memory, which cannot be trusted
2951# 2. The guest can be in real-mode even if paging is enabled. For
2952# example, the guest uses ACPI to sleep, and ACPI sleep state
2953# goes in real-mode
2954# 3. Currently only supported on i386 and x86_64.
2955#
2956# @protocol: the filename or file descriptor of the vmcore. The supported
2957# protocols are:
2958#
2959# 1. file: the protocol starts with "file:", and the following
2960# string is the file's path.
2961# 2. fd: the protocol starts with "fd:", and the following string
2962# is the fd's name.
2963#
2964# @detach: #optional if true, QMP will return immediately rather than
2965# waiting for the dump to finish. The user can track progress
2966# using "query-dump". (since 2.6).
2967#
2968# @begin: #optional if specified, the starting physical address.
2969#
2970# @length: #optional if specified, the memory size, in bytes. If you don't
2971# want to dump all guest's memory, please specify the start @begin
2972# and @length
2973#
2974# @format: #optional if specified, the format of guest memory dump. But non-elf
2975# format is conflict with paging and filter, ie. @paging, @begin and
2976# @length is not allowed to be specified with non-elf @format at the
2977# same time (since 2.0)
2978#
2979# Returns: nothing on success
2980#
2981# Since: 1.2
2982##
2983{ 'command': 'dump-guest-memory',
2984 'data': { 'paging': 'bool', 'protocol': 'str', '*detach': 'bool',
2985 '*begin': 'int', '*length': 'int',
2986 '*format': 'DumpGuestMemoryFormat'} }
2987
2988##
2989# @DumpStatus:
2990#
2991# Describe the status of a long-running background guest memory dump.
2992#
2993# @none: no dump-guest-memory has started yet.
2994#
2995# @active: there is one dump running in background.
2996#
2997# @completed: the last dump has finished successfully.
2998#
2999# @failed: the last dump has failed.
3000#
3001# Since: 2.6
3002##
3003{ 'enum': 'DumpStatus',
3004 'data': [ 'none', 'active', 'completed', 'failed' ] }
3005
3006##
3007# @DumpQueryResult:
3008#
3009# The result format for 'query-dump'.
3010#
3011# @status: enum of @DumpStatus, which shows current dump status
3012#
3013# @completed: bytes written in latest dump (uncompressed)
3014#
3015# @total: total bytes to be written in latest dump (uncompressed)
3016#
3017# Since: 2.6
3018##
3019{ 'struct': 'DumpQueryResult',
3020 'data': { 'status': 'DumpStatus',
3021 'completed': 'int',
3022 'total': 'int' } }
3023
3024##
3025# @query-dump:
3026#
3027# Query latest dump status.
3028#
3029# Returns: A @DumpStatus object showing the dump status.
3030#
3031# Since: 2.6
3032##
3033{ 'command': 'query-dump', 'returns': 'DumpQueryResult' }
3034
3035##
3036# @DumpGuestMemoryCapability:
3037#
3038# A list of the available formats for dump-guest-memory
3039#
3040# Since: 2.0
3041##
3042{ 'struct': 'DumpGuestMemoryCapability',
3043 'data': {
3044 'formats': ['DumpGuestMemoryFormat'] } }
3045
3046##
3047# @query-dump-guest-memory-capability:
3048#
3049# Returns the available formats for dump-guest-memory
3050#
3051# Returns: A @DumpGuestMemoryCapability object listing available formats for
3052# dump-guest-memory
3053#
3054# Since: 2.0
3055##
3056{ 'command': 'query-dump-guest-memory-capability',
3057 'returns': 'DumpGuestMemoryCapability' }
3058
3059##
3060# @dump-skeys:
3061#
3062# Dump guest's storage keys
3063#
3064# @filename: the path to the file to dump to
3065#
3066# This command is only supported on s390 architecture.
3067#
3068# Since: 2.5
3069##
3070{ 'command': 'dump-skeys',
3071 'data': { 'filename': 'str' } }
3072
3073##
3074# @netdev_add:
3075#
3076# Add a network backend.
3077#
3078# @type: the type of network backend. Current valid values are 'user', 'tap',
3079# 'vde', 'socket', 'dump' and 'bridge'
3080#
3081# @id: the name of the new network backend
3082#
3083# Additional arguments depend on the type.
3084#
3085# TODO: This command effectively bypasses QAPI completely due to its
3086# "additional arguments" business. It shouldn't have been added to
3087# the schema in this form. It should be qapified properly, or
3088# replaced by a properly qapified command.
3089#
3090# Since: 0.14.0
3091#
3092# Returns: Nothing on success
3093# If @type is not a valid network backend, DeviceNotFound
3094##
3095{ 'command': 'netdev_add',
3096 'data': {'type': 'str', 'id': 'str'},
3097 'gen': false } # so we can get the additional arguments
3098
3099##
3100# @netdev_del:
3101#
3102# Remove a network backend.
3103#
3104# @id: the name of the network backend to remove
3105#
3106# Returns: Nothing on success
3107# If @id is not a valid network backend, DeviceNotFound
3108#
3109# Since: 0.14.0
3110##
3111{ 'command': 'netdev_del', 'data': {'id': 'str'} }
3112
3113##
3114# @object-add:
3115#
3116# Create a QOM object.
3117#
3118# @qom-type: the class name for the object to be created
3119#
3120# @id: the name of the new object
3121#
3122# @props: #optional a dictionary of properties to be passed to the backend
3123#
3124# Returns: Nothing on success
3125# Error if @qom-type is not a valid class name
3126#
3127# Since: 2.0
3128##
3129{ 'command': 'object-add',
3130 'data': {'qom-type': 'str', 'id': 'str', '*props': 'any'} }
3131
3132##
3133# @object-del:
3134#
3135# Remove a QOM object.
3136#
3137# @id: the name of the QOM object to remove
3138#
3139# Returns: Nothing on success
3140# Error if @id is not a valid id for a QOM object
3141#
3142# Since: 2.0
3143##
3144{ 'command': 'object-del', 'data': {'id': 'str'} }
3145
3146##
3147# @NetdevNoneOptions:
3148#
3149# Use it alone to have zero network devices.
3150#
3151# Since: 1.2
3152##
3153{ 'struct': 'NetdevNoneOptions',
3154 'data': { } }
3155
3156##
3157# @NetLegacyNicOptions:
3158#
3159# Create a new Network Interface Card.
3160#
3161# @netdev: #optional id of -netdev to connect to
3162#
3163# @macaddr: #optional MAC address
3164#
3165# @model: #optional device model (e1000, rtl8139, virtio etc.)
3166#
3167# @addr: #optional PCI device address
3168#
3169# @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
3170#
3171# Since: 1.2
3172##
3173{ 'struct': 'NetLegacyNicOptions',
3174 'data': {
3175 '*netdev': 'str',
3176 '*macaddr': 'str',
3177 '*model': 'str',
3178 '*addr': 'str',
3179 '*vectors': 'uint32' } }
3180
3181##
3182# @String:
3183#
3184# A fat type wrapping 'str', to be embedded in lists.
3185#
3186# Since: 1.2
3187##
3188{ 'struct': 'String',
3189 'data': {
3190 'str': 'str' } }
3191
3192##
3193# @NetdevUserOptions:
3194#
3195# Use the user mode network stack which requires no administrator privilege to
3196# run.
3197#
3198# @hostname: #optional client hostname reported by the builtin DHCP server
3199#
3200# @restrict: #optional isolate the guest from the host
3201#
3202# @ipv4: #optional whether to support IPv4, default true for enabled
3203# (since 2.6)
3204#
3205# @ipv6: #optional whether to support IPv6, default true for enabled
3206# (since 2.6)
3207#
3208# @ip: #optional legacy parameter, use net= instead
3209#
3210# @net: #optional IP network address that the guest will see, in the
3211# form addr[/netmask] The netmask is optional, and can be
3212# either in the form a.b.c.d or as a number of valid top-most
3213# bits. Default is 10.0.2.0/24.
3214#
3215# @host: #optional guest-visible address of the host
3216#
3217# @tftp: #optional root directory of the built-in TFTP server
3218#
3219# @bootfile: #optional BOOTP filename, for use with tftp=
3220#
3221# @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
3222# assign
3223#
3224# @dns: #optional guest-visible address of the virtual nameserver
3225#
3226# @dnssearch: #optional list of DNS suffixes to search, passed as DHCP option
3227# to the guest
3228#
3229# @ipv6-prefix: #optional IPv6 network prefix (default is fec0::) (since
3230# 2.6). The network prefix is given in the usual
3231# hexadecimal IPv6 address notation.
3232#
3233# @ipv6-prefixlen: #optional IPv6 network prefix length (default is 64)
3234# (since 2.6)
3235#
3236# @ipv6-host: #optional guest-visible IPv6 address of the host (since 2.6)
3237#
3238# @ipv6-dns: #optional guest-visible IPv6 address of the virtual
3239# nameserver (since 2.6)
3240#
3241# @smb: #optional root directory of the built-in SMB server
3242#
3243# @smbserver: #optional IP address of the built-in SMB server
3244#
3245# @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
3246# endpoints
3247#
3248# @guestfwd: #optional forward guest TCP connections
3249#
3250# Since: 1.2
3251##
3252{ 'struct': 'NetdevUserOptions',
3253 'data': {
3254 '*hostname': 'str',
3255 '*restrict': 'bool',
3256 '*ipv4': 'bool',
3257 '*ipv6': 'bool',
3258 '*ip': 'str',
3259 '*net': 'str',
3260 '*host': 'str',
3261 '*tftp': 'str',
3262 '*bootfile': 'str',
3263 '*dhcpstart': 'str',
3264 '*dns': 'str',
3265 '*dnssearch': ['String'],
3266 '*ipv6-prefix': 'str',
3267 '*ipv6-prefixlen': 'int',
3268 '*ipv6-host': 'str',
3269 '*ipv6-dns': 'str',
3270 '*smb': 'str',
3271 '*smbserver': 'str',
3272 '*hostfwd': ['String'],
3273 '*guestfwd': ['String'] } }
3274
3275##
3276# @NetdevTapOptions:
3277#
3278# Connect the host TAP network interface name to the VLAN.
3279#
3280# @ifname: #optional interface name
3281#
3282# @fd: #optional file descriptor of an already opened tap
3283#
3284# @fds: #optional multiple file descriptors of already opened multiqueue capable
3285# tap
3286#
3287# @script: #optional script to initialize the interface
3288#
3289# @downscript: #optional script to shut down the interface
3290#
3291# @br: #optional bridge name (since 2.8)
3292#
3293# @helper: #optional command to execute to configure bridge
3294#
3295# @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
3296#
3297# @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
3298#
3299# @vhost: #optional enable vhost-net network accelerator
3300#
3301# @vhostfd: #optional file descriptor of an already opened vhost net device
3302#
3303# @vhostfds: #optional file descriptors of multiple already opened vhost net
3304# devices
3305#
3306# @vhostforce: #optional vhost on for non-MSIX virtio guests
3307#
3308# @queues: #optional number of queues to be created for multiqueue capable tap
3309#
3310# @poll-us: #optional maximum number of microseconds that could
3311# be spent on busy polling for tap (since 2.7)
3312#
3313# Since: 1.2
3314##
3315{ 'struct': 'NetdevTapOptions',
3316 'data': {
3317 '*ifname': 'str',
3318 '*fd': 'str',
3319 '*fds': 'str',
3320 '*script': 'str',
3321 '*downscript': 'str',
3322 '*br': 'str',
3323 '*helper': 'str',
3324 '*sndbuf': 'size',
3325 '*vnet_hdr': 'bool',
3326 '*vhost': 'bool',
3327 '*vhostfd': 'str',
3328 '*vhostfds': 'str',
3329 '*vhostforce': 'bool',
3330 '*queues': 'uint32',
3331 '*poll-us': 'uint32'} }
3332
3333##
3334# @NetdevSocketOptions:
3335#
3336# Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
3337# socket connection.
3338#
3339# @fd: #optional file descriptor of an already opened socket
3340#
3341# @listen: #optional port number, and optional hostname, to listen on
3342#
3343# @connect: #optional port number, and optional hostname, to connect to
3344#
3345# @mcast: #optional UDP multicast address and port number
3346#
3347# @localaddr: #optional source address and port for multicast and udp packets
3348#
3349# @udp: #optional UDP unicast address and port number
3350#
3351# Since: 1.2
3352##
3353{ 'struct': 'NetdevSocketOptions',
3354 'data': {
3355 '*fd': 'str',
3356 '*listen': 'str',
3357 '*connect': 'str',
3358 '*mcast': 'str',
3359 '*localaddr': 'str',
3360 '*udp': 'str' } }
3361
3362##
3363# @NetdevL2TPv3Options:
3364#
3365# Connect the VLAN to Ethernet over L2TPv3 Static tunnel
3366#
3367# @src: source address
3368#
3369# @dst: destination address
3370#
3371# @srcport: #optional source port - mandatory for udp, optional for ip
3372#
3373# @dstport: #optional destination port - mandatory for udp, optional for ip
3374#
3375# @ipv6: #optional - force the use of ipv6
3376#
3377# @udp: #optional - use the udp version of l2tpv3 encapsulation
3378#
3379# @cookie64: #optional - use 64 bit coookies
3380#
3381# @counter: #optional have sequence counter
3382#
3383# @pincounter: #optional pin sequence counter to zero -
3384# workaround for buggy implementations or
3385# networks with packet reorder
3386#
3387# @txcookie: #optional 32 or 64 bit transmit cookie
3388#
3389# @rxcookie: #optional 32 or 64 bit receive cookie
3390#
3391# @txsession: 32 bit transmit session
3392#
3393# @rxsession: #optional 32 bit receive session - if not specified
3394# set to the same value as transmit
3395#
3396# @offset: #optional additional offset - allows the insertion of
3397# additional application-specific data before the packet payload
3398#
3399# Since: 2.1
3400##
3401{ 'struct': 'NetdevL2TPv3Options',
3402 'data': {
3403 'src': 'str',
3404 'dst': 'str',
3405 '*srcport': 'str',
3406 '*dstport': 'str',
3407 '*ipv6': 'bool',
3408 '*udp': 'bool',
3409 '*cookie64': 'bool',
3410 '*counter': 'bool',
3411 '*pincounter': 'bool',
3412 '*txcookie': 'uint64',
3413 '*rxcookie': 'uint64',
3414 'txsession': 'uint32',
3415 '*rxsession': 'uint32',
3416 '*offset': 'uint32' } }
3417
3418##
3419# @NetdevVdeOptions:
3420#
3421# Connect the VLAN to a vde switch running on the host.
3422#
3423# @sock: #optional socket path
3424#
3425# @port: #optional port number
3426#
3427# @group: #optional group owner of socket
3428#
3429# @mode: #optional permissions for socket
3430#
3431# Since: 1.2
3432##
3433{ 'struct': 'NetdevVdeOptions',
3434 'data': {
3435 '*sock': 'str',
3436 '*port': 'uint16',
3437 '*group': 'str',
3438 '*mode': 'uint16' } }
3439
3440##
3441# @NetdevDumpOptions:
3442#
3443# Dump VLAN network traffic to a file.
3444#
3445# @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
3446# suffixes.
3447#
3448# @file: #optional dump file path (default is qemu-vlan0.pcap)
3449#
3450# Since: 1.2
3451##
3452{ 'struct': 'NetdevDumpOptions',
3453 'data': {
3454 '*len': 'size',
3455 '*file': 'str' } }
3456
3457##
3458# @NetdevBridgeOptions:
3459#
3460# Connect a host TAP network interface to a host bridge device.
3461#
3462# @br: #optional bridge name
3463#
3464# @helper: #optional command to execute to configure bridge
3465#
3466# Since: 1.2
3467##
3468{ 'struct': 'NetdevBridgeOptions',
3469 'data': {
3470 '*br': 'str',
3471 '*helper': 'str' } }
3472
3473##
3474# @NetdevHubPortOptions:
3475#
3476# Connect two or more net clients through a software hub.
3477#
3478# @hubid: hub identifier number
3479#
3480# Since: 1.2
3481##
3482{ 'struct': 'NetdevHubPortOptions',
3483 'data': {
3484 'hubid': 'int32' } }
3485
3486##
3487# @NetdevNetmapOptions:
3488#
3489# Connect a client to a netmap-enabled NIC or to a VALE switch port
3490#
3491# @ifname: Either the name of an existing network interface supported by
3492# netmap, or the name of a VALE port (created on the fly).
3493# A VALE port name is in the form 'valeXXX:YYY', where XXX and
3494# YYY are non-negative integers. XXX identifies a switch and
3495# YYY identifies a port of the switch. VALE ports having the
3496# same XXX are therefore connected to the same switch.
3497#
3498# @devname: #optional path of the netmap device (default: '/dev/netmap').
3499#
3500# Since: 2.0
3501##
3502{ 'struct': 'NetdevNetmapOptions',
3503 'data': {
3504 'ifname': 'str',
3505 '*devname': 'str' } }
3506
3507##
3508# @NetdevVhostUserOptions:
3509#
3510# Vhost-user network backend
3511#
3512# @chardev: name of a unix socket chardev
3513#
3514# @vhostforce: #optional vhost on for non-MSIX virtio guests (default: false).
3515#
3516# @queues: #optional number of queues to be created for multiqueue vhost-user
3517# (default: 1) (Since 2.5)
3518#
3519# Since: 2.1
3520##
3521{ 'struct': 'NetdevVhostUserOptions',
3522 'data': {
3523 'chardev': 'str',
3524 '*vhostforce': 'bool',
3525 '*queues': 'int' } }
3526
3527##
3528# @NetClientDriver:
3529#
3530# Available netdev drivers.
3531#
3532# Since: 2.7
3533##
3534{ 'enum': 'NetClientDriver',
3535 'data': [ 'none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'vde', 'dump',
3536 'bridge', 'hubport', 'netmap', 'vhost-user' ] }
3537
3538##
3539# @Netdev:
3540#
3541# Captures the configuration of a network device.
3542#
3543# @id: identifier for monitor commands.
3544#
3545# @type: Specify the driver used for interpreting remaining arguments.
3546#
3547# Since: 1.2
3548#
3549# 'l2tpv3' - since 2.1
3550##
3551{ 'union': 'Netdev',
3552 'base': { 'id': 'str', 'type': 'NetClientDriver' },
3553 'discriminator': 'type',
3554 'data': {
3555 'none': 'NetdevNoneOptions',
3556 'nic': 'NetLegacyNicOptions',
3557 'user': 'NetdevUserOptions',
3558 'tap': 'NetdevTapOptions',
3559 'l2tpv3': 'NetdevL2TPv3Options',
3560 'socket': 'NetdevSocketOptions',
3561 'vde': 'NetdevVdeOptions',
3562 'dump': 'NetdevDumpOptions',
3563 'bridge': 'NetdevBridgeOptions',
3564 'hubport': 'NetdevHubPortOptions',
3565 'netmap': 'NetdevNetmapOptions',
3566 'vhost-user': 'NetdevVhostUserOptions' } }
3567
3568##
3569# @NetLegacy:
3570#
3571# Captures the configuration of a network device; legacy.
3572#
3573# @vlan: #optional vlan number
3574#
3575# @id: #optional identifier for monitor commands
3576#
3577# @name: #optional identifier for monitor commands, ignored if @id is present
3578#
3579# @opts: device type specific properties (legacy)
3580#
3581# Since: 1.2
3582##
3583{ 'struct': 'NetLegacy',
3584 'data': {
3585 '*vlan': 'int32',
3586 '*id': 'str',
3587 '*name': 'str',
3588 'opts': 'NetLegacyOptions' } }
3589
3590##
3591# @NetLegacyOptions:
3592#
3593# Like Netdev, but for use only by the legacy command line options
3594#
3595# Since: 1.2
3596##
3597{ 'union': 'NetLegacyOptions',
3598 'data': {
3599 'none': 'NetdevNoneOptions',
3600 'nic': 'NetLegacyNicOptions',
3601 'user': 'NetdevUserOptions',
3602 'tap': 'NetdevTapOptions',
3603 'l2tpv3': 'NetdevL2TPv3Options',
3604 'socket': 'NetdevSocketOptions',
3605 'vde': 'NetdevVdeOptions',
3606 'dump': 'NetdevDumpOptions',
3607 'bridge': 'NetdevBridgeOptions',
3608 'netmap': 'NetdevNetmapOptions',
3609 'vhost-user': 'NetdevVhostUserOptions' } }
3610
3611##
3612# @NetFilterDirection:
3613#
3614# Indicates whether a netfilter is attached to a netdev's transmit queue or
3615# receive queue or both.
3616#
3617# @all: the filter is attached both to the receive and the transmit
3618# queue of the netdev (default).
3619#
3620# @rx: the filter is attached to the receive queue of the netdev,
3621# where it will receive packets sent to the netdev.
3622#
3623# @tx: the filter is attached to the transmit queue of the netdev,
3624# where it will receive packets sent by the netdev.
3625#
3626# Since: 2.5
3627##
3628{ 'enum': 'NetFilterDirection',
3629 'data': [ 'all', 'rx', 'tx' ] }
3630
3631##
3632# @InetSocketAddress:
3633#
3634# Captures a socket address or address range in the Internet namespace.
3635#
3636# @host: host part of the address
3637#
3638# @port: port part of the address, or lowest port if @to is present
3639#
3640# @to: highest port to try
3641#
3642# @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6
3643# #optional
3644#
3645# @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6
3646# #optional
3647#
3648# Since: 1.3
3649##
3650{ 'struct': 'InetSocketAddress',
3651 'data': {
3652 'host': 'str',
3653 'port': 'str',
3654 '*to': 'uint16',
3655 '*ipv4': 'bool',
3656 '*ipv6': 'bool' } }
3657
3658##
3659# @UnixSocketAddress:
3660#
3661# Captures a socket address in the local ("Unix socket") namespace.
3662#
3663# @path: filesystem path to use
3664#
3665# Since: 1.3
3666##
3667{ 'struct': 'UnixSocketAddress',
3668 'data': {
3669 'path': 'str' } }
3670
3671##
3672# @VsockSocketAddress:
3673#
3674# Captures a socket address in the vsock namespace.
3675#
3676# @cid: unique host identifier
3677# @port: port
3678#
3679# Note: string types are used to allow for possible future hostname or
3680# service resolution support.
3681#
3682# Since: 2.8
3683##
3684{ 'struct': 'VsockSocketAddress',
3685 'data': {
3686 'cid': 'str',
3687 'port': 'str' } }
3688
3689##
3690# @SocketAddress:
3691#
3692# Captures the address of a socket, which could also be a named file descriptor
3693#
3694# Since: 1.3
3695##
3696{ 'union': 'SocketAddress',
3697 'data': {
3698 'inet': 'InetSocketAddress',
3699 'unix': 'UnixSocketAddress',
3700 'vsock': 'VsockSocketAddress',
3701 'fd': 'String' } }
3702
3703##
3704# @getfd:
3705#
3706# Receive a file descriptor via SCM rights and assign it a name
3707#
3708# @fdname: file descriptor name
3709#
3710# Returns: Nothing on success
3711#
3712# Since: 0.14.0
3713#
3714# Notes: If @fdname already exists, the file descriptor assigned to
3715# it will be closed and replaced by the received file
3716# descriptor.
3717# The 'closefd' command can be used to explicitly close the
3718# file descriptor when it is no longer needed.
3719##
3720{ 'command': 'getfd', 'data': {'fdname': 'str'} }
3721
3722##
3723# @closefd:
3724#
3725# Close a file descriptor previously passed via SCM rights
3726#
3727# @fdname: file descriptor name
3728#
3729# Returns: Nothing on success
3730#
3731# Since: 0.14.0
3732##
3733{ 'command': 'closefd', 'data': {'fdname': 'str'} }
3734
3735##
3736# @MachineInfo:
3737#
3738# Information describing a machine.
3739#
3740# @name: the name of the machine
3741#
3742# @alias: #optional an alias for the machine name
3743#
3744# @is-default: #optional whether the machine is default
3745#
3746# @cpu-max: maximum number of CPUs supported by the machine type
3747# (since 1.5.0)
3748#
3749# @hotpluggable-cpus: cpu hotplug via -device is supported (since 2.7.0)
3750#
3751# Since: 1.2.0
3752##
3753{ 'struct': 'MachineInfo',
3754 'data': { 'name': 'str', '*alias': 'str',
3755 '*is-default': 'bool', 'cpu-max': 'int',
3756 'hotpluggable-cpus': 'bool'} }
3757
3758##
3759# @query-machines:
3760#
3761# Return a list of supported machines
3762#
3763# Returns: a list of MachineInfo
3764#
3765# Since: 1.2.0
3766##
3767{ 'command': 'query-machines', 'returns': ['MachineInfo'] }
3768
3769##
3770# @CpuDefinitionInfo:
3771#
3772# Virtual CPU definition.
3773#
3774# @name: the name of the CPU definition
3775#
3776# @migration-safe: #optional whether a CPU definition can be safely used for
3777# migration in combination with a QEMU compatibility machine
3778# when migrating between different QMU versions and between
3779# hosts with different sets of (hardware or software)
3780# capabilities. If not provided, information is not available
3781# and callers should not assume the CPU definition to be
3782# migration-safe. (since 2.8)
3783#
3784# @static: whether a CPU definition is static and will not change depending on
3785# QEMU version, machine type, machine options and accelerator options.
3786# A static model is always migration-safe. (since 2.8)
3787#
3788# @unavailable-features: #optional List of properties that prevent
3789# the CPU model from running in the current
3790# host. (since 2.8)
3791# @typename: Type name that can be used as argument to @device-list-properties,
3792# to introspect properties configurable using -cpu or -global.
3793# (since 2.9)
3794#
3795# @unavailable-features is a list of QOM property names that
3796# represent CPU model attributes that prevent the CPU from running.
3797# If the QOM property is read-only, that means there's no known
3798# way to make the CPU model run in the current host. Implementations
3799# that choose not to provide specific information return the
3800# property name "type".
3801# If the property is read-write, it means that it MAY be possible
3802# to run the CPU model in the current host if that property is
3803# changed. Management software can use it as hints to suggest or
3804# choose an alternative for the user, or just to generate meaningful
3805# error messages explaining why the CPU model can't be used.
3806# If @unavailable-features is an empty list, the CPU model is
3807# runnable using the current host and machine-type.
3808# If @unavailable-features is not present, runnability
3809# information for the CPU is not available.
3810#
3811# Since: 1.2.0
3812##
3813{ 'struct': 'CpuDefinitionInfo',
3814 'data': { 'name': 'str', '*migration-safe': 'bool', 'static': 'bool',
3815 '*unavailable-features': [ 'str' ], 'typename': 'str' } }
3816
3817##
3818# @query-cpu-definitions:
3819#
3820# Return a list of supported virtual CPU definitions
3821#
3822# Returns: a list of CpuDefInfo
3823#
3824# Since: 1.2.0
3825##
3826{ 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
3827
3828##
3829# @CpuModelInfo:
3830#
3831# Virtual CPU model.
3832#
3833# A CPU model consists of the name of a CPU definition, to which
3834# delta changes are applied (e.g. features added/removed). Most magic values
3835# that an architecture might require should be hidden behind the name.
3836# However, if required, architectures can expose relevant properties.
3837#
3838# @name: the name of the CPU definition the model is based on
3839# @props: #optional a dictionary of QOM properties to be applied
3840#
3841# Since: 2.8.0
3842##
3843{ 'struct': 'CpuModelInfo',
3844 'data': { 'name': 'str',
3845 '*props': 'any' } }
3846
3847##
3848# @CpuModelExpansionType:
3849#
3850# An enumeration of CPU model expansion types.
3851#
3852# @static: Expand to a static CPU model, a combination of a static base
3853# model name and property delta changes. As the static base model will
3854# never change, the expanded CPU model will be the same, independant of
3855# independent of QEMU version, machine type, machine options, and
3856# accelerator options. Therefore, the resulting model can be used by
3857# tooling without having to specify a compatibility machine - e.g. when
3858# displaying the "host" model. static CPU models are migration-safe.
3859#
3860# @full: Expand all properties. The produced model is not guaranteed to be
3861# migration-safe, but allows tooling to get an insight and work with
3862# model details.
3863#
3864# Since: 2.8.0
3865##
3866{ 'enum': 'CpuModelExpansionType',
3867 'data': [ 'static', 'full' ] }
3868
3869
3870##
3871# @CpuModelExpansionInfo:
3872#
3873# The result of a cpu model expansion.
3874#
3875# @model: the expanded CpuModelInfo.
3876#
3877# Since: 2.8.0
3878##
3879{ 'struct': 'CpuModelExpansionInfo',
3880 'data': { 'model': 'CpuModelInfo' } }
3881
3882
3883##
3884# @query-cpu-model-expansion:
3885#
3886# Expands a given CPU model (or a combination of CPU model + additional options)
3887# to different granularities, allowing tooling to get an understanding what a
3888# specific CPU model looks like in QEMU under a certain configuration.
3889#
3890# This interface can be used to query the "host" CPU model.
3891#
3892# The data returned by this command may be affected by:
3893#
3894# * QEMU version: CPU models may look different depending on the QEMU version.
3895# (Except for CPU models reported as "static" in query-cpu-definitions.)
3896# * machine-type: CPU model may look different depending on the machine-type.
3897# (Except for CPU models reported as "static" in query-cpu-definitions.)
3898# * machine options (including accelerator): in some architectures, CPU models
3899# may look different depending on machine and accelerator options. (Except for
3900# CPU models reported as "static" in query-cpu-definitions.)
3901# * "-cpu" arguments and global properties: arguments to the -cpu option and
3902# global properties may affect expansion of CPU models. Using
3903# query-cpu-model-expansion while using these is not advised.
3904#
3905# Some architectures may not support all expansion types. s390x supports
3906# "full" and "static".
3907#
3908# Returns: a CpuModelExpansionInfo. Returns an error if expanding CPU models is
3909# not supported, if the model cannot be expanded, if the model contains
3910# an unknown CPU definition name, unknown properties or properties
3911# with a wrong type. Also returns an error if an expansion type is
3912# not supported.
3913#
3914# Since: 2.8.0
3915##
3916{ 'command': 'query-cpu-model-expansion',
3917 'data': { 'type': 'CpuModelExpansionType',
3918 'model': 'CpuModelInfo' },
3919 'returns': 'CpuModelExpansionInfo' }
3920
3921##
3922# @CpuModelCompareResult:
3923#
3924# An enumeration of CPU model comparation results. The result is usually
3925# calculated using e.g. CPU features or CPU generations.
3926#
3927# @incompatible: If model A is incompatible to model B, model A is not
3928# guaranteed to run where model B runs and the other way around.
3929#
3930# @identical: If model A is identical to model B, model A is guaranteed to run
3931# where model B runs and the other way around.
3932#
3933# @superset: If model A is a superset of model B, model B is guaranteed to run
3934# where model A runs. There are no guarantees about the other way.
3935#
3936# @subset: If model A is a subset of model B, model A is guaranteed to run
3937# where model B runs. There are no guarantees about the other way.
3938#
3939# Since: 2.8.0
3940##
3941{ 'enum': 'CpuModelCompareResult',
3942 'data': [ 'incompatible', 'identical', 'superset', 'subset' ] }
3943
3944##
3945# @CpuModelCompareInfo:
3946#
3947# The result of a CPU model comparison.
3948#
3949# @result: The result of the compare operation.
3950# @responsible-properties: List of properties that led to the comparison result
3951# not being identical.
3952#
3953# @responsible-properties is a list of QOM property names that led to
3954# both CPUs not being detected as identical. For identical models, this
3955# list is empty.
3956# If a QOM property is read-only, that means there's no known way to make the
3957# CPU models identical. If the special property name "type" is included, the
3958# models are by definition not identical and cannot be made identical.
3959#
3960# Since: 2.8.0
3961##
3962{ 'struct': 'CpuModelCompareInfo',
3963 'data': {'result': 'CpuModelCompareResult',
3964 'responsible-properties': ['str']
3965 }
3966}
3967
3968##
3969# @query-cpu-model-comparison:
3970#
3971# Compares two CPU models, returning how they compare in a specific
3972# configuration. The results indicates how both models compare regarding
3973# runnability. This result can be used by tooling to make decisions if a
3974# certain CPU model will run in a certain configuration or if a compatible
3975# CPU model has to be created by baselining.
3976#
3977# Usually, a CPU model is compared against the maximum possible CPU model
3978# of a certain configuration (e.g. the "host" model for KVM). If that CPU
3979# model is identical or a subset, it will run in that configuration.
3980#
3981# The result returned by this command may be affected by:
3982#
3983# * QEMU version: CPU models may look different depending on the QEMU version.
3984# (Except for CPU models reported as "static" in query-cpu-definitions.)
3985# * machine-type: CPU model may look different depending on the machine-type.
3986# (Except for CPU models reported as "static" in query-cpu-definitions.)
3987# * machine options (including accelerator): in some architectures, CPU models
3988# may look different depending on machine and accelerator options. (Except for
3989# CPU models reported as "static" in query-cpu-definitions.)
3990# * "-cpu" arguments and global properties: arguments to the -cpu option and
3991# global properties may affect expansion of CPU models. Using
3992# query-cpu-model-expansion while using these is not advised.
3993#
3994# Some architectures may not support comparing CPU models. s390x supports
3995# comparing CPU models.
3996#
3997# Returns: a CpuModelBaselineInfo. Returns an error if comparing CPU models is
3998# not supported, if a model cannot be used, if a model contains
3999# an unknown cpu definition name, unknown properties or properties
4000# with wrong types.
4001#
4002# Since: 2.8.0
4003##
4004{ 'command': 'query-cpu-model-comparison',
4005 'data': { 'modela': 'CpuModelInfo', 'modelb': 'CpuModelInfo' },
4006 'returns': 'CpuModelCompareInfo' }
4007
4008##
4009# @CpuModelBaselineInfo:
4010#
4011# The result of a CPU model baseline.
4012#
4013# @model: the baselined CpuModelInfo.
4014#
4015# Since: 2.8.0
4016##
4017{ 'struct': 'CpuModelBaselineInfo',
4018 'data': { 'model': 'CpuModelInfo' } }
4019
4020##
4021# @query-cpu-model-baseline:
4022#
4023# Baseline two CPU models, creating a compatible third model. The created
4024# model will always be a static, migration-safe CPU model (see "static"
4025# CPU model expansion for details).
4026#
4027# This interface can be used by tooling to create a compatible CPU model out
4028# two CPU models. The created CPU model will be identical to or a subset of
4029# both CPU models when comparing them. Therefore, the created CPU model is
4030# guaranteed to run where the given CPU models run.
4031#
4032# The result returned by this command may be affected by:
4033#
4034# * QEMU version: CPU models may look different depending on the QEMU version.
4035# (Except for CPU models reported as "static" in query-cpu-definitions.)
4036# * machine-type: CPU model may look different depending on the machine-type.
4037# (Except for CPU models reported as "static" in query-cpu-definitions.)
4038# * machine options (including accelerator): in some architectures, CPU models
4039# may look different depending on machine and accelerator options. (Except for
4040# CPU models reported as "static" in query-cpu-definitions.)
4041# * "-cpu" arguments and global properties: arguments to the -cpu option and
4042# global properties may affect expansion of CPU models. Using
4043# query-cpu-model-expansion while using these is not advised.
4044#
4045# Some architectures may not support baselining CPU models. s390x supports
4046# baselining CPU models.
4047#
4048# Returns: a CpuModelBaselineInfo. Returns an error if baselining CPU models is
4049# not supported, if a model cannot be used, if a model contains
4050# an unknown cpu definition name, unknown properties or properties
4051# with wrong types.
4052#
4053# Since: 2.8.0
4054##
4055{ 'command': 'query-cpu-model-baseline',
4056 'data': { 'modela': 'CpuModelInfo',
4057 'modelb': 'CpuModelInfo' },
4058 'returns': 'CpuModelBaselineInfo' }
4059
4060##
4061# @AddfdInfo:
4062#
4063# Information about a file descriptor that was added to an fd set.
4064#
4065# @fdset-id: The ID of the fd set that @fd was added to.
4066#
4067# @fd: The file descriptor that was received via SCM rights and
4068# added to the fd set.
4069#
4070# Since: 1.2.0
4071##
4072{ 'struct': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
4073
4074##
4075# @add-fd:
4076#
4077# Add a file descriptor, that was passed via SCM rights, to an fd set.
4078#
4079# @fdset-id: #optional The ID of the fd set to add the file descriptor to.
4080#
4081# @opaque: #optional A free-form string that can be used to describe the fd.
4082#
4083# Returns: @AddfdInfo on success
4084# If file descriptor was not received, FdNotSupplied
4085# If @fdset-id is a negative value, InvalidParameterValue
4086#
4087# Notes: The list of fd sets is shared by all monitor connections.
4088#
4089# If @fdset-id is not specified, a new fd set will be created.
4090#
4091# Since: 1.2.0
4092##
4093{ 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
4094 'returns': 'AddfdInfo' }
4095
4096##
4097# @remove-fd:
4098#
4099# Remove a file descriptor from an fd set.
4100#
4101# @fdset-id: The ID of the fd set that the file descriptor belongs to.
4102#
4103# @fd: #optional The file descriptor that is to be removed.
4104#
4105# Returns: Nothing on success
4106# If @fdset-id or @fd is not found, FdNotFound
4107#
4108# Since: 1.2.0
4109#
4110# Notes: The list of fd sets is shared by all monitor connections.
4111#
4112# If @fd is not specified, all file descriptors in @fdset-id
4113# will be removed.
4114##
4115{ 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
4116
4117##
4118# @FdsetFdInfo:
4119#
4120# Information about a file descriptor that belongs to an fd set.
4121#
4122# @fd: The file descriptor value.
4123#
4124# @opaque: #optional A free-form string that can be used to describe the fd.
4125#
4126# Since: 1.2.0
4127##
4128{ 'struct': 'FdsetFdInfo',
4129 'data': {'fd': 'int', '*opaque': 'str'} }
4130
4131##
4132# @FdsetInfo:
4133#
4134# Information about an fd set.
4135#
4136# @fdset-id: The ID of the fd set.
4137#
4138# @fds: A list of file descriptors that belong to this fd set.
4139#
4140# Since: 1.2.0
4141##
4142{ 'struct': 'FdsetInfo',
4143 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
4144
4145##
4146# @query-fdsets:
4147#
4148# Return information describing all fd sets.
4149#
4150# Returns: A list of @FdsetInfo
4151#
4152# Since: 1.2.0
4153#
4154# Note: The list of fd sets is shared by all monitor connections.
4155#
4156##
4157{ 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
4158
4159##
4160# @TargetInfo:
4161#
4162# Information describing the QEMU target.
4163#
4164# @arch: the target architecture (eg "x86_64", "i386", etc)
4165#
4166# Since: 1.2.0
4167##
4168{ 'struct': 'TargetInfo',
4169 'data': { 'arch': 'str' } }
4170
4171##
4172# @query-target:
4173#
4174# Return information about the target for this QEMU
4175#
4176# Returns: TargetInfo
4177#
4178# Since: 1.2.0
4179##
4180{ 'command': 'query-target', 'returns': 'TargetInfo' }
4181
4182##
4183# @QKeyCode:
4184#
4185# An enumeration of key name.
4186#
4187# This is used by the @send-key command.
4188#
4189# @unmapped: since 2.0
4190# @pause: since 2.0
4191# @ro: since 2.4
4192# @kp_comma: since 2.4
4193# @kp_equals: since 2.6
4194# @power: since 2.6
4195# @hiragana: since 2.9
4196# @henkan: since 2.9
4197# @yen: since 2.9
4198#
4199# Since: 1.3.0
4200#
4201##
4202{ 'enum': 'QKeyCode',
4203 'data': [ 'unmapped',
4204 'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
4205 'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
4206 '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
4207 'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
4208 'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
4209 'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
4210 'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
4211 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
4212 'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
4213 'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
4214 'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
4215 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
4216 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
4217 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
4218 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause',
4219 'ro', 'hiragana', 'henkan', 'yen',
4220 'kp_comma', 'kp_equals', 'power' ] }
4221
4222##
4223# @KeyValue:
4224#
4225# Represents a keyboard key.
4226#
4227# Since: 1.3.0
4228##
4229{ 'union': 'KeyValue',
4230 'data': {
4231 'number': 'int',
4232 'qcode': 'QKeyCode' } }
4233
4234##
4235# @send-key:
4236#
4237# Send keys to guest.
4238#
4239# @keys: An array of @KeyValue elements. All @KeyValues in this array are
4240# simultaneously sent to the guest. A @KeyValue.number value is sent
4241# directly to the guest, while @KeyValue.qcode must be a valid
4242# @QKeyCode value
4243#
4244# @hold-time: #optional time to delay key up events, milliseconds. Defaults
4245# to 100
4246#
4247# Returns: Nothing on success
4248# If key is unknown or redundant, InvalidParameter
4249#
4250# Since: 1.3.0
4251#
4252##
4253{ 'command': 'send-key',
4254 'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
4255
4256##
4257# @screendump:
4258#
4259# Write a PPM of the VGA screen to a file.
4260#
4261# @filename: the path of a new PPM file to store the image
4262#
4263# Returns: Nothing on success
4264#
4265# Since: 0.14.0
4266##
4267{ 'command': 'screendump', 'data': {'filename': 'str'} }
4268
4269
4270##
4271# @ChardevCommon:
4272#
4273# Configuration shared across all chardev backends
4274#
4275# @logfile: #optional The name of a logfile to save output
4276# @logappend: #optional true to append instead of truncate
4277# (default to false to truncate)
4278#
4279# Since: 2.6
4280##
4281{ 'struct': 'ChardevCommon', 'data': { '*logfile': 'str',
4282 '*logappend': 'bool' } }
4283
4284##
4285# @ChardevFile:
4286#
4287# Configuration info for file chardevs.
4288#
4289# @in: #optional The name of the input file
4290# @out: The name of the output file
4291# @append: #optional Open the file in append mode (default false to
4292# truncate) (Since 2.6)
4293#
4294# Since: 1.4
4295##
4296{ 'struct': 'ChardevFile', 'data': { '*in' : 'str',
4297 'out' : 'str',
4298 '*append': 'bool' },
4299 'base': 'ChardevCommon' }
4300
4301##
4302# @ChardevHostdev:
4303#
4304# Configuration info for device and pipe chardevs.
4305#
4306# @device: The name of the special file for the device,
4307# i.e. /dev/ttyS0 on Unix or COM1: on Windows
4308#
4309# Since: 1.4
4310##
4311{ 'struct': 'ChardevHostdev', 'data': { 'device' : 'str' },
4312 'base': 'ChardevCommon' }
4313
4314##
4315# @ChardevSocket:
4316#
4317# Configuration info for (stream) socket chardevs.
4318#
4319# @addr: socket address to listen on (server=true)
4320# or connect to (server=false)
4321# @tls-creds: #optional the ID of the TLS credentials object (since 2.6)
4322# @server: #optional create server socket (default: true)
4323# @wait: #optional wait for incoming connection on server
4324# sockets (default: false).
4325# @nodelay: #optional set TCP_NODELAY socket option (default: false)
4326# @telnet: #optional enable telnet protocol on server
4327# sockets (default: false)
4328# @reconnect: #optional For a client socket, if a socket is disconnected,
4329# then attempt a reconnect after the given number of seconds.
4330# Setting this to zero disables this function. (default: 0)
4331# (Since: 2.2)
4332#
4333# Since: 1.4
4334##
4335{ 'struct': 'ChardevSocket', 'data': { 'addr' : 'SocketAddress',
4336 '*tls-creds' : 'str',
4337 '*server' : 'bool',
4338 '*wait' : 'bool',
4339 '*nodelay' : 'bool',
4340 '*telnet' : 'bool',
4341 '*reconnect' : 'int' },
4342 'base': 'ChardevCommon' }
4343
4344##
4345# @ChardevUdp:
4346#
4347# Configuration info for datagram socket chardevs.
4348#
4349# @remote: remote address
4350# @local: #optional local address
4351#
4352# Since: 1.5
4353##
4354{ 'struct': 'ChardevUdp', 'data': { 'remote' : 'SocketAddress',
4355 '*local' : 'SocketAddress' },
4356 'base': 'ChardevCommon' }
4357
4358##
4359# @ChardevMux:
4360#
4361# Configuration info for mux chardevs.
4362#
4363# @chardev: name of the base chardev.
4364#
4365# Since: 1.5
4366##
4367{ 'struct': 'ChardevMux', 'data': { 'chardev' : 'str' },
4368 'base': 'ChardevCommon' }
4369
4370##
4371# @ChardevStdio:
4372#
4373# Configuration info for stdio chardevs.
4374#
4375# @signal: #optional Allow signals (such as SIGINT triggered by ^C)
4376# be delivered to qemu. Default: true in -nographic mode,
4377# false otherwise.
4378#
4379# Since: 1.5
4380##
4381{ 'struct': 'ChardevStdio', 'data': { '*signal' : 'bool' },
4382 'base': 'ChardevCommon' }
4383
4384
4385##
4386# @ChardevSpiceChannel:
4387#
4388# Configuration info for spice vm channel chardevs.
4389#
4390# @type: kind of channel (for example vdagent).
4391#
4392# Since: 1.5
4393##
4394{ 'struct': 'ChardevSpiceChannel', 'data': { 'type' : 'str' },
4395 'base': 'ChardevCommon' }
4396
4397##
4398# @ChardevSpicePort:
4399#
4400# Configuration info for spice port chardevs.
4401#
4402# @fqdn: name of the channel (see docs/spice-port-fqdn.txt)
4403#
4404# Since: 1.5
4405##
4406{ 'struct': 'ChardevSpicePort', 'data': { 'fqdn' : 'str' },
4407 'base': 'ChardevCommon' }
4408
4409##
4410# @ChardevVC:
4411#
4412# Configuration info for virtual console chardevs.
4413#
4414# @width: console width, in pixels
4415# @height: console height, in pixels
4416# @cols: console width, in chars
4417# @rows: console height, in chars
4418#
4419# Since: 1.5
4420##
4421{ 'struct': 'ChardevVC', 'data': { '*width' : 'int',
4422 '*height' : 'int',
4423 '*cols' : 'int',
4424 '*rows' : 'int' },
4425 'base': 'ChardevCommon' }
4426
4427##
4428# @ChardevRingbuf:
4429#
4430# Configuration info for ring buffer chardevs.
4431#
4432# @size: #optional ring buffer size, must be power of two, default is 65536
4433#
4434# Since: 1.5
4435##
4436{ 'struct': 'ChardevRingbuf', 'data': { '*size' : 'int' },
4437 'base': 'ChardevCommon' }
4438
4439##
4440# @ChardevBackend:
4441#
4442# Configuration info for the new chardev backend.
4443#
4444# Since: 1.4 (testdev since 2.2)
4445##
4446{ 'union': 'ChardevBackend', 'data': { 'file' : 'ChardevFile',
4447 'serial' : 'ChardevHostdev',
4448 'parallel': 'ChardevHostdev',
4449 'pipe' : 'ChardevHostdev',
4450 'socket' : 'ChardevSocket',
4451 'udp' : 'ChardevUdp',
4452 'pty' : 'ChardevCommon',
4453 'null' : 'ChardevCommon',
4454 'mux' : 'ChardevMux',
4455 'msmouse': 'ChardevCommon',
4456 'braille': 'ChardevCommon',
4457 'testdev': 'ChardevCommon',
4458 'stdio' : 'ChardevStdio',
4459 'console': 'ChardevCommon',
4460 'spicevmc' : 'ChardevSpiceChannel',
4461 'spiceport' : 'ChardevSpicePort',
4462 'vc' : 'ChardevVC',
4463 'ringbuf': 'ChardevRingbuf',
4464 # next one is just for compatibility
4465 'memory' : 'ChardevRingbuf' } }
4466
4467##
4468# @ChardevReturn:
4469#
4470# Return info about the chardev backend just created.
4471#
4472# @pty: #optional name of the slave pseudoterminal device, present if
4473# and only if a chardev of type 'pty' was created
4474#
4475# Since: 1.4
4476##
4477{ 'struct' : 'ChardevReturn', 'data': { '*pty' : 'str' } }
4478
4479##
4480# @chardev-add:
4481#
4482# Add a character device backend
4483#
4484# @id: the chardev's ID, must be unique
4485# @backend: backend type and parameters
4486#
4487# Returns: ChardevReturn.
4488#
4489# Since: 1.4
4490##
4491{ 'command': 'chardev-add', 'data': {'id' : 'str',
4492 'backend' : 'ChardevBackend' },
4493 'returns': 'ChardevReturn' }
4494
4495##
4496# @chardev-remove:
4497#
4498# Remove a character device backend
4499#
4500# @id: the chardev's ID, must exist and not be in use
4501#
4502# Returns: Nothing on success
4503#
4504# Since: 1.4
4505##
4506{ 'command': 'chardev-remove', 'data': {'id': 'str'} }
4507
4508##
4509# @TpmModel:
4510#
4511# An enumeration of TPM models
4512#
4513# @tpm-tis: TPM TIS model
4514#
4515# Since: 1.5
4516##
4517{ 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] }
4518
4519##
4520# @query-tpm-models:
4521#
4522# Return a list of supported TPM models
4523#
4524# Returns: a list of TpmModel
4525#
4526# Since: 1.5
4527##
4528{ 'command': 'query-tpm-models', 'returns': ['TpmModel'] }
4529
4530##
4531# @TpmType:
4532#
4533# An enumeration of TPM types
4534#
4535# @passthrough: TPM passthrough type
4536#
4537# Since: 1.5
4538##
4539{ 'enum': 'TpmType', 'data': [ 'passthrough' ] }
4540
4541##
4542# @query-tpm-types:
4543#
4544# Return a list of supported TPM types
4545#
4546# Returns: a list of TpmType
4547#
4548# Since: 1.5
4549##
4550{ 'command': 'query-tpm-types', 'returns': ['TpmType'] }
4551
4552##
4553# @TPMPassthroughOptions:
4554#
4555# Information about the TPM passthrough type
4556#
4557# @path: #optional string describing the path used for accessing the TPM device
4558#
4559# @cancel-path: #optional string showing the TPM's sysfs cancel file
4560# for cancellation of TPM commands while they are executing
4561#
4562# Since: 1.5
4563##
4564{ 'struct': 'TPMPassthroughOptions', 'data': { '*path' : 'str',
4565 '*cancel-path' : 'str'} }
4566
4567##
4568# @TpmTypeOptions:
4569#
4570# A union referencing different TPM backend types' configuration options
4571#
4572# @type: 'passthrough' The configuration options for the TPM passthrough type
4573#
4574# Since: 1.5
4575##
4576{ 'union': 'TpmTypeOptions',
4577 'data': { 'passthrough' : 'TPMPassthroughOptions' } }
4578
4579##
4580# @TPMInfo:
4581#
4582# Information about the TPM
4583#
4584# @id: The Id of the TPM
4585#
4586# @model: The TPM frontend model
4587#
4588# @options: The TPM (backend) type configuration options
4589#
4590# Since: 1.5
4591##
4592{ 'struct': 'TPMInfo',
4593 'data': {'id': 'str',
4594 'model': 'TpmModel',
4595 'options': 'TpmTypeOptions' } }
4596
4597##
4598# @query-tpm:
4599#
4600# Return information about the TPM device
4601#
4602# Returns: @TPMInfo on success
4603#
4604# Since: 1.5
4605##
4606{ 'command': 'query-tpm', 'returns': ['TPMInfo'] }
4607
4608##
4609# @AcpiTableOptions:
4610#
4611# Specify an ACPI table on the command line to load.
4612#
4613# At most one of @file and @data can be specified. The list of files specified
4614# by any one of them is loaded and concatenated in order. If both are omitted,
4615# @data is implied.
4616#
4617# Other fields / optargs can be used to override fields of the generic ACPI
4618# table header; refer to the ACPI specification 5.0, section 5.2.6 System
4619# Description Table Header. If a header field is not overridden, then the
4620# corresponding value from the concatenated blob is used (in case of @file), or
4621# it is filled in with a hard-coded value (in case of @data).
4622#
4623# String fields are copied into the matching ACPI member from lowest address
4624# upwards, and silently truncated / NUL-padded to length.
4625#
4626# @sig: #optional table signature / identifier (4 bytes)
4627#
4628# @rev: #optional table revision number (dependent on signature, 1 byte)
4629#
4630# @oem_id: #optional OEM identifier (6 bytes)
4631#
4632# @oem_table_id: #optional OEM table identifier (8 bytes)
4633#
4634# @oem_rev: #optional OEM-supplied revision number (4 bytes)
4635#
4636# @asl_compiler_id: #optional identifier of the utility that created the table
4637# (4 bytes)
4638#
4639# @asl_compiler_rev: #optional revision number of the utility that created the
4640# table (4 bytes)
4641#
4642# @file: #optional colon (:) separated list of pathnames to load and
4643# concatenate as table data. The resultant binary blob is expected to
4644# have an ACPI table header. At least one file is required. This field
4645# excludes @data.
4646#
4647# @data: #optional colon (:) separated list of pathnames to load and
4648# concatenate as table data. The resultant binary blob must not have an
4649# ACPI table header. At least one file is required. This field excludes
4650# @file.
4651#
4652# Since: 1.5
4653##
4654{ 'struct': 'AcpiTableOptions',
4655 'data': {
4656 '*sig': 'str',
4657 '*rev': 'uint8',
4658 '*oem_id': 'str',
4659 '*oem_table_id': 'str',
4660 '*oem_rev': 'uint32',
4661 '*asl_compiler_id': 'str',
4662 '*asl_compiler_rev': 'uint32',
4663 '*file': 'str',
4664 '*data': 'str' }}
4665
4666##
4667# @CommandLineParameterType:
4668#
4669# Possible types for an option parameter.
4670#
4671# @string: accepts a character string
4672#
4673# @boolean: accepts "on" or "off"
4674#
4675# @number: accepts a number
4676#
4677# @size: accepts a number followed by an optional suffix (K)ilo,
4678# (M)ega, (G)iga, (T)era
4679#
4680# Since: 1.5
4681##
4682{ 'enum': 'CommandLineParameterType',
4683 'data': ['string', 'boolean', 'number', 'size'] }
4684
4685##
4686# @CommandLineParameterInfo:
4687#
4688# Details about a single parameter of a command line option.
4689#
4690# @name: parameter name
4691#
4692# @type: parameter @CommandLineParameterType
4693#
4694# @help: #optional human readable text string, not suitable for parsing.
4695#
4696# @default: #optional default value string (since 2.1)
4697#
4698# Since: 1.5
4699##
4700{ 'struct': 'CommandLineParameterInfo',
4701 'data': { 'name': 'str',
4702 'type': 'CommandLineParameterType',
4703 '*help': 'str',
4704 '*default': 'str' } }
4705
4706##
4707# @CommandLineOptionInfo:
4708#
4709# Details about a command line option, including its list of parameter details
4710#
4711# @option: option name
4712#
4713# @parameters: an array of @CommandLineParameterInfo
4714#
4715# Since: 1.5
4716##
4717{ 'struct': 'CommandLineOptionInfo',
4718 'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
4719
4720##
4721# @query-command-line-options:
4722#
4723# Query command line option schema.
4724#
4725# @option: #optional option name
4726#
4727# Returns: list of @CommandLineOptionInfo for all options (or for the given
4728# @option). Returns an error if the given @option doesn't exist.
4729#
4730# Since: 1.5
4731##
4732{'command': 'query-command-line-options', 'data': { '*option': 'str' },
4733 'returns': ['CommandLineOptionInfo'] }
4734
4735##
4736# @X86CPURegister32:
4737#
4738# A X86 32-bit register
4739#
4740# Since: 1.5
4741##
4742{ 'enum': 'X86CPURegister32',
4743 'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
4744
4745##
4746# @X86CPUFeatureWordInfo:
4747#
4748# Information about a X86 CPU feature word
4749#
4750# @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
4751#
4752# @cpuid-input-ecx: #optional Input ECX value for CPUID instruction for that
4753# feature word
4754#
4755# @cpuid-register: Output register containing the feature bits
4756#
4757# @features: value of output register, containing the feature bits
4758#
4759# Since: 1.5
4760##
4761{ 'struct': 'X86CPUFeatureWordInfo',
4762 'data': { 'cpuid-input-eax': 'int',
4763 '*cpuid-input-ecx': 'int',
4764 'cpuid-register': 'X86CPURegister32',
4765 'features': 'int' } }
4766
4767##
4768# @DummyForceArrays:
4769#
4770# Not used by QMP; hack to let us use X86CPUFeatureWordInfoList internally
4771#
4772# Since: 2.5
4773##
4774{ 'struct': 'DummyForceArrays',
4775 'data': { 'unused': ['X86CPUFeatureWordInfo'] } }
4776
4777
4778##
4779# @RxState:
4780#
4781# Packets receiving state
4782#
4783# @normal: filter assigned packets according to the mac-table
4784#
4785# @none: don't receive any assigned packet
4786#
4787# @all: receive all assigned packets
4788#
4789# Since: 1.6
4790##
4791{ 'enum': 'RxState', 'data': [ 'normal', 'none', 'all' ] }
4792
4793##
4794# @RxFilterInfo:
4795#
4796# Rx-filter information for a NIC.
4797#
4798# @name: net client name
4799#
4800# @promiscuous: whether promiscuous mode is enabled
4801#
4802# @multicast: multicast receive state
4803#
4804# @unicast: unicast receive state
4805#
4806# @vlan: vlan receive state (Since 2.0)
4807#
4808# @broadcast-allowed: whether to receive broadcast
4809#
4810# @multicast-overflow: multicast table is overflowed or not
4811#
4812# @unicast-overflow: unicast table is overflowed or not
4813#
4814# @main-mac: the main macaddr string
4815#
4816# @vlan-table: a list of active vlan id
4817#
4818# @unicast-table: a list of unicast macaddr string
4819#
4820# @multicast-table: a list of multicast macaddr string
4821#
4822# Since: 1.6
4823##
4824{ 'struct': 'RxFilterInfo',
4825 'data': {
4826 'name': 'str',
4827 'promiscuous': 'bool',
4828 'multicast': 'RxState',
4829 'unicast': 'RxState',
4830 'vlan': 'RxState',
4831 'broadcast-allowed': 'bool',
4832 'multicast-overflow': 'bool',
4833 'unicast-overflow': 'bool',
4834 'main-mac': 'str',
4835 'vlan-table': ['int'],
4836 'unicast-table': ['str'],
4837 'multicast-table': ['str'] }}
4838
4839##
4840# @query-rx-filter:
4841#
4842# Return rx-filter information for all NICs (or for the given NIC).
4843#
4844# @name: #optional net client name
4845#
4846# Returns: list of @RxFilterInfo for all NICs (or for the given NIC).
4847# Returns an error if the given @name doesn't exist, or given
4848# NIC doesn't support rx-filter querying, or given net client
4849# isn't a NIC.
4850#
4851# Since: 1.6
4852##
4853{ 'command': 'query-rx-filter', 'data': { '*name': 'str' },
4854 'returns': ['RxFilterInfo'] }
4855
4856##
4857# @InputButton:
4858#
4859# Button of a pointer input device (mouse, tablet).
4860#
4861# Since: 2.0
4862##
4863{ 'enum' : 'InputButton',
4864 'data' : [ 'left', 'middle', 'right', 'wheel-up', 'wheel-down' ] }
4865
4866##
4867# @InputAxis:
4868#
4869# Position axis of a pointer input device (mouse, tablet).
4870#
4871# Since: 2.0
4872##
4873{ 'enum' : 'InputAxis',
4874 'data' : [ 'x', 'y' ] }
4875
4876##
4877# @InputKeyEvent:
4878#
4879# Keyboard input event.
4880#
4881# @key: Which key this event is for.
4882# @down: True for key-down and false for key-up events.
4883#
4884# Since: 2.0
4885##
4886{ 'struct' : 'InputKeyEvent',
4887 'data' : { 'key' : 'KeyValue',
4888 'down' : 'bool' } }
4889
4890##
4891# @InputBtnEvent:
4892#
4893# Pointer button input event.
4894#
4895# @button: Which button this event is for.
4896# @down: True for key-down and false for key-up events.
4897#
4898# Since: 2.0
4899##
4900{ 'struct' : 'InputBtnEvent',
4901 'data' : { 'button' : 'InputButton',
4902 'down' : 'bool' } }
4903
4904##
4905# @InputMoveEvent:
4906#
4907# Pointer motion input event.
4908#
4909# @axis: Which axis is referenced by @value.
4910# @value: Pointer position. For absolute coordinates the
4911# valid range is 0 -> 0x7ffff
4912#
4913# Since: 2.0
4914##
4915{ 'struct' : 'InputMoveEvent',
4916 'data' : { 'axis' : 'InputAxis',
4917 'value' : 'int' } }
4918
4919##
4920# @InputEvent:
4921#
4922# Input event union.
4923#
4924# @type: the input type, one of:
4925# - 'key': Input event of Keyboard
4926# - 'btn': Input event of pointer buttons
4927# - 'rel': Input event of relative pointer motion
4928# - 'abs': Input event of absolute pointer motion
4929#
4930# Since: 2.0
4931##
4932{ 'union' : 'InputEvent',
4933 'data' : { 'key' : 'InputKeyEvent',
4934 'btn' : 'InputBtnEvent',
4935 'rel' : 'InputMoveEvent',
4936 'abs' : 'InputMoveEvent' } }
4937
4938##
4939# @input-send-event:
4940#
4941# Send input event(s) to guest.
4942#
4943# @device: #optional display device to send event(s) to.
4944# @head: #optional head to send event(s) to, in case the
4945# display device supports multiple scanouts.
4946# @events: List of InputEvent union.
4947#
4948# Returns: Nothing on success.
4949#
4950# The @display and @head parameters can be used to send the input
4951# event to specific input devices in case (a) multiple input devices
4952# of the same kind are added to the virtual machine and (b) you have
4953# configured input routing (see docs/multiseat.txt) for those input
4954# devices. The parameters work exactly like the device and head
4955# properties of input devices. If @device is missing, only devices
4956# that have no input routing config are admissible. If @device is
4957# specified, both input devices with and without input routing config
4958# are admissible, but devices with input routing config take
4959# precedence.
4960#
4961# Since: 2.6
4962##
4963{ 'command': 'input-send-event',
4964 'data': { '*device': 'str',
4965 '*head' : 'int',
4966 'events' : [ 'InputEvent' ] } }
4967
4968##
4969# @NumaOptions:
4970#
4971# A discriminated record of NUMA options. (for OptsVisitor)
4972#
4973# Since: 2.1
4974##
4975{ 'union': 'NumaOptions',
4976 'data': {
4977 'node': 'NumaNodeOptions' }}
4978
4979##
4980# @NumaNodeOptions:
4981#
4982# Create a guest NUMA node. (for OptsVisitor)
4983#
4984# @nodeid: #optional NUMA node ID (increase by 1 from 0 if omitted)
4985#
4986# @cpus: #optional VCPUs belonging to this node (assign VCPUS round-robin
4987# if omitted)
4988#
4989# @mem: #optional memory size of this node; mutually exclusive with @memdev.
4990# Equally divide total memory among nodes if both @mem and @memdev are
4991# omitted.
4992#
4993# @memdev: #optional memory backend object. If specified for one node,
4994# it must be specified for all nodes.
4995#
4996# Since: 2.1
4997##
4998{ 'struct': 'NumaNodeOptions',
4999 'data': {
5000 '*nodeid': 'uint16',
5001 '*cpus': ['uint16'],
5002 '*mem': 'size',
5003 '*memdev': 'str' }}
5004
5005##
5006# @HostMemPolicy:
5007#
5008# Host memory policy types
5009#
5010# @default: restore default policy, remove any nondefault policy
5011#
5012# @preferred: set the preferred host nodes for allocation
5013#
5014# @bind: a strict policy that restricts memory allocation to the
5015# host nodes specified
5016#
5017# @interleave: memory allocations are interleaved across the set
5018# of host nodes specified
5019#
5020# Since: 2.1
5021##
5022{ 'enum': 'HostMemPolicy',
5023 'data': [ 'default', 'preferred', 'bind', 'interleave' ] }
5024
5025##
5026# @Memdev:
5027#
5028# Information about memory backend
5029#
5030# @id: #optional backend's ID if backend has 'id' property (since 2.9)
5031#
5032# @size: memory backend size
5033#
5034# @merge: enables or disables memory merge support
5035#
5036# @dump: includes memory backend's memory in a core dump or not
5037#
5038# @prealloc: enables or disables memory preallocation
5039#
5040# @host-nodes: host nodes for its memory policy
5041#
5042# @policy: memory policy of memory backend
5043#
5044# Since: 2.1
5045##
5046{ 'struct': 'Memdev',
5047 'data': {
5048 '*id': 'str',
5049 'size': 'size',
5050 'merge': 'bool',
5051 'dump': 'bool',
5052 'prealloc': 'bool',
5053 'host-nodes': ['uint16'],
5054 'policy': 'HostMemPolicy' }}
5055
5056##
5057# @query-memdev:
5058#
5059# Returns information for all memory backends.
5060#
5061# Returns: a list of @Memdev.
5062#
5063# Since: 2.1
5064##
5065{ 'command': 'query-memdev', 'returns': ['Memdev'] }
5066
5067##
5068# @PCDIMMDeviceInfo:
5069#
5070# PCDIMMDevice state information
5071#
5072# @id: #optional device's ID
5073#
5074# @addr: physical address, where device is mapped
5075#
5076# @size: size of memory that the device provides
5077#
5078# @slot: slot number at which device is plugged in
5079#
5080# @node: NUMA node number where device is plugged in
5081#
5082# @memdev: memory backend linked with device
5083#
5084# @hotplugged: true if device was hotplugged
5085#
5086# @hotpluggable: true if device if could be added/removed while machine is running
5087#
5088# Since: 2.1
5089##
5090{ 'struct': 'PCDIMMDeviceInfo',
5091 'data': { '*id': 'str',
5092 'addr': 'int',
5093 'size': 'int',
5094 'slot': 'int',
5095 'node': 'int',
5096 'memdev': 'str',
5097 'hotplugged': 'bool',
5098 'hotpluggable': 'bool'
5099 }
5100}
5101
5102##
5103# @MemoryDeviceInfo:
5104#
5105# Union containing information about a memory device
5106#
5107# Since: 2.1
5108##
5109{ 'union': 'MemoryDeviceInfo', 'data': {'dimm': 'PCDIMMDeviceInfo'} }
5110
5111##
5112# @query-memory-devices:
5113#
5114# Lists available memory devices and their state
5115#
5116# Since: 2.1
5117##
5118{ 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] }
5119
5120##
5121# @ACPISlotType:
5122#
5123# @DIMM: memory slot
5124# @CPU: logical CPU slot (since 2.7)
5125##
5126{ 'enum': 'ACPISlotType', 'data': [ 'DIMM', 'CPU' ] }
5127
5128##
5129# @ACPIOSTInfo:
5130#
5131# OSPM Status Indication for a device
5132# For description of possible values of @source and @status fields
5133# see "_OST (OSPM Status Indication)" chapter of ACPI5.0 spec.
5134#
5135# @device: #optional device ID associated with slot
5136#
5137# @slot: slot ID, unique per slot of a given @slot-type
5138#
5139# @slot-type: type of the slot
5140#
5141# @source: an integer containing the source event
5142#
5143# @status: an integer containing the status code
5144#
5145# Since: 2.1
5146##
5147{ 'struct': 'ACPIOSTInfo',
5148 'data' : { '*device': 'str',
5149 'slot': 'str',
5150 'slot-type': 'ACPISlotType',
5151 'source': 'int',
5152 'status': 'int' } }
5153
5154##
5155# @query-acpi-ospm-status:
5156#
5157# Lists ACPI OSPM status of ACPI device objects,
5158# which might be reported via _OST method
5159#
5160# Since: 2.1
5161##
5162{ 'command': 'query-acpi-ospm-status', 'returns': ['ACPIOSTInfo'] }
5163
5164##
5165# @WatchdogExpirationAction:
5166#
5167# An enumeration of the actions taken when the watchdog device's timer is
5168# expired
5169#
5170# @reset: system resets
5171#
5172# @shutdown: system shutdown, note that it is similar to @powerdown, which
5173# tries to set to system status and notify guest
5174#
5175# @poweroff: system poweroff, the emulator program exits
5176#
5177# @pause: system pauses, similar to @stop
5178#
5179# @debug: system enters debug state
5180#
5181# @none: nothing is done
5182#
5183# @inject-nmi: a non-maskable interrupt is injected into the first VCPU (all
5184# VCPUS on x86) (since 2.4)
5185#
5186# Since: 2.1
5187##
5188{ 'enum': 'WatchdogExpirationAction',
5189 'data': [ 'reset', 'shutdown', 'poweroff', 'pause', 'debug', 'none',
5190 'inject-nmi' ] }
5191
5192##
5193# @IoOperationType:
5194#
5195# An enumeration of the I/O operation types
5196#
5197# @read: read operation
5198#
5199# @write: write operation
5200#
5201# Since: 2.1
5202##
5203{ 'enum': 'IoOperationType',
5204 'data': [ 'read', 'write' ] }
5205
5206##
5207# @GuestPanicAction:
5208#
5209# An enumeration of the actions taken when guest OS panic is detected
5210#
5211# @pause: system pauses
5212#
5213# Since: 2.1 (poweroff since 2.8)
5214##
5215{ 'enum': 'GuestPanicAction',
5216 'data': [ 'pause', 'poweroff' ] }
5217
5218##
5219# @rtc-reset-reinjection:
5220#
5221# This command will reset the RTC interrupt reinjection backlog.
5222# Can be used if another mechanism to synchronize guest time
5223# is in effect, for example QEMU guest agent's guest-set-time
5224# command.
5225#
5226# Since: 2.1
5227##
5228{ 'command': 'rtc-reset-reinjection' }
5229
5230# Rocker ethernet network switch
5231{ 'include': 'qapi/rocker.json' }
5232
5233##
5234# @ReplayMode:
5235#
5236# Mode of the replay subsystem.
5237#
5238# @none: normal execution mode. Replay or record are not enabled.
5239#
5240# @record: record mode. All non-deterministic data is written into the
5241# replay log.
5242#
5243# @play: replay mode. Non-deterministic data required for system execution
5244# is read from the log.
5245#
5246# Since: 2.5
5247##
5248{ 'enum': 'ReplayMode',
5249 'data': [ 'none', 'record', 'play' ] }
5250
5251##
5252# @xen-load-devices-state:
5253#
5254# Load the state of all devices from file. The RAM and the block devices
5255# of the VM are not loaded by this command.
5256#
5257# @filename: the file to load the state of the devices from as binary
5258# data. See xen-save-devices-state.txt for a description of the binary
5259# format.
5260#
5261# Since: 2.7
5262##
5263{ 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} }
5264
5265##
5266# @GICCapability:
5267#
5268# The struct describes capability for a specific GIC (Generic
5269# Interrupt Controller) version. These bits are not only decided by
5270# QEMU/KVM software version, but also decided by the hardware that
5271# the program is running upon.
5272#
5273# @version: version of GIC to be described. Currently, only 2 and 3
5274# are supported.
5275#
5276# @emulated: whether current QEMU/hardware supports emulated GIC
5277# device in user space.
5278#
5279# @kernel: whether current QEMU/hardware supports hardware
5280# accelerated GIC device in kernel.
5281#
5282# Since: 2.6
5283##
5284{ 'struct': 'GICCapability',
5285 'data': { 'version': 'int',
5286 'emulated': 'bool',
5287 'kernel': 'bool' } }
5288
5289##
5290# @query-gic-capabilities:
5291#
5292# This command is ARM-only. It will return a list of GICCapability
5293# objects that describe its capability bits.
5294#
5295# Returns: a list of GICCapability objects.
5296#
5297# Since: 2.6
5298##
5299{ 'command': 'query-gic-capabilities', 'returns': ['GICCapability'] }
5300
5301##
5302# @CpuInstanceProperties:
5303#
5304# List of properties to be used for hotplugging a CPU instance,
5305# it should be passed by management with device_add command when
5306# a CPU is being hotplugged.
5307#
5308# @node-id: #optional NUMA node ID the CPU belongs to
5309# @socket-id: #optional socket number within node/board the CPU belongs to
5310# @core-id: #optional core number within socket the CPU belongs to
5311# @thread-id: #optional thread number within core the CPU belongs to
5312#
5313# Note: currently there are 4 properties that could be present
5314# but management should be prepared to pass through other
5315# properties with device_add command to allow for future
5316# interface extension. This also requires the filed names to be kept in
5317# sync with the properties passed to -device/device_add.
5318#
5319# Since: 2.7
5320##
5321{ 'struct': 'CpuInstanceProperties',
5322 'data': { '*node-id': 'int',
5323 '*socket-id': 'int',
5324 '*core-id': 'int',
5325 '*thread-id': 'int'
5326 }
5327}
5328
5329##
5330# @HotpluggableCPU:
5331#
5332# @type: CPU object type for usage with device_add command
5333# @props: list of properties to be used for hotplugging CPU
5334# @vcpus-count: number of logical VCPU threads @HotpluggableCPU provides
5335# @qom-path: #optional link to existing CPU object if CPU is present or
5336# omitted if CPU is not present.
5337#
5338# Since: 2.7
5339##
5340{ 'struct': 'HotpluggableCPU',
5341 'data': { 'type': 'str',
5342 'vcpus-count': 'int',
5343 'props': 'CpuInstanceProperties',
5344 '*qom-path': 'str'
5345 }
5346}
5347
5348##
5349# @query-hotpluggable-cpus:
5350#
5351# Returns: a list of HotpluggableCPU objects.
5352#
5353# Since: 2.7
5354##
5355{ 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU'] }
This page took 0.080433 seconds and 4 git commands to generate.