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