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