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