]> git.proxmox.com Git - mirror_qemu.git/blame - qapi-schema.json
block: Add support for throttling burst max in QMP and the command line.
[mirror_qemu.git] / qapi-schema.json
CommitLineData
e3193601
AL
1# -*- Mode: Python -*-
2#
3# QAPI Schema
48a32bed 4
dcafd323
LC
5##
6# @ErrorClass
7#
8# QEMU error classes
9#
10# @GenericError: this is used for errors that don't require a specific error
11# class. This should be the default case for most errors
12#
13# @CommandNotFound: the requested command has not been found
14#
15# @DeviceEncrypted: the requested operation can't be fulfilled because the
16# selected device is encrypted
17#
18# @DeviceNotActive: a device has failed to be become active
19#
20# @DeviceNotFound: the requested device has not been found
21#
22# @KVMMissingCap: the requested operation can't be fulfilled because a
23# required KVM capability is missing
24#
dcafd323
LC
25# Since: 1.2
26##
27{ 'enum': 'ErrorClass',
28 'data': [ 'GenericError', 'CommandNotFound', 'DeviceEncrypted',
1e998146 29 'DeviceNotActive', 'DeviceNotFound', 'KVMMissingCap' ] }
dcafd323 30
b224e5e2
LC
31##
32# @add_client
33#
34# Allow client connections for VNC, Spice and socket based
35# character devices to be passed in to QEMU via SCM_RIGHTS.
36#
37# @protocol: protocol name. Valid names are "vnc", "spice" or the
38# name of a character device (eg. from -chardev id=XXXX)
39#
40# @fdname: file descriptor name previously passed via 'getfd' command
41#
42# @skipauth: #optional whether to skip authentication. Only applies
43# to "vnc" and "spice" protocols
44#
45# @tls: #optional whether to perform TLS. Only applies to the "spice"
46# protocol
47#
48# Returns: nothing on success.
49#
50# Since: 0.14.0
51##
52{ 'command': 'add_client',
53 'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
54 '*tls': 'bool' } }
55
48a32bed
AL
56##
57# @NameInfo:
58#
59# Guest name information.
60#
61# @name: #optional The name of the guest
62#
63# Since 0.14.0
64##
65{ 'type': 'NameInfo', 'data': {'*name': 'str'} }
66
67##
68# @query-name:
69#
70# Return the name information of a guest.
71#
72# Returns: @NameInfo of the guest
73#
74# Since 0.14.0
75##
76{ 'command': 'query-name', 'returns': 'NameInfo' }
b9c15f16
LC
77
78##
79# @VersionInfo:
80#
81# A description of QEMU's version.
82#
83# @qemu.major: The major version of QEMU
84#
85# @qemu.minor: The minor version of QEMU
86#
87# @qemu.micro: The micro version of QEMU. By current convention, a micro
88# version of 50 signifies a development branch. A micro version
89# greater than or equal to 90 signifies a release candidate for
90# the next minor version. A micro version of less than 50
91# signifies a stable release.
92#
93# @package: QEMU will always set this field to an empty string. Downstream
94# versions of QEMU should set this to a non-empty string. The
95# exact format depends on the downstream however it highly
96# recommended that a unique name is used.
97#
98# Since: 0.14.0
99##
100{ 'type': 'VersionInfo',
101 'data': {'qemu': {'major': 'int', 'minor': 'int', 'micro': 'int'},
102 'package': 'str'} }
103
104##
105# @query-version:
106#
107# Returns the current version of QEMU.
108#
109# Returns: A @VersionInfo object describing the current version of QEMU.
110#
111# Since: 0.14.0
112##
113{ 'command': 'query-version', 'returns': 'VersionInfo' }
292a2602
LC
114
115##
116# @KvmInfo:
117#
118# Information about support for KVM acceleration
119#
120# @enabled: true if KVM acceleration is active
121#
122# @present: true if KVM acceleration is built into this executable
123#
124# Since: 0.14.0
125##
126{ 'type': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
127
128##
129# @query-kvm:
130#
131# Returns information about KVM acceleration
132#
133# Returns: @KvmInfo
134#
135# Since: 0.14.0
136##
137{ 'command': 'query-kvm', 'returns': 'KvmInfo' }
138
1fa9a5e4
LC
139##
140# @RunState
141#
6932a69b 142# An enumeration of VM run states.
1fa9a5e4
LC
143#
144# @debug: QEMU is running on a debugger
145#
0a24c7b1
LC
146# @finish-migrate: guest is paused to finish the migration process
147#
1e998146
PB
148# @inmigrate: guest is paused waiting for an incoming migration. Note
149# that this state does not tell whether the machine will start at the
150# end of the migration. This depends on the command-line -S option and
151# any invocation of 'stop' or 'cont' that has happened since QEMU was
152# started.
1fa9a5e4
LC
153#
154# @internal-error: An internal error that prevents further guest execution
155# has occurred
156#
157# @io-error: the last IOP has failed and the device is configured to pause
158# on I/O errors
159#
160# @paused: guest has been paused via the 'stop' command
161#
162# @postmigrate: guest is paused following a successful 'migrate'
163#
164# @prelaunch: QEMU was started with -S and guest has not started
165#
1fa9a5e4
LC
166# @restore-vm: guest is paused to restore VM state
167#
168# @running: guest is actively running
169#
170# @save-vm: guest is paused to save the VM state
171#
172# @shutdown: guest is shut down (and -no-shutdown is in use)
173#
ad02b96a
LC
174# @suspended: guest is suspended (ACPI S3)
175#
1fa9a5e4 176# @watchdog: the watchdog action is configured to pause and has been triggered
ede085b3
HT
177#
178# @guest-panicked: guest has been panicked as a result of guest OS panic
1fa9a5e4
LC
179##
180{ 'enum': 'RunState',
181 'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
182 'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
ede085b3
HT
183 'running', 'save-vm', 'shutdown', 'suspended', 'watchdog',
184 'guest-panicked' ] }
1fa9a5e4 185
c249ee68
BC
186##
187# @SnapshotInfo
188#
189# @id: unique snapshot id
190#
191# @name: user chosen name
192#
193# @vm-state-size: size of the VM state
194#
195# @date-sec: UTC date of the snapshot in seconds
196#
197# @date-nsec: fractional part in nano seconds to be used with date-sec
198#
199# @vm-clock-sec: VM clock relative to boot in seconds
200#
201# @vm-clock-nsec: fractional part in nano seconds to be used with vm-clock-sec
202#
203# Since: 1.3
204#
205##
206
207{ 'type': 'SnapshotInfo',
208 'data': { 'id': 'str', 'name': 'str', 'vm-state-size': 'int',
209 'date-sec': 'int', 'date-nsec': 'int',
210 'vm-clock-sec': 'int', 'vm-clock-nsec': 'int' } }
211
212##
213# @ImageInfo:
214#
215# Information about a QEMU image file
216#
217# @filename: name of the image file
218#
219# @format: format of the image file
220#
221# @virtual-size: maximum capacity in bytes of the image
222#
223# @actual-size: #optional actual size on disk in bytes of the image
224#
225# @dirty-flag: #optional true if image is not cleanly closed
226#
227# @cluster-size: #optional size of a cluster in bytes
228#
229# @encrypted: #optional true if the image is encrypted
230#
231# @backing-filename: #optional name of the backing file
232#
233# @full-backing-filename: #optional full path of the backing file
234#
235# @backing-filename-format: #optional the format of the backing file
236#
237# @snapshots: #optional list of VM snapshots
238#
553a7e87
WX
239# @backing-image: #optional info of the backing image (since 1.6)
240#
c249ee68
BC
241# Since: 1.3
242#
243##
244
245{ 'type': 'ImageInfo',
246 'data': {'filename': 'str', 'format': 'str', '*dirty-flag': 'bool',
247 '*actual-size': 'int', 'virtual-size': 'int',
248 '*cluster-size': 'int', '*encrypted': 'bool',
249 '*backing-filename': 'str', '*full-backing-filename': 'str',
553a7e87
WX
250 '*backing-filename-format': 'str', '*snapshots': ['SnapshotInfo'],
251 '*backing-image': 'ImageInfo' } }
c249ee68 252
8599ea4c
FS
253##
254# @ImageCheck:
255#
256# Information about a QEMU image file check
257#
258# @filename: name of the image file checked
259#
260# @format: format of the image file checked
261#
262# @check-errors: number of unexpected errors occurred during check
263#
264# @image-end-offset: #optional offset (in bytes) where the image ends, this
265# field is present if the driver for the image format
266# supports it
267#
268# @corruptions: #optional number of corruptions found during the check if any
269#
270# @leaks: #optional number of leaks found during the check if any
271#
272# @corruptions-fixed: #optional number of corruptions fixed during the check
273# if any
274#
275# @leaks-fixed: #optional number of leaks fixed during the check if any
276#
277# @total-clusters: #optional total number of clusters, this field is present
278# if the driver for the image format supports it
279#
280# @allocated-clusters: #optional total number of allocated clusters, this
281# field is present if the driver for the image format
282# supports it
283#
284# @fragmented-clusters: #optional total number of fragmented clusters, this
285# field is present if the driver for the image format
286# supports it
287#
e6439d78
SH
288# @compressed-clusters: #optional total number of compressed clusters, this
289# field is present if the driver for the image format
290# supports it
291#
8599ea4c
FS
292# Since: 1.4
293#
294##
295
296{ 'type': 'ImageCheck',
297 'data': {'filename': 'str', 'format': 'str', 'check-errors': 'int',
298 '*image-end-offset': 'int', '*corruptions': 'int', '*leaks': 'int',
299 '*corruptions-fixed': 'int', '*leaks-fixed': 'int',
300 '*total-clusters': 'int', '*allocated-clusters': 'int',
e6439d78 301 '*fragmented-clusters': 'int', '*compressed-clusters': 'int' } }
8599ea4c 302
1fa9a5e4
LC
303##
304# @StatusInfo:
305#
306# Information about VCPU run state
307#
308# @running: true if all VCPUs are runnable, false if not runnable
309#
310# @singlestep: true if VCPUs are in single-step mode
311#
312# @status: the virtual machine @RunState
313#
314# Since: 0.14.0
315#
316# Notes: @singlestep is enabled through the GDB stub
317##
318{ 'type': 'StatusInfo',
319 'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
320
321##
322# @query-status:
323#
324# Query the run status of all VCPUs
325#
326# Returns: @StatusInfo reflecting all VCPUs
327#
328# Since: 0.14.0
329##
330{ 'command': 'query-status', 'returns': 'StatusInfo' }
331
efab767e
LC
332##
333# @UuidInfo:
334#
335# Guest UUID information.
336#
337# @UUID: the UUID of the guest
338#
339# Since: 0.14.0
340#
341# Notes: If no UUID was specified for the guest, a null UUID is returned.
342##
343{ 'type': 'UuidInfo', 'data': {'UUID': 'str'} }
344
345##
346# @query-uuid:
347#
348# Query the guest UUID information.
349#
350# Returns: The @UuidInfo for the guest
351#
352# Since 0.14.0
353##
354{ 'command': 'query-uuid', 'returns': 'UuidInfo' }
355
c5a415a0
LC
356##
357# @ChardevInfo:
358#
359# Information about a character device.
360#
361# @label: the label of the character device
362#
363# @filename: the filename of the character device
364#
365# Notes: @filename is encoded using the QEMU command line character device
366# encoding. See the QEMU man page for details.
367#
368# Since: 0.14.0
369##
370{ 'type': 'ChardevInfo', 'data': {'label': 'str', 'filename': 'str'} }
371
372##
373# @query-chardev:
374#
375# Returns information about current character devices.
376#
377# Returns: a list of @ChardevInfo
378#
379# Since: 0.14.0
380##
381{ 'command': 'query-chardev', 'returns': ['ChardevInfo'] }
aa9b79bc 382
1f590cf9
LL
383##
384# @DataFormat:
385#
386# An enumeration of data format.
387#
3949e594 388# @utf8: Data is a UTF-8 string (RFC 3629)
1f590cf9 389#
3949e594 390# @base64: Data is Base64 encoded binary (RFC 3548)
1f590cf9
LL
391#
392# Since: 1.4
393##
ad0f171e 394{ 'enum': 'DataFormat',
1f590cf9
LL
395 'data': [ 'utf8', 'base64' ] }
396
397##
3949e594 398# @ringbuf-write:
1f590cf9 399#
3949e594 400# Write to a ring buffer character device.
1f590cf9 401#
3949e594 402# @device: the ring buffer character device name
1f590cf9 403#
3949e594 404# @data: data to write
1f590cf9 405#
3949e594
MA
406# @format: #optional data encoding (default 'utf8').
407# - base64: data must be base64 encoded text. Its binary
408# decoding gets written.
409# Bug: invalid base64 is currently not rejected.
410# Whitespace *is* invalid.
411# - utf8: data's UTF-8 encoding is written
412# - data itself is always Unicode regardless of format, like
413# any other string.
1f590cf9
LL
414#
415# Returns: Nothing on success
1f590cf9
LL
416#
417# Since: 1.4
418##
3949e594 419{ 'command': 'ringbuf-write',
82e59a67 420 'data': {'device': 'str', 'data': 'str',
1f590cf9
LL
421 '*format': 'DataFormat'} }
422
49b6d722 423##
3949e594 424# @ringbuf-read:
49b6d722 425#
3949e594 426# Read from a ring buffer character device.
49b6d722 427#
3949e594 428# @device: the ring buffer character device name
49b6d722 429#
3949e594 430# @size: how many bytes to read at most
49b6d722 431#
3949e594
MA
432# @format: #optional data encoding (default 'utf8').
433# - base64: the data read is returned in base64 encoding.
434# - utf8: the data read is interpreted as UTF-8.
435# Bug: can screw up when the buffer contains invalid UTF-8
436# sequences, NUL characters, after the ring buffer lost
437# data, and when reading stops because the size limit is
438# reached.
439# - The return value is always Unicode regardless of format,
440# like any other string.
49b6d722 441#
3ab651fc 442# Returns: data read from the device
49b6d722
LL
443#
444# Since: 1.4
445##
3949e594 446{ 'command': 'ringbuf-read',
49b6d722 447 'data': {'device': 'str', 'size': 'int', '*format': 'DataFormat'},
3ab651fc 448 'returns': 'str' }
49b6d722 449
aa9b79bc
LC
450##
451# @CommandInfo:
452#
453# Information about a QMP command
454#
455# @name: The command name
456#
457# Since: 0.14.0
458##
459{ 'type': 'CommandInfo', 'data': {'name': 'str'} }
460
461##
462# @query-commands:
463#
464# Return a list of supported QMP commands by this server
465#
466# Returns: A list of @CommandInfo for all supported commands
467#
468# Since: 0.14.0
469##
470{ 'command': 'query-commands', 'returns': ['CommandInfo'] }
471
4860853d
DB
472##
473# @EventInfo:
474#
475# Information about a QMP event
476#
477# @name: The event name
478#
479# Since: 1.2.0
480##
481{ 'type': 'EventInfo', 'data': {'name': 'str'} }
482
483##
484# @query-events:
485#
486# Return a list of supported QMP events by this server
487#
488# Returns: A list of @EventInfo for all supported events
489#
490# Since: 1.2.0
491##
492{ 'command': 'query-events', 'returns': ['EventInfo'] }
493
791e7c82
LC
494##
495# @MigrationStats
496#
497# Detailed migration status.
498#
499# @transferred: amount of bytes already transferred to the target VM
500#
501# @remaining: amount of bytes remaining to be transferred to the target VM
502#
503# @total: total amount of bytes involved in the migration process
504#
f1c72795
PL
505# @duplicate: number of duplicate (zero) pages (since 1.2)
506#
507# @skipped: number of skipped zero pages (since 1.5)
004d4c10
OW
508#
509# @normal : number of normal pages (since 1.2)
510#
8d017193
JQ
511# @normal-bytes: number of normal bytes sent (since 1.2)
512#
513# @dirty-pages-rate: number of pages dirtied by second by the
514# guest (since 1.3)
004d4c10 515#
7e114f8c
MH
516# @mbps: throughput in megabits/sec. (since 1.6)
517#
004d4c10 518# Since: 0.14.0
791e7c82
LC
519##
520{ 'type': 'MigrationStats',
d5f8a570 521 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
f1c72795 522 'duplicate': 'int', 'skipped': 'int', 'normal': 'int',
7e114f8c
MH
523 'normal-bytes': 'int', 'dirty-pages-rate' : 'int',
524 'mbps' : 'number' } }
791e7c82 525
f36d55af
OW
526##
527# @XBZRLECacheStats
528#
529# Detailed XBZRLE migration cache statistics
530#
531# @cache-size: XBZRLE cache size
532#
533# @bytes: amount of bytes already transferred to the target VM
534#
535# @pages: amount of pages transferred to the target VM
536#
537# @cache-miss: number of cache miss
538#
539# @overflow: number of overflows
540#
541# Since: 1.2
542##
543{ 'type': 'XBZRLECacheStats',
544 'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
545 'cache-miss': 'int', 'overflow': 'int' } }
546
791e7c82
LC
547##
548# @MigrationInfo
549#
550# Information about current migration process.
551#
552# @status: #optional string describing the current migration status.
553# As of 0.14.0 this can be 'active', 'completed', 'failed' or
554# 'cancelled'. If this field is not returned, no migration process
555# has been initiated
556#
d5f8a570
JQ
557# @ram: #optional @MigrationStats containing detailed migration
558# status, only returned if status is 'active' or
559# 'completed'. 'comppleted' (since 1.2)
791e7c82
LC
560#
561# @disk: #optional @MigrationStats containing detailed disk migration
562# status, only returned if status is 'active' and it is a block
563# migration
564#
f36d55af
OW
565# @xbzrle-cache: #optional @XBZRLECacheStats containing detailed XBZRLE
566# migration statistics, only returned if XBZRLE feature is on and
567# status is 'active' or 'completed' (since 1.2)
568#
7aa939af
JQ
569# @total-time: #optional total amount of milliseconds since migration started.
570# If migration has ended, it returns the total migration
571# time. (since 1.2)
572#
9c5a9fcf
JQ
573# @downtime: #optional only present when migration finishes correctly
574# total downtime in milliseconds for the guest.
575# (since 1.3)
576#
2c52ddf1
JQ
577# @expected-downtime: #optional only present while migration is active
578# expected downtime in milliseconds for the guest in last walk
579# of the dirty bitmap. (since 1.3)
580#
ed4fbd10
MH
581# @setup-time: #optional amount of setup time in milliseconds _before_ the
582# iterations begin but _after_ the QMP command is issued. This is designed
583# to provide an accounting of any activities (such as RDMA pinning) which
584# may be expensive, but do not actually occur during the iterative
585# migration rounds themselves. (since 1.6)
586#
791e7c82
LC
587# Since: 0.14.0
588##
589{ 'type': 'MigrationInfo',
590 'data': {'*status': 'str', '*ram': 'MigrationStats',
f36d55af 591 '*disk': 'MigrationStats',
7aa939af 592 '*xbzrle-cache': 'XBZRLECacheStats',
9c5a9fcf 593 '*total-time': 'int',
2c52ddf1 594 '*expected-downtime': 'int',
ed4fbd10
MH
595 '*downtime': 'int',
596 '*setup-time': 'int'} }
791e7c82
LC
597
598##
599# @query-migrate
600#
601# Returns information about current migration process.
602#
603# Returns: @MigrationInfo
604#
605# Since: 0.14.0
606##
607{ 'command': 'query-migrate', 'returns': 'MigrationInfo' }
608
bbf6da32
OW
609##
610# @MigrationCapability
611#
612# Migration capabilities enumeration
613#
614# @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
615# This feature allows us to minimize migration traffic for certain work
616# loads, by sending compressed difference of the pages
617#
60d9222c
MH
618# @x-rdma-pin-all: Controls whether or not the entire VM memory footprint is
619# mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage.
620# Disabled by default. Experimental: may (or may not) be renamed after
621# further testing is complete. (since 1.6)
622#
323004a3
PL
623# @zero-blocks: During storage migration encode blocks of zeroes efficiently. This
624# essentially saves 1MB of zeroes per block on the wire. Enabling requires
625# source and target VM to support this feature. To enable it is sufficient
626# to enable the capability on the source VM. The feature is disabled by
627# default. (since 1.6)
628#
9781c371
JQ
629# @auto-converge: If enabled, QEMU will automatically throttle down the guest
630# to speed up convergence of RAM migration. (since 1.6)
631#
bbf6da32
OW
632# Since: 1.2
633##
634{ 'enum': 'MigrationCapability',
323004a3 635 'data': ['xbzrle', 'x-rdma-pin-all', 'auto-converge', 'zero-blocks'] }
bbf6da32
OW
636
637##
638# @MigrationCapabilityStatus
639#
640# Migration capability information
641#
642# @capability: capability enum
643#
644# @state: capability state bool
645#
646# Since: 1.2
647##
648{ 'type': 'MigrationCapabilityStatus',
649 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
650
651##
00458433
OW
652# @migrate-set-capabilities
653#
654# Enable/Disable the following migration capabilities (like xbzrle)
655#
656# @capabilities: json array of capability modifications to make
657#
658# Since: 1.2
659##
660{ 'command': 'migrate-set-capabilities',
661 'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
662
663##
bbf6da32
OW
664# @query-migrate-capabilities
665#
666# Returns information about the current migration capabilities status
667#
668# Returns: @MigrationCapabilitiesStatus
669#
670# Since: 1.2
671##
672{ 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}
673
e235cec3
LC
674##
675# @MouseInfo:
676#
677# Information about a mouse device.
678#
679# @name: the name of the mouse device
680#
681# @index: the index of the mouse device
682#
683# @current: true if this device is currently receiving mouse events
684#
685# @absolute: true if this device supports absolute coordinates as input
686#
687# Since: 0.14.0
688##
689{ 'type': 'MouseInfo',
690 'data': {'name': 'str', 'index': 'int', 'current': 'bool',
691 'absolute': 'bool'} }
692
693##
694# @query-mice:
695#
696# Returns information about each active mouse device
697#
698# Returns: a list of @MouseInfo for each device
699#
700# Since: 0.14.0
701##
702{ 'command': 'query-mice', 'returns': ['MouseInfo'] }
703
de0b36b6
LC
704##
705# @CpuInfo:
706#
707# Information about a virtual CPU
708#
709# @CPU: the index of the virtual CPU
710#
711# @current: this only exists for backwards compatible and should be ignored
b80e560b 712#
de0b36b6
LC
713# @halted: true if the virtual CPU is in the halt state. Halt usually refers
714# to a processor specific low power mode.
715#
716# @pc: #optional If the target is i386 or x86_64, this is the 64-bit instruction
717# pointer.
718# If the target is Sparc, this is the PC component of the
719# instruction pointer.
720#
721# @nip: #optional If the target is PPC, the instruction pointer
722#
723# @npc: #optional If the target is Sparc, the NPC component of the instruction
724# pointer
725#
726# @PC: #optional If the target is MIPS, the instruction pointer
727#
728# @thread_id: ID of the underlying host thread
729#
730# Since: 0.14.0
731#
732# Notes: @halted is a transient state that changes frequently. By the time the
733# data is sent to the client, the guest may no longer be halted.
734##
735{ 'type': 'CpuInfo',
736 'data': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', '*pc': 'int',
737 '*nip': 'int', '*npc': 'int', '*PC': 'int', 'thread_id': 'int'} }
738
739##
740# @query-cpus:
741#
742# Returns a list of information about each virtual CPU.
743#
744# Returns: a list of @CpuInfo for each virtual CPU
745#
746# Since: 0.14.0
747##
748{ 'command': 'query-cpus', 'returns': ['CpuInfo'] }
749
b2023818
LC
750##
751# @BlockDeviceInfo:
752#
753# Information about the backing device for a block device.
754#
755# @file: the filename of the backing device
756#
757# @ro: true if the backing device was open read-only
758#
759# @drv: the name of the block format used to open the backing device. As of
760# 0.14.0 this can be: 'blkdebug', 'bochs', 'cloop', 'cow', 'dmg',
761# 'file', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device',
762# 'host_floppy', 'http', 'https', 'nbd', 'parallels', 'qcow',
763# 'qcow2', 'raw', 'tftp', 'vdi', 'vmdk', 'vpc', 'vvfat'
764#
765# @backing_file: #optional the name of the backing file (for copy-on-write)
766#
2e3e3317
BC
767# @backing_file_depth: number of files in the backing file chain (since: 1.2)
768#
b2023818
LC
769# @encrypted: true if the backing device is encrypted
770#
c75a1a8a
LC
771# @encryption_key_missing: true if the backing device is encrypted but an
772# valid encryption key is missing
773#
727f005e
ZYW
774# @bps: total throughput limit in bytes per second is specified
775#
776# @bps_rd: read throughput limit in bytes per second is specified
777#
778# @bps_wr: write throughput limit in bytes per second is specified
779#
780# @iops: total I/O operations per second is specified
781#
782# @iops_rd: read I/O operations per second is specified
783#
784# @iops_wr: write I/O operations per second is specified
785#
553a7e87
WX
786# @image: the info of image used (since: 1.6)
787#
3e9fab69
BC
788# @bps_max: #optional total max in bytes (Since 1.7)
789#
790# @bps_rd_max: #optional read max in bytes (Since 1.7)
791#
792# @bps_wr_max: #optional write max in bytes (Since 1.7)
793#
794# @iops_max: #optional total I/O operations max (Since 1.7)
795#
796# @iops_rd_max: #optional read I/O operations max (Since 1.7)
797#
798# @iops_wr_max: #optional write I/O operations max (Since 1.7)
799#
b2023818
LC
800# Since: 0.14.0
801#
802# Notes: This interface is only found in @BlockInfo.
803##
804{ 'type': 'BlockDeviceInfo',
805 'data': { 'file': 'str', 'ro': 'bool', 'drv': 'str',
2e3e3317 806 '*backing_file': 'str', 'backing_file_depth': 'int',
c75a1a8a
LC
807 'encrypted': 'bool', 'encryption_key_missing': 'bool',
808 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
553a7e87 809 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int',
3e9fab69
BC
810 'image': 'ImageInfo',
811 '*bps_max': 'int', '*bps_rd_max': 'int',
812 '*bps_wr_max': 'int', '*iops_max': 'int',
813 '*iops_rd_max': 'int', '*iops_wr_max': 'int' } }
b2023818
LC
814
815##
816# @BlockDeviceIoStatus:
817#
818# An enumeration of block device I/O status.
819#
820# @ok: The last I/O operation has succeeded
821#
822# @failed: The last I/O operation has failed
823#
824# @nospace: The last I/O operation has failed due to a no-space condition
825#
826# Since: 1.0
827##
828{ 'enum': 'BlockDeviceIoStatus', 'data': [ 'ok', 'failed', 'nospace' ] }
829
b9a9b3a4
PB
830##
831# @BlockDirtyInfo:
832#
833# Block dirty bitmap information.
834#
835# @count: number of dirty bytes according to the dirty bitmap
836#
50717e94
PB
837# @granularity: granularity of the dirty bitmap in bytes (since 1.4)
838#
b9a9b3a4
PB
839# Since: 1.3
840##
841{ 'type': 'BlockDirtyInfo',
50717e94 842 'data': {'count': 'int', 'granularity': 'int'} }
b9a9b3a4 843
b2023818
LC
844##
845# @BlockInfo:
846#
847# Block device information. This structure describes a virtual device and
848# the backing device associated with it.
849#
850# @device: The device name associated with the virtual device.
851#
852# @type: This field is returned only for compatibility reasons, it should
853# not be used (always returns 'unknown')
854#
855# @removable: True if the device supports removable media.
856#
857# @locked: True if the guest has locked this device from having its media
858# removed
859#
860# @tray_open: #optional True if the device has a tray and it is open
861# (only present if removable is true)
862#
b9a9b3a4
PB
863# @dirty: #optional dirty bitmap information (only present if the dirty
864# bitmap is enabled)
865#
b2023818
LC
866# @io-status: #optional @BlockDeviceIoStatus. Only present if the device
867# supports it and the VM is configured to stop on errors
868#
869# @inserted: #optional @BlockDeviceInfo describing the device if media is
870# present
871#
872# Since: 0.14.0
873##
874{ 'type': 'BlockInfo',
875 'data': {'device': 'str', 'type': 'str', 'removable': 'bool',
876 'locked': 'bool', '*inserted': 'BlockDeviceInfo',
b9a9b3a4
PB
877 '*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus',
878 '*dirty': 'BlockDirtyInfo' } }
b2023818
LC
879
880##
881# @query-block:
882#
883# Get a list of BlockInfo for all virtual block devices.
884#
885# Returns: a list of @BlockInfo describing each virtual block device
886#
887# Since: 0.14.0
888##
889{ 'command': 'query-block', 'returns': ['BlockInfo'] }
890
f11f57e4
LC
891##
892# @BlockDeviceStats:
893#
894# Statistics of a virtual block device or a block backing device.
895#
896# @rd_bytes: The number of bytes read by the device.
897#
898# @wr_bytes: The number of bytes written by the device.
899#
900# @rd_operations: The number of read operations performed by the device.
901#
902# @wr_operations: The number of write operations performed by the device.
903#
904# @flush_operations: The number of cache flush operations performed by the
905# device (since 0.15.0)
906#
907# @flush_total_time_ns: Total time spend on cache flushes in nano-seconds
908# (since 0.15.0).
909#
910# @wr_total_time_ns: Total time spend on writes in nano-seconds (since 0.15.0).
911#
912# @rd_total_time_ns: Total_time_spend on reads in nano-seconds (since 0.15.0).
913#
914# @wr_highest_offset: The offset after the greatest byte written to the
915# device. The intended use of this information is for
916# growable sparse files (like qcow2) that are used on top
917# of a physical device.
918#
919# Since: 0.14.0
920##
921{ 'type': 'BlockDeviceStats',
922 'data': {'rd_bytes': 'int', 'wr_bytes': 'int', 'rd_operations': 'int',
923 'wr_operations': 'int', 'flush_operations': 'int',
924 'flush_total_time_ns': 'int', 'wr_total_time_ns': 'int',
925 'rd_total_time_ns': 'int', 'wr_highest_offset': 'int' } }
926
927##
928# @BlockStats:
929#
930# Statistics of a virtual block device or a block backing device.
931#
932# @device: #optional If the stats are for a virtual block device, the name
933# corresponding to the virtual block device.
934#
935# @stats: A @BlockDeviceStats for the device.
936#
937# @parent: #optional This may point to the backing block device if this is a
938# a virtual block device. If it's a backing block, this will point
939# to the backing file is one is present.
940#
941# Since: 0.14.0
942##
943{ 'type': 'BlockStats',
944 'data': {'*device': 'str', 'stats': 'BlockDeviceStats',
945 '*parent': 'BlockStats'} }
946
947##
948# @query-blockstats:
949#
950# Query the @BlockStats for all virtual block devices.
951#
952# Returns: A list of @BlockStats for each virtual block devices.
953#
954# Since: 0.14.0
955##
956{ 'command': 'query-blockstats', 'returns': ['BlockStats'] }
957
2b54aa87
LC
958##
959# @VncClientInfo:
960#
961# Information about a connected VNC client.
962#
963# @host: The host name of the client. QEMU tries to resolve this to a DNS name
964# when possible.
965#
966# @family: 'ipv6' if the client is connected via IPv6 and TCP
967# 'ipv4' if the client is connected via IPv4 and TCP
968# 'unix' if the client is connected via a unix domain socket
969# 'unknown' otherwise
970#
971# @service: The service name of the client's port. This may depends on the
972# host system's service database so symbolic names should not be
973# relied on.
974#
975# @x509_dname: #optional If x509 authentication is in use, the Distinguished
976# Name of the client.
977#
978# @sasl_username: #optional If SASL authentication is in use, the SASL username
979# used for authentication.
980#
981# Since: 0.14.0
982##
983{ 'type': 'VncClientInfo',
984 'data': {'host': 'str', 'family': 'str', 'service': 'str',
985 '*x509_dname': 'str', '*sasl_username': 'str'} }
986
987##
988# @VncInfo:
989#
990# Information about the VNC session.
991#
992# @enabled: true if the VNC server is enabled, false otherwise
993#
994# @host: #optional The hostname the VNC server is bound to. This depends on
995# the name resolution on the host and may be an IP address.
996#
997# @family: #optional 'ipv6' if the host is listening for IPv6 connections
998# 'ipv4' if the host is listening for IPv4 connections
999# 'unix' if the host is listening on a unix domain socket
1000# 'unknown' otherwise
1001#
1002# @service: #optional The service name of the server's port. This may depends
1003# on the host system's service database so symbolic names should not
1004# be relied on.
1005#
1006# @auth: #optional the current authentication type used by the server
1007# 'none' if no authentication is being used
1008# 'vnc' if VNC authentication is being used
1009# 'vencrypt+plain' if VEncrypt is used with plain text authentication
1010# 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
1011# 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
1012# 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
1013# 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
1014# 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
1015# 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
1016# 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
1017# 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
1018#
1019# @clients: a list of @VncClientInfo of all currently connected clients
1020#
1021# Since: 0.14.0
1022##
1023{ 'type': 'VncInfo',
1024 'data': {'enabled': 'bool', '*host': 'str', '*family': 'str',
1025 '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
1026
1027##
1028# @query-vnc:
1029#
1030# Returns information about the current VNC server
1031#
1032# Returns: @VncInfo
2b54aa87
LC
1033#
1034# Since: 0.14.0
1035##
1036{ 'command': 'query-vnc', 'returns': 'VncInfo' }
1037
d1f29646
LC
1038##
1039# @SpiceChannel
1040#
1041# Information about a SPICE client channel.
1042#
1043# @host: The host name of the client. QEMU tries to resolve this to a DNS name
1044# when possible.
1045#
1046# @family: 'ipv6' if the client is connected via IPv6 and TCP
1047# 'ipv4' if the client is connected via IPv4 and TCP
1048# 'unix' if the client is connected via a unix domain socket
1049# 'unknown' otherwise
1050#
1051# @port: The client's port number.
1052#
1053# @connection-id: SPICE connection id number. All channels with the same id
1054# belong to the same SPICE session.
1055#
419e1bdf
AL
1056# @connection-type: SPICE channel type number. "1" is the main control
1057# channel, filter for this one if you want to track spice
1058# sessions only
d1f29646 1059#
419e1bdf
AL
1060# @channel-id: SPICE channel ID number. Usually "0", might be different when
1061# multiple channels of the same type exist, such as multiple
d1f29646
LC
1062# display channels in a multihead setup
1063#
1064# @tls: true if the channel is encrypted, false otherwise.
1065#
1066# Since: 0.14.0
1067##
1068{ 'type': 'SpiceChannel',
1069 'data': {'host': 'str', 'family': 'str', 'port': 'str',
1070 'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
1071 'tls': 'bool'} }
1072
4efee029
AL
1073##
1074# @SpiceQueryMouseMode
1075#
6932a69b 1076# An enumeration of Spice mouse states.
4efee029
AL
1077#
1078# @client: Mouse cursor position is determined by the client.
1079#
1080# @server: Mouse cursor position is determined by the server.
1081#
1082# @unknown: No information is available about mouse mode used by
1083# the spice server.
1084#
1085# Note: spice/enums.h has a SpiceMouseMode already, hence the name.
1086#
1087# Since: 1.1
1088##
1089{ 'enum': 'SpiceQueryMouseMode',
1090 'data': [ 'client', 'server', 'unknown' ] }
1091
d1f29646
LC
1092##
1093# @SpiceInfo
1094#
1095# Information about the SPICE session.
b80e560b 1096#
d1f29646
LC
1097# @enabled: true if the SPICE server is enabled, false otherwise
1098#
61c4efe2
YH
1099# @migrated: true if the last guest migration completed and spice
1100# migration had completed as well. false otherwise.
1101#
d1f29646
LC
1102# @host: #optional The hostname the SPICE server is bound to. This depends on
1103# the name resolution on the host and may be an IP address.
1104#
1105# @port: #optional The SPICE server's port number.
1106#
1107# @compiled-version: #optional SPICE server version.
1108#
1109# @tls-port: #optional The SPICE server's TLS port number.
1110#
1111# @auth: #optional the current authentication type used by the server
419e1bdf
AL
1112# 'none' if no authentication is being used
1113# 'spice' uses SASL or direct TLS authentication, depending on command
1114# line options
d1f29646 1115#
4efee029
AL
1116# @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
1117# be determined by the client or the server, or unknown if spice
1118# server doesn't provide this information.
1119#
1120# Since: 1.1
1121#
d1f29646
LC
1122# @channels: a list of @SpiceChannel for each active spice channel
1123#
1124# Since: 0.14.0
1125##
1126{ 'type': 'SpiceInfo',
61c4efe2 1127 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
d1f29646 1128 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
4efee029 1129 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
d1f29646
LC
1130
1131##
1132# @query-spice
1133#
1134# Returns information about the current SPICE server
1135#
1136# Returns: @SpiceInfo
1137#
1138# Since: 0.14.0
1139##
1140{ 'command': 'query-spice', 'returns': 'SpiceInfo' }
1141
96637bcd
LC
1142##
1143# @BalloonInfo:
1144#
1145# Information about the guest balloon device.
1146#
1147# @actual: the number of bytes the balloon currently contains
1148#
96637bcd
LC
1149# Since: 0.14.0
1150#
96637bcd 1151##
01ceb97e 1152{ 'type': 'BalloonInfo', 'data': {'actual': 'int' } }
96637bcd
LC
1153
1154##
1155# @query-balloon:
1156#
1157# Return information about the balloon device.
1158#
1159# Returns: @BalloonInfo on success
1160# If the balloon driver is enabled but not functional because the KVM
1161# kernel module cannot support it, KvmMissingCap
1162# If no balloon device is present, DeviceNotActive
1163#
1164# Since: 0.14.0
1165##
1166{ 'command': 'query-balloon', 'returns': 'BalloonInfo' }
1167
79627472
LC
1168##
1169# @PciMemoryRange:
1170#
1171# A PCI device memory region
1172#
1173# @base: the starting address (guest physical)
1174#
1175# @limit: the ending address (guest physical)
1176#
1177# Since: 0.14.0
1178##
1179{ 'type': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
1180
1181##
1182# @PciMemoryRegion
1183#
1184# Information about a PCI device I/O region.
1185#
1186# @bar: the index of the Base Address Register for this region
1187#
1188# @type: 'io' if the region is a PIO region
1189# 'memory' if the region is a MMIO region
1190#
1191# @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
1192#
1193# @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
1194#
1195# Since: 0.14.0
1196##
1197{ 'type': 'PciMemoryRegion',
1198 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
1199 '*prefetch': 'bool', '*mem_type_64': 'bool' } }
1200
1201##
1202# @PciBridgeInfo:
1203#
1204# Information about a PCI Bridge device
1205#
1206# @bus.number: primary bus interface number. This should be the number of the
1207# bus the device resides on.
1208#
1209# @bus.secondary: secondary bus interface number. This is the number of the
1210# main bus for the bridge
1211#
1212# @bus.subordinate: This is the highest number bus that resides below the
1213# bridge.
1214#
1215# @bus.io_range: The PIO range for all devices on this bridge
1216#
1217# @bus.memory_range: The MMIO range for all devices on this bridge
1218#
1219# @bus.prefetchable_range: The range of prefetchable MMIO for all devices on
1220# this bridge
1221#
1222# @devices: a list of @PciDeviceInfo for each device on this bridge
1223#
1224# Since: 0.14.0
1225##
1226{ 'type': 'PciBridgeInfo',
1227 'data': {'bus': { 'number': 'int', 'secondary': 'int', 'subordinate': 'int',
1228 'io_range': 'PciMemoryRange',
1229 'memory_range': 'PciMemoryRange',
1230 'prefetchable_range': 'PciMemoryRange' },
1231 '*devices': ['PciDeviceInfo']} }
1232
1233##
1234# @PciDeviceInfo:
1235#
1236# Information about a PCI device
1237#
1238# @bus: the bus number of the device
1239#
1240# @slot: the slot the device is located in
1241#
1242# @function: the function of the slot used by the device
1243#
1244# @class_info.desc: #optional a string description of the device's class
1245#
1246# @class_info.class: the class code of the device
1247#
1248# @id.device: the PCI device id
1249#
1250# @id.vendor: the PCI vendor id
1251#
1252# @irq: #optional if an IRQ is assigned to the device, the IRQ number
1253#
1254# @qdev_id: the device name of the PCI device
1255#
1256# @pci_bridge: if the device is a PCI bridge, the bridge information
1257#
1258# @regions: a list of the PCI I/O regions associated with the device
1259#
1260# Notes: the contents of @class_info.desc are not stable and should only be
1261# treated as informational.
1262#
1263# Since: 0.14.0
1264##
1265{ 'type': 'PciDeviceInfo',
1266 'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
1267 'class_info': {'*desc': 'str', 'class': 'int'},
1268 'id': {'device': 'int', 'vendor': 'int'},
1269 '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
1270 'regions': ['PciMemoryRegion']} }
1271
1272##
1273# @PciInfo:
1274#
1275# Information about a PCI bus
1276#
1277# @bus: the bus index
1278#
1279# @devices: a list of devices on this bus
1280#
1281# Since: 0.14.0
1282##
1283{ 'type': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
1284
1285##
1286# @query-pci:
1287#
1288# Return information about the PCI bus topology of the guest.
1289#
1290# Returns: a list of @PciInfo for each PCI bus
1291#
1292# Since: 0.14.0
1293##
1294{ 'command': 'query-pci', 'returns': ['PciInfo'] }
1295
92aa5c6d
PB
1296##
1297# @BlockdevOnError:
1298#
1299# An enumeration of possible behaviors for errors on I/O operations.
1300# The exact meaning depends on whether the I/O was initiated by a guest
1301# or by a block job
1302#
1303# @report: for guest operations, report the error to the guest;
1304# for jobs, cancel the job
1305#
1306# @ignore: ignore the error, only report a QMP event (BLOCK_IO_ERROR
1307# or BLOCK_JOB_ERROR)
1308#
1309# @enospc: same as @stop on ENOSPC, same as @report otherwise.
1310#
1311# @stop: for guest operations, stop the virtual machine;
1312# for jobs, pause the job
1313#
1314# Since: 1.3
1315##
1316{ 'enum': 'BlockdevOnError',
1317 'data': ['report', 'ignore', 'enospc', 'stop'] }
1318
893f7eba
PB
1319##
1320# @MirrorSyncMode:
1321#
1322# An enumeration of possible behaviors for the initial synchronization
1323# phase of storage mirroring.
1324#
1325# @top: copies data in the topmost image to the destination
1326#
1327# @full: copies data from all images to the destination
1328#
1329# @none: only copy data written from now on
1330#
1331# Since: 1.3
1332##
1333{ 'enum': 'MirrorSyncMode',
1334 'data': ['top', 'full', 'none'] }
1335
fb5458cd
SH
1336##
1337# @BlockJobInfo:
1338#
1339# Information about a long-running block device operation.
1340#
1341# @type: the job type ('stream' for image streaming)
1342#
1343# @device: the block device name
1344#
1345# @len: the maximum progress value
1346#
8d65883f
PB
1347# @busy: false if the job is known to be in a quiescent state, with
1348# no pending I/O. Since 1.3.
1349#
8acc72a4
PB
1350# @paused: whether the job is paused or, if @busy is true, will
1351# pause itself as soon as possible. Since 1.3.
1352#
fb5458cd
SH
1353# @offset: the current progress value
1354#
1355# @speed: the rate limit, bytes per second
1356#
32c81a4a
PB
1357# @io-status: the status of the job (since 1.3)
1358#
fb5458cd
SH
1359# Since: 1.1
1360##
1361{ 'type': 'BlockJobInfo',
1362 'data': {'type': 'str', 'device': 'str', 'len': 'int',
32c81a4a
PB
1363 'offset': 'int', 'busy': 'bool', 'paused': 'bool', 'speed': 'int',
1364 'io-status': 'BlockDeviceIoStatus'} }
fb5458cd
SH
1365
1366##
1367# @query-block-jobs:
1368#
1369# Return information about long-running block device operations.
1370#
1371# Returns: a list of @BlockJobInfo for each active block job
1372#
1373# Since: 1.1
1374##
1375{ 'command': 'query-block-jobs', 'returns': ['BlockJobInfo'] }
1376
7a7f325e
LC
1377##
1378# @quit:
1379#
1380# This command will cause the QEMU process to exit gracefully. While every
1381# attempt is made to send the QMP response before terminating, this is not
1382# guaranteed. When using this interface, a premature EOF would not be
1383# unexpected.
1384#
1385# Since: 0.14.0
1386##
1387{ 'command': 'quit' }
5f158f21
LC
1388
1389##
1390# @stop:
1391#
1392# Stop all guest VCPU execution.
1393#
1394# Since: 0.14.0
1395#
1396# Notes: This function will succeed even if the guest is already in the stopped
1e998146
PB
1397# state. In "inmigrate" state, it will ensure that the guest
1398# remains paused once migration finishes, as if the -S option was
1399# passed on the command line.
5f158f21
LC
1400##
1401{ 'command': 'stop' }
38d22653
LC
1402
1403##
1404# @system_reset:
1405#
1406# Performs a hard reset of a guest.
1407#
1408# Since: 0.14.0
1409##
1410{ 'command': 'system_reset' }
5bc465e4
LC
1411
1412##
1413# @system_powerdown:
1414#
1415# Requests that a guest perform a powerdown operation.
1416#
1417# Since: 0.14.0
1418#
1419# Notes: A guest may or may not respond to this command. This command
1420# returning does not indicate that a guest has accepted the request or
1421# that it has shut down. Many guests will respond to this command by
1422# prompting the user in some way.
1423##
1424{ 'command': 'system_powerdown' }
755f1968
LC
1425
1426##
1427# @cpu:
1428#
1429# This command is a nop that is only provided for the purposes of compatibility.
1430#
1431# Since: 0.14.0
1432#
1433# Notes: Do not use this command.
1434##
1435{ 'command': 'cpu', 'data': {'index': 'int'} }
0cfd6a9a 1436
69ca3ea5
IM
1437##
1438# @cpu-add
1439#
1440# Adds CPU with specified ID
1441#
1442# @id: ID of CPU to be created, valid values [0..max_cpus)
1443#
1444# Returns: Nothing on success
1445#
1446# Since 1.5
1447##
1448{ 'command': 'cpu-add', 'data': {'id': 'int'} }
1449
0cfd6a9a
LC
1450##
1451# @memsave:
1452#
1453# Save a portion of guest memory to a file.
1454#
1455# @val: the virtual address of the guest to start from
1456#
1457# @size: the size of memory region to save
1458#
1459# @filename: the file to save the memory to as binary data
1460#
1461# @cpu-index: #optional the index of the virtual CPU to use for translating the
1462# virtual address (defaults to CPU 0)
1463#
1464# Returns: Nothing on success
0cfd6a9a
LC
1465#
1466# Since: 0.14.0
1467#
1468# Notes: Errors were not reliably returned until 1.1
1469##
1470{ 'command': 'memsave',
1471 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
6d3962bf
LC
1472
1473##
1474# @pmemsave:
1475#
1476# Save a portion of guest physical memory to a file.
1477#
1478# @val: the physical address of the guest to start from
1479#
1480# @size: the size of memory region to save
1481#
1482# @filename: the file to save the memory to as binary data
1483#
1484# Returns: Nothing on success
6d3962bf
LC
1485#
1486# Since: 0.14.0
1487#
1488# Notes: Errors were not reliably returned until 1.1
1489##
1490{ 'command': 'pmemsave',
1491 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
e42e818b
LC
1492
1493##
1494# @cont:
1495#
1496# Resume guest VCPU execution.
1497#
1498# Since: 0.14.0
1499#
1500# Returns: If successful, nothing
e42e818b
LC
1501# If QEMU was started with an encrypted block device and a key has
1502# not yet been set, DeviceEncrypted.
1503#
1e998146
PB
1504# Notes: This command will succeed if the guest is currently running. It
1505# will also succeed if the guest is in the "inmigrate" state; in
1506# this case, the effect of the command is to make sure the guest
1507# starts once migration finishes, removing the effect of the -S
1508# command line option if it was passed.
e42e818b
LC
1509##
1510{ 'command': 'cont' }
1511
9b9df25a
GH
1512##
1513# @system_wakeup:
1514#
1515# Wakeup guest from suspend. Does nothing in case the guest isn't suspended.
1516#
1517# Since: 1.1
1518#
1519# Returns: nothing.
1520##
1521{ 'command': 'system_wakeup' }
1522
ab49ab5c
LC
1523##
1524# @inject-nmi:
1525#
1526# Injects an Non-Maskable Interrupt into all guest's VCPUs.
1527#
1528# Returns: If successful, nothing
ab49ab5c
LC
1529#
1530# Since: 0.14.0
1531#
1532# Notes: Only x86 Virtual Machines support this command.
1533##
1534{ 'command': 'inject-nmi' }
4b37156c
LC
1535
1536##
1537# @set_link:
1538#
1539# Sets the link status of a virtual network adapter.
1540#
1541# @name: the device name of the virtual network adapter
1542#
1543# @up: true to set the link status to be up
1544#
1545# Returns: Nothing on success
1546# If @name is not a valid network device, DeviceNotFound
1547#
1548# Since: 0.14.0
1549#
1550# Notes: Not all network adapters support setting link status. This command
1551# will succeed even if the network adapter does not support link status
1552# notification.
1553##
1554{ 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
a4dea8a9
LC
1555
1556##
1557# @block_passwd:
1558#
1559# This command sets the password of a block device that has not been open
1560# with a password and requires one.
1561#
1562# The two cases where this can happen are a block device is created through
1563# QEMU's initial command line or a block device is changed through the legacy
1564# @change interface.
1565#
1566# In the event that the block device is created through the initial command
1567# line, the VM will start in the stopped state regardless of whether '-S' is
1568# used. The intention is for a management tool to query the block devices to
1569# determine which ones are encrypted, set the passwords with this command, and
1570# then start the guest with the @cont command.
1571#
1572# @device: the name of the device to set the password on
1573#
1574# @password: the password to use for the device
1575#
1576# Returns: nothing on success
1577# If @device is not a valid block device, DeviceNotFound
1578# If @device is not encrypted, DeviceNotEncrypted
a4dea8a9
LC
1579#
1580# Notes: Not all block formats support encryption and some that do are not
1581# able to validate that a password is correct. Disk corruption may
1582# occur if an invalid password is specified.
1583#
1584# Since: 0.14.0
1585##
1586{ 'command': 'block_passwd', 'data': {'device': 'str', 'password': 'str'} }
d72f3264
LC
1587
1588##
1589# @balloon:
1590#
1591# Request the balloon driver to change its balloon size.
1592#
1593# @value: the target size of the balloon in bytes
1594#
1595# Returns: Nothing on success
1596# If the balloon driver is enabled but not functional because the KVM
1597# kernel module cannot support it, KvmMissingCap
1598# If no balloon device is present, DeviceNotActive
1599#
1600# Notes: This command just issues a request to the guest. When it returns,
1601# the balloon size may not have changed. A guest can change the balloon
1602# size independent of this command.
1603#
1604# Since: 0.14.0
1605##
1606{ 'command': 'balloon', 'data': {'value': 'int'} }
5e7caacb
LC
1607
1608##
1609# @block_resize
1610#
1611# Resize a block image while a guest is running.
1612#
1613# @device: the name of the device to get the image resized
1614#
1615# @size: new image size in bytes
1616#
1617# Returns: nothing on success
1618# If @device is not a valid block device, DeviceNotFound
5e7caacb
LC
1619#
1620# Since: 0.14.0
1621##
1622{ 'command': 'block_resize', 'data': { 'device': 'str', 'size': 'int' }}
6106e249 1623
8802d1fd 1624##
bc8b094f
PB
1625# @NewImageMode
1626#
1627# An enumeration that tells QEMU how to set the backing file path in
1628# a new image file.
1629#
1630# @existing: QEMU should look for an existing image file.
1631#
1632# @absolute-paths: QEMU should create a new image with absolute paths
1633# for the backing file.
1634#
1635# Since: 1.1
1636##
ad0f171e 1637{ 'enum': 'NewImageMode',
bc8b094f
PB
1638 'data': [ 'existing', 'absolute-paths' ] }
1639
8802d1fd 1640##
52e7c241 1641# @BlockdevSnapshot
8802d1fd
JC
1642#
1643# @device: the name of the device to generate the snapshot from.
1644#
1645# @snapshot-file: the target of the new image. A new file will be created.
1646#
1647# @format: #optional the format of the snapshot image, default is 'qcow2'.
6cc2a415
PB
1648#
1649# @mode: #optional whether and how QEMU should create a new image, default is
8bde9b6f 1650# 'absolute-paths'.
8802d1fd 1651##
52e7c241 1652{ 'type': 'BlockdevSnapshot',
bc8b094f
PB
1653 'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1654 '*mode': 'NewImageMode' } }
8802d1fd 1655
3037f364
SH
1656##
1657# @DriveBackup
1658#
1659# @device: the name of the device which should be copied.
1660#
1661# @target: the target of the new image. If the file exists, or if it
1662# is a device, the existing file/device will be used as the new
1663# destination. If it does not exist, a new file will be created.
1664#
1665# @format: #optional the format of the new destination, default is to
1666# probe if @mode is 'existing', else the format of the source
1667#
b53169ea
SH
1668# @sync: what parts of the disk image should be copied to the destination
1669# (all the disk, only the sectors allocated in the topmost image, or
1670# only new I/O).
1671#
3037f364
SH
1672# @mode: #optional whether and how QEMU should create a new image, default is
1673# 'absolute-paths'.
1674#
1675# @speed: #optional the maximum speed, in bytes per second
1676#
1677# @on-source-error: #optional the action to take on an error on the source,
1678# default 'report'. 'stop' and 'enospc' can only be used
1679# if the block device supports io-status (see BlockInfo).
1680#
1681# @on-target-error: #optional the action to take on an error on the target,
1682# default 'report' (no limitations, since this applies to
1683# a different block device than @device).
1684#
1685# Note that @on-source-error and @on-target-error only affect background I/O.
1686# If an error occurs during a guest write request, the device's rerror/werror
1687# actions will be used.
1688#
1689# Since: 1.6
1690##
1691{ 'type': 'DriveBackup',
1692 'data': { 'device': 'str', 'target': 'str', '*format': 'str',
b53169ea
SH
1693 'sync': 'MirrorSyncMode', '*mode': 'NewImageMode',
1694 '*speed': 'int',
3037f364
SH
1695 '*on-source-error': 'BlockdevOnError',
1696 '*on-target-error': 'BlockdevOnError' } }
1697
78b18b78
SH
1698##
1699# @Abort
1700#
1701# This action can be used to test transaction failure.
1702#
1703# Since: 1.6
1704###
1705{ 'type': 'Abort',
1706 'data': { } }
1707
8802d1fd 1708##
c8a83e85 1709# @TransactionAction
8802d1fd 1710#
52e7c241
PB
1711# A discriminated record of operations that can be performed with
1712# @transaction.
8802d1fd 1713##
c8a83e85 1714{ 'union': 'TransactionAction',
52e7c241 1715 'data': {
3037f364 1716 'blockdev-snapshot-sync': 'BlockdevSnapshot',
78b18b78
SH
1717 'drive-backup': 'DriveBackup',
1718 'abort': 'Abort'
52e7c241 1719 } }
8802d1fd
JC
1720
1721##
52e7c241 1722# @transaction
8802d1fd 1723#
c8a83e85
KW
1724# Executes a number of transactionable QMP commands atomically. If any
1725# operation fails, then the entire set of actions will be abandoned and the
1726# appropriate error returned.
8802d1fd
JC
1727#
1728# List of:
c8a83e85 1729# @TransactionAction: information needed for the respective operation
8802d1fd
JC
1730#
1731# Returns: nothing on success
c8a83e85 1732# Errors depend on the operations of the transaction
8802d1fd 1733#
c8a83e85
KW
1734# Note: The transaction aborts on the first failure. Therefore, there will be
1735# information on only one failed operation returned in an error condition, and
52e7c241
PB
1736# subsequent actions will not have been attempted.
1737#
1738# Since 1.1
8802d1fd 1739##
52e7c241 1740{ 'command': 'transaction',
c8a83e85 1741 'data': { 'actions': [ 'TransactionAction' ] } }
8802d1fd 1742
6106e249
LC
1743##
1744# @blockdev-snapshot-sync
1745#
1746# Generates a synchronous snapshot of a block device.
1747#
852ad1a9 1748# For the arguments, see the documentation of BlockdevSnapshot.
6cc2a415 1749#
6106e249
LC
1750# Returns: nothing on success
1751# If @device is not a valid block device, DeviceNotFound
6106e249 1752#
6106e249
LC
1753# Since 0.14.0
1754##
1755{ 'command': 'blockdev-snapshot-sync',
852ad1a9 1756 'data': 'BlockdevSnapshot' }
d51a67b4
LC
1757
1758##
1759# @human-monitor-command:
1760#
1761# Execute a command on the human monitor and return the output.
1762#
1763# @command-line: the command to execute in the human monitor
1764#
1765# @cpu-index: #optional The CPU to use for commands that require an implicit CPU
1766#
1767# Returns: the output of the command as a string
1768#
1769# Since: 0.14.0
1770#
1771# Notes: This command only exists as a stop-gap. It's use is highly
1772# discouraged. The semantics of this command are not guaranteed.
1773#
1774# Known limitations:
1775#
1776# o This command is stateless, this means that commands that depend
1777# on state information (such as getfd) might not work
1778#
1779# o Commands that prompt the user for data (eg. 'cont' when the block
1780# device is encrypted) don't currently work
1781##
1782{ 'command': 'human-monitor-command',
1783 'data': {'command-line': 'str', '*cpu-index': 'int'},
b80e560b 1784 'returns': 'str' }
6cdedb07
LC
1785
1786##
ed61fc10
JC
1787# @block-commit
1788#
1789# Live commit of data from overlay image nodes into backing nodes - i.e.,
1790# writes data between 'top' and 'base' into 'base'.
1791#
1792# @device: the name of the device
1793#
1794# @base: #optional The file name of the backing image to write data into.
1795# If not specified, this is the deepest backing image
1796#
1797# @top: The file name of the backing image within the image chain,
1798# which contains the topmost data to be committed down.
1799# Note, the active layer as 'top' is currently unsupported.
1800#
1801# If top == base, that is an error.
1802#
1803#
1804# @speed: #optional the maximum speed, in bytes per second
1805#
1806# Returns: Nothing on success
1807# If commit or stream is already active on this device, DeviceInUse
1808# If @device does not exist, DeviceNotFound
1809# If image commit is not supported by this device, NotSupported
1810# If @base or @top is invalid, a generic error is returned
1811# If @top is the active layer, or omitted, a generic error is returned
1812# If @speed is invalid, InvalidParameter
1813#
1814# Since: 1.3
1815#
1816##
1817{ 'command': 'block-commit',
1818 'data': { 'device': 'str', '*base': 'str', 'top': 'str',
1819 '*speed': 'int' } }
1820
99a9addf
SH
1821##
1822# @drive-backup
1823#
1824# Start a point-in-time copy of a block device to a new destination. The
1825# status of ongoing drive-backup operations can be checked with
1826# query-block-jobs where the BlockJobInfo.type field has the value 'backup'.
1827# The operation can be stopped before it has completed using the
1828# block-job-cancel command.
1829#
f53cae50 1830# For the arguments, see the documentation of DriveBackup.
99a9addf
SH
1831#
1832# Returns: nothing on success
1833# If @device is not a valid block device, DeviceNotFound
1834#
1835# Since 1.6
1836##
f53cae50 1837{ 'command': 'drive-backup', 'data': 'DriveBackup' }
99a9addf 1838
d9b902db
PB
1839##
1840# @drive-mirror
1841#
1842# Start mirroring a block device's writes to a new destination.
1843#
1844# @device: the name of the device whose writes should be mirrored.
1845#
1846# @target: the target of the new image. If the file exists, or if it
1847# is a device, the existing file/device will be used as the new
1848# destination. If it does not exist, a new file will be created.
1849#
1850# @format: #optional the format of the new destination, default is to
1851# probe if @mode is 'existing', else the format of the source
1852#
1853# @mode: #optional whether and how QEMU should create a new image, default is
1854# 'absolute-paths'.
1855#
1856# @speed: #optional the maximum speed, in bytes per second
1857#
1858# @sync: what parts of the disk image should be copied to the destination
1859# (all the disk, only the sectors allocated in the topmost image, or
1860# only new I/O).
1861#
eee13dfe
PB
1862# @granularity: #optional granularity of the dirty bitmap, default is 64K
1863# if the image format doesn't have clusters, 4K if the clusters
1864# are smaller than that, else the cluster size. Must be a
1865# power of 2 between 512 and 64M (since 1.4).
1866#
08e4ed6c
PB
1867# @buf-size: #optional maximum amount of data in flight from source to
1868# target (since 1.4).
1869#
b952b558
PB
1870# @on-source-error: #optional the action to take on an error on the source,
1871# default 'report'. 'stop' and 'enospc' can only be used
1872# if the block device supports io-status (see BlockInfo).
1873#
1874# @on-target-error: #optional the action to take on an error on the target,
1875# default 'report' (no limitations, since this applies to
1876# a different block device than @device).
1877#
d9b902db
PB
1878# Returns: nothing on success
1879# If @device is not a valid block device, DeviceNotFound
1880#
1881# Since 1.3
1882##
1883{ 'command': 'drive-mirror',
1884 'data': { 'device': 'str', 'target': 'str', '*format': 'str',
1885 'sync': 'MirrorSyncMode', '*mode': 'NewImageMode',
eee13dfe 1886 '*speed': 'int', '*granularity': 'uint32',
08e4ed6c 1887 '*buf-size': 'int', '*on-source-error': 'BlockdevOnError',
b952b558 1888 '*on-target-error': 'BlockdevOnError' } }
d9b902db
PB
1889
1890##
6cdedb07
LC
1891# @migrate_cancel
1892#
1893# Cancel the current executing migration process.
1894#
1895# Returns: nothing on success
1896#
1897# Notes: This command succeeds even if there is no migration process running.
1898#
1899# Since: 0.14.0
1900##
1901{ 'command': 'migrate_cancel' }
4f0a993b
LC
1902
1903##
1904# @migrate_set_downtime
1905#
1906# Set maximum tolerated downtime for migration.
1907#
1908# @value: maximum downtime in seconds
1909#
1910# Returns: nothing on success
1911#
1912# Since: 0.14.0
1913##
1914{ 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
3dc85383
LC
1915
1916##
1917# @migrate_set_speed
1918#
1919# Set maximum speed for migration.
1920#
1921# @value: maximum speed in bytes.
1922#
1923# Returns: nothing on success
1924#
1925# Notes: A value lesser than zero will be automatically round up to zero.
1926#
1927# Since: 0.14.0
1928##
1929{ 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
b4b12c62 1930
9e1ba4cc
OW
1931##
1932# @migrate-set-cache-size
1933#
1934# Set XBZRLE cache size
1935#
1936# @value: cache size in bytes
1937#
1938# The size will be rounded down to the nearest power of 2.
1939# The cache size can be modified before and during ongoing migration
1940#
1941# Returns: nothing on success
1942#
1943# Since: 1.2
1944##
1945{ 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
1946
1947##
1948# @query-migrate-cache-size
1949#
1950# query XBZRLE cache size
1951#
1952# Returns: XBZRLE cache size in bytes
1953#
1954# Since: 1.2
1955##
1956{ 'command': 'query-migrate-cache-size', 'returns': 'int' }
1957
b4b12c62 1958##
d03ee401 1959# @ObjectPropertyInfo:
b4b12c62
AL
1960#
1961# @name: the name of the property
1962#
1963# @type: the type of the property. This will typically come in one of four
1964# forms:
1965#
1966# 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
1967# These types are mapped to the appropriate JSON type.
1968#
1969# 2) A legacy type in the form 'legacy<subtype>' where subtype is the
1970# legacy qdev typename. These types are always treated as strings.
1971#
1972# 3) A child type in the form 'child<subtype>' where subtype is a qdev
1973# device type name. Child properties create the composition tree.
1974#
1975# 4) A link type in the form 'link<subtype>' where subtype is a qdev
1976# device type name. Link properties form the device model graph.
1977#
51920820 1978# Since: 1.2
b4b12c62 1979##
57c9fafe 1980{ 'type': 'ObjectPropertyInfo',
b4b12c62
AL
1981 'data': { 'name': 'str', 'type': 'str' } }
1982
1983##
1984# @qom-list:
1985#
57c9fafe 1986# This command will list any properties of a object given a path in the object
b4b12c62
AL
1987# model.
1988#
57c9fafe 1989# @path: the path within the object model. See @qom-get for a description of
b4b12c62
AL
1990# this parameter.
1991#
57c9fafe
AL
1992# Returns: a list of @ObjectPropertyInfo that describe the properties of the
1993# object.
b4b12c62 1994#
51920820 1995# Since: 1.2
b4b12c62
AL
1996##
1997{ 'command': 'qom-list',
1998 'data': { 'path': 'str' },
57c9fafe 1999 'returns': [ 'ObjectPropertyInfo' ] }
eb6e8ea5
AL
2000
2001##
2002# @qom-get:
2003#
57c9fafe 2004# This command will get a property from a object model path and return the
eb6e8ea5
AL
2005# value.
2006#
57c9fafe 2007# @path: The path within the object model. There are two forms of supported
eb6e8ea5
AL
2008# paths--absolute and partial paths.
2009#
57c9fafe 2010# Absolute paths are derived from the root object and can follow child<>
eb6e8ea5
AL
2011# or link<> properties. Since they can follow link<> properties, they
2012# can be arbitrarily long. Absolute paths look like absolute filenames
2013# and are prefixed with a leading slash.
2014#
2015# Partial paths look like relative filenames. They do not begin
2016# with a prefix. The matching rules for partial paths are subtle but
57c9fafe 2017# designed to make specifying objects easy. At each level of the
eb6e8ea5
AL
2018# composition tree, the partial path is matched as an absolute path.
2019# The first match is not returned. At least two matches are searched
2020# for. A successful result is only returned if only one match is
2021# found. If more than one match is found, a flag is return to
2022# indicate that the match was ambiguous.
2023#
2024# @property: The property name to read
2025#
2026# Returns: The property value. The type depends on the property type. legacy<>
2027# properties are returned as #str. child<> and link<> properties are
2028# returns as #str pathnames. All integer property types (u8, u16, etc)
2029# are returned as #int.
2030#
51920820 2031# Since: 1.2
eb6e8ea5
AL
2032##
2033{ 'command': 'qom-get',
2034 'data': { 'path': 'str', 'property': 'str' },
2035 'returns': 'visitor',
2036 'gen': 'no' }
2037
2038##
2039# @qom-set:
2040#
57c9fafe 2041# This command will set a property from a object model path.
eb6e8ea5
AL
2042#
2043# @path: see @qom-get for a description of this parameter
2044#
2045# @property: the property name to set
2046#
2047# @value: a value who's type is appropriate for the property type. See @qom-get
2048# for a description of type mapping.
2049#
51920820 2050# Since: 1.2
eb6e8ea5
AL
2051##
2052{ 'command': 'qom-set',
2053 'data': { 'path': 'str', 'property': 'str', 'value': 'visitor' },
2054 'gen': 'no' }
fbf796fd
LC
2055
2056##
2057# @set_password:
2058#
2059# Sets the password of a remote display session.
2060#
2061# @protocol: `vnc' to modify the VNC server password
2062# `spice' to modify the Spice server password
2063#
2064# @password: the new password
2065#
2066# @connected: #optional how to handle existing clients when changing the
b80e560b 2067# password. If nothing is specified, defaults to `keep'
fbf796fd
LC
2068# `fail' to fail the command if clients are connected
2069# `disconnect' to disconnect existing clients
2070# `keep' to maintain existing clients
2071#
2072# Returns: Nothing on success
2073# If Spice is not enabled, DeviceNotFound
fbf796fd
LC
2074#
2075# Since: 0.14.0
2076##
2077{ 'command': 'set_password',
2078 'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
9ad5372d
LC
2079
2080##
2081# @expire_password:
2082#
2083# Expire the password of a remote display server.
2084#
2085# @protocol: the name of the remote display protocol `vnc' or `spice'
2086#
2087# @time: when to expire the password.
2088# `now' to expire the password immediately
2089# `never' to cancel password expiration
2090# `+INT' where INT is the number of seconds from now (integer)
2091# `INT' where INT is the absolute time in seconds
2092#
2093# Returns: Nothing on success
2094# If @protocol is `spice' and Spice is not active, DeviceNotFound
9ad5372d
LC
2095#
2096# Since: 0.14.0
2097#
2098# Notes: Time is relative to the server and currently there is no way to
2099# coordinate server time with client time. It is not recommended to
2100# use the absolute time version of the @time parameter unless you're
2101# sure you are on the same machine as the QEMU instance.
2102##
2103{ 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
c245b6a3
LC
2104
2105##
2106# @eject:
2107#
2108# Ejects a device from a removable drive.
2109#
2110# @device: The name of the device
2111#
2112# @force: @optional If true, eject regardless of whether the drive is locked.
2113# If not specified, the default value is false.
2114#
2115# Returns: Nothing on success
2116# If @device is not a valid block device, DeviceNotFound
c245b6a3
LC
2117#
2118# Notes: Ejecting a device will no media results in success
2119#
2120# Since: 0.14.0
2121##
2122{ 'command': 'eject', 'data': {'device': 'str', '*force': 'bool'} }
270b243f
LC
2123
2124##
2125# @change-vnc-password:
2126#
2127# Change the VNC server password.
2128#
2129# @target: the new password to use with VNC authentication
2130#
2131# Since: 1.1
2132#
2133# Notes: An empty password in this command will set the password to the empty
2134# string. Existing clients are unaffected by executing this command.
2135##
2136{ 'command': 'change-vnc-password', 'data': {'password': 'str'} }
333a96ec
LC
2137
2138##
2139# @change:
2140#
2141# This command is multiple commands multiplexed together.
2142#
2143# @device: This is normally the name of a block device but it may also be 'vnc'.
2144# when it's 'vnc', then sub command depends on @target
2145#
2146# @target: If @device is a block device, then this is the new filename.
2147# If @device is 'vnc', then if the value 'password' selects the vnc
2148# change password command. Otherwise, this specifies a new server URI
2149# address to listen to for VNC connections.
2150#
2151# @arg: If @device is a block device, then this is an optional format to open
2152# the device with.
2153# If @device is 'vnc' and @target is 'password', this is the new VNC
2154# password to set. If this argument is an empty string, then no future
2155# logins will be allowed.
2156#
2157# Returns: Nothing on success.
2158# If @device is not a valid block device, DeviceNotFound
333a96ec
LC
2159# If the new block device is encrypted, DeviceEncrypted. Note that
2160# if this error is returned, the device has been opened successfully
2161# and an additional call to @block_passwd is required to set the
2162# device's password. The behavior of reads and writes to the block
2163# device between when these calls are executed is undefined.
2164#
2165# Notes: It is strongly recommended that this interface is not used especially
2166# for changing block devices.
2167#
2168# Since: 0.14.0
2169##
2170{ 'command': 'change',
2171 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
80047da5
LC
2172
2173##
2174# @block_set_io_throttle:
2175#
2176# Change I/O throttle limits for a block drive.
2177#
2178# @device: The name of the device
2179#
2180# @bps: total throughput limit in bytes per second
2181#
2182# @bps_rd: read throughput limit in bytes per second
2183#
2184# @bps_wr: write throughput limit in bytes per second
2185#
2186# @iops: total I/O operations per second
2187#
2188# @ops_rd: read I/O operations per second
2189#
2190# @iops_wr: write I/O operations per second
2191#
3e9fab69
BC
2192# @bps_max: #optional total max in bytes (Since 1.7)
2193#
2194# @bps_rd_max: #optional read max in bytes (Since 1.7)
2195#
2196# @bps_wr_max: #optional write max in bytes (Since 1.7)
2197#
2198# @iops_max: #optional total I/O operations max (Since 1.7)
2199#
2200# @iops_rd_max: #optional read I/O operations max (Since 1.7)
2201#
2202# @iops_wr_max: #optional write I/O operations max (Since 1.7)
2203#
80047da5
LC
2204# Returns: Nothing on success
2205# If @device is not a valid block device, DeviceNotFound
80047da5
LC
2206#
2207# Since: 1.1
b80e560b 2208##
80047da5
LC
2209{ 'command': 'block_set_io_throttle',
2210 'data': { 'device': 'str', 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
3e9fab69
BC
2211 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int',
2212 '*bps_max': 'int', '*bps_rd_max': 'int',
2213 '*bps_wr_max': 'int', '*iops_max': 'int',
2214 '*iops_rd_max': 'int', '*iops_wr_max': 'int' } }
12bd451f 2215
db58f9c0
SH
2216##
2217# @block-stream:
12bd451f
SH
2218#
2219# Copy data from a backing file into a block device.
2220#
2221# The block streaming operation is performed in the background until the entire
2222# backing file has been copied. This command returns immediately once streaming
2223# has started. The status of ongoing block streaming operations can be checked
2224# with query-block-jobs. The operation can be stopped before it has completed
db58f9c0 2225# using the block-job-cancel command.
12bd451f
SH
2226#
2227# If a base file is specified then sectors are not copied from that base file and
2228# its backing chain. When streaming completes the image file will have the base
2229# file as its backing file. This can be used to stream a subset of the backing
2230# file chain instead of flattening the entire image.
2231#
2232# On successful completion the image file is updated to drop the backing file
2233# and the BLOCK_JOB_COMPLETED event is emitted.
2234#
2235# @device: the device name
2236#
2237# @base: #optional the common backing file name
2238#
c83c66c3
SH
2239# @speed: #optional the maximum speed, in bytes per second
2240#
1d809098
PB
2241# @on-error: #optional the action to take on an error (default report).
2242# 'stop' and 'enospc' can only be used if the block device
2243# supports io-status (see BlockInfo). Since 1.3.
2244#
12bd451f 2245# Returns: Nothing on success
12bd451f 2246# If @device does not exist, DeviceNotFound
12bd451f
SH
2247#
2248# Since: 1.1
2249##
1d809098
PB
2250{ 'command': 'block-stream',
2251 'data': { 'device': 'str', '*base': 'str', '*speed': 'int',
2252 '*on-error': 'BlockdevOnError' } }
2d47c6e9
SH
2253
2254##
db58f9c0 2255# @block-job-set-speed:
2d47c6e9
SH
2256#
2257# Set maximum speed for a background block operation.
2258#
2259# This command can only be issued when there is an active block job.
2260#
2261# Throttling can be disabled by setting the speed to 0.
2262#
2263# @device: the device name
2264#
c83c66c3
SH
2265# @speed: the maximum speed, in bytes per second, or 0 for unlimited.
2266# Defaults to 0.
2d47c6e9
SH
2267#
2268# Returns: Nothing on success
05290d80 2269# If no background operation is active on this device, DeviceNotActive
2d47c6e9
SH
2270#
2271# Since: 1.1
2272##
db58f9c0 2273{ 'command': 'block-job-set-speed',
882ec7ce 2274 'data': { 'device': 'str', 'speed': 'int' } }
370521a1
SH
2275
2276##
db58f9c0 2277# @block-job-cancel:
370521a1 2278#
05290d80 2279# Stop an active background block operation.
370521a1 2280#
05290d80 2281# This command returns immediately after marking the active background block
370521a1
SH
2282# operation for cancellation. It is an error to call this command if no
2283# operation is in progress.
2284#
2285# The operation will cancel as soon as possible and then emit the
2286# BLOCK_JOB_CANCELLED event. Before that happens the job is still visible when
2287# enumerated using query-block-jobs.
2288#
05290d80
PB
2289# For streaming, the image file retains its backing file unless the streaming
2290# operation happens to complete just as it is being cancelled. A new streaming
2291# operation can be started at a later time to finish copying all data from the
2292# backing file.
370521a1
SH
2293#
2294# @device: the device name
2295#
6e37fb81
PB
2296# @force: #optional whether to allow cancellation of a paused job (default
2297# false). Since 1.3.
2298#
370521a1 2299# Returns: Nothing on success
05290d80 2300# If no background operation is active on this device, DeviceNotActive
370521a1
SH
2301#
2302# Since: 1.1
2303##
6e37fb81
PB
2304{ 'command': 'block-job-cancel', 'data': { 'device': 'str', '*force': 'bool' } }
2305
2306##
2307# @block-job-pause:
2308#
2309# Pause an active background block operation.
2310#
2311# This command returns immediately after marking the active background block
2312# operation for pausing. It is an error to call this command if no
2313# operation is in progress. Pausing an already paused job has no cumulative
2314# effect; a single block-job-resume command will resume the job.
2315#
2316# The operation will pause as soon as possible. No event is emitted when
2317# the operation is actually paused. Cancelling a paused job automatically
2318# resumes it.
2319#
2320# @device: the device name
2321#
2322# Returns: Nothing on success
2323# If no background operation is active on this device, DeviceNotActive
2324#
2325# Since: 1.3
2326##
2327{ 'command': 'block-job-pause', 'data': { 'device': 'str' } }
2328
2329##
2330# @block-job-resume:
2331#
2332# Resume an active background block operation.
2333#
2334# This command returns immediately after resuming a paused background block
2335# operation. It is an error to call this command if no operation is in
2336# progress. Resuming an already running job is not an error.
2337#
32c81a4a
PB
2338# This command also clears the error status of the job.
2339#
6e37fb81
PB
2340# @device: the device name
2341#
2342# Returns: Nothing on success
2343# If no background operation is active on this device, DeviceNotActive
2344#
2345# Since: 1.3
2346##
2347{ 'command': 'block-job-resume', 'data': { 'device': 'str' } }
5eeee3fa 2348
aeae883b
PB
2349##
2350# @block-job-complete:
2351#
2352# Manually trigger completion of an active background block operation. This
2353# is supported for drive mirroring, where it also switches the device to
a66a2a36
PB
2354# write to the target path only. The ability to complete is signaled with
2355# a BLOCK_JOB_READY event.
aeae883b
PB
2356#
2357# This command completes an active background block operation synchronously.
2358# The ordering of this command's return with the BLOCK_JOB_COMPLETED event
2359# is not defined. Note that if an I/O error occurs during the processing of
2360# this command: 1) the command itself will fail; 2) the error will be processed
2361# according to the rerror/werror arguments that were specified when starting
2362# the operation.
2363#
2364# A cancelled or paused job cannot be completed.
2365#
2366# @device: the device name
2367#
2368# Returns: Nothing on success
2369# If no background operation is active on this device, DeviceNotActive
2370#
2371# Since: 1.3
2372##
2373{ 'command': 'block-job-complete', 'data': { 'device': 'str' } }
2374
5eeee3fa
AL
2375##
2376# @ObjectTypeInfo:
2377#
2378# This structure describes a search result from @qom-list-types
2379#
2380# @name: the type name found in the search
2381#
2382# Since: 1.1
2383#
2384# Notes: This command is experimental and may change syntax in future releases.
2385##
2386{ 'type': 'ObjectTypeInfo',
2387 'data': { 'name': 'str' } }
2388
2389##
2390# @qom-list-types:
2391#
2392# This command will return a list of types given search parameters
2393#
2394# @implements: if specified, only return types that implement this type name
2395#
2396# @abstract: if true, include abstract types in the results
2397#
2398# Returns: a list of @ObjectTypeInfo or an empty list if no results are found
2399#
2400# Since: 1.1
5eeee3fa
AL
2401##
2402{ 'command': 'qom-list-types',
2403 'data': { '*implements': 'str', '*abstract': 'bool' },
2404 'returns': [ 'ObjectTypeInfo' ] }
e1c37d0e 2405
1daa31b9
AL
2406##
2407# @DevicePropertyInfo:
2408#
2409# Information about device properties.
2410#
2411# @name: the name of the property
2412# @type: the typename of the property
2413#
2414# Since: 1.2
2415##
2416{ 'type': 'DevicePropertyInfo',
2417 'data': { 'name': 'str', 'type': 'str' } }
2418
2419##
2420# @device-list-properties:
2421#
2422# List properties associated with a device.
2423#
2424# @typename: the type name of a device
2425#
2426# Returns: a list of DevicePropertyInfo describing a devices properties
2427#
2428# Since: 1.2
2429##
2430{ 'command': 'device-list-properties',
2431 'data': { 'typename': 'str'},
2432 'returns': [ 'DevicePropertyInfo' ] }
2433
e1c37d0e
LC
2434##
2435# @migrate
2436#
2437# Migrates the current running guest to another Virtual Machine.
2438#
2439# @uri: the Uniform Resource Identifier of the destination VM
2440#
2441# @blk: #optional do block migration (full disk copy)
2442#
2443# @inc: #optional incremental disk copy migration
2444#
2445# @detach: this argument exists only for compatibility reasons and
2446# is ignored by QEMU
2447#
2448# Returns: nothing on success
2449#
2450# Since: 0.14.0
2451##
2452{ 'command': 'migrate',
2453 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
33cf629a 2454
a7ae8355
SS
2455# @xen-save-devices-state:
2456#
2457# Save the state of all devices to file. The RAM and the block devices
2458# of the VM are not saved by this command.
2459#
2460# @filename: the file to save the state of the devices to as binary
2461# data. See xen-save-devices-state.txt for a description of the binary
2462# format.
2463#
2464# Returns: Nothing on success
a7ae8355
SS
2465#
2466# Since: 1.1
2467##
2468{ 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
a15fef21 2469
39f42439
AP
2470##
2471# @xen-set-global-dirty-log
2472#
2473# Enable or disable the global dirty log mode.
2474#
2475# @enable: true to enable, false to disable.
2476#
2477# Returns: nothing
2478#
2479# Since: 1.3
2480##
2481{ 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
2482
a15fef21
LC
2483##
2484# @device_del:
2485#
2486# Remove a device from a guest
2487#
2488# @id: the name of the device
2489#
2490# Returns: Nothing on success
2491# If @id is not a valid device, DeviceNotFound
a15fef21
LC
2492#
2493# Notes: When this command completes, the device may not be removed from the
2494# guest. Hot removal is an operation that requires guest cooperation.
2495# This command merely requests that the guest begin the hot removal
0402a5d6
MT
2496# process. Completion of the device removal process is signaled with a
2497# DEVICE_DELETED event. Guest reset will automatically complete removal
2498# for all devices.
a15fef21
LC
2499#
2500# Since: 0.14.0
2501##
2502{ 'command': 'device_del', 'data': {'id': 'str'} }
783e9b48
WC
2503
2504##
2505# @dump-guest-memory
2506#
2507# Dump guest's memory to vmcore. It is a synchronous operation that can take
2508# very long depending on the amount of guest memory. This command is only
f5b0d93b
LC
2509# supported on i386 and x86_64.
2510#
2511# @paging: if true, do paging to get guest's memory mapping. This allows
d691180e 2512# using gdb to process the core file.
f5b0d93b 2513#
d691180e
LC
2514# IMPORTANT: this option can make QEMU allocate several gigabytes
2515# of RAM. This can happen for a large guest, or a
2516# malicious guest pretending to be large.
2517#
2518# Also, paging=true has the following limitations:
2519#
2520# 1. The guest may be in a catastrophic state or can have corrupted
2521# memory, which cannot be trusted
2522# 2. The guest can be in real-mode even if paging is enabled. For
2523# example, the guest uses ACPI to sleep, and ACPI sleep state
2524# goes in real-mode
f5b0d93b 2525#
783e9b48 2526# @protocol: the filename or file descriptor of the vmcore. The supported
d691180e 2527# protocols are:
f5b0d93b 2528#
d691180e
LC
2529# 1. file: the protocol starts with "file:", and the following
2530# string is the file's path.
2531# 2. fd: the protocol starts with "fd:", and the following string
2532# is the fd's name.
f5b0d93b 2533#
783e9b48 2534# @begin: #optional if specified, the starting physical address.
f5b0d93b 2535#
783e9b48 2536# @length: #optional if specified, the memory size, in bytes. If you don't
d691180e
LC
2537# want to dump all guest's memory, please specify the start @begin
2538# and @length
783e9b48
WC
2539#
2540# Returns: nothing on success
783e9b48
WC
2541#
2542# Since: 1.2
2543##
2544{ 'command': 'dump-guest-memory',
2545 'data': { 'paging': 'bool', 'protocol': 'str', '*begin': 'int',
2546 '*length': 'int' } }
d691180e 2547
928059a3
LC
2548##
2549# @netdev_add:
2550#
2551# Add a network backend.
2552#
2553# @type: the type of network backend. Current valid values are 'user', 'tap',
2554# 'vde', 'socket', 'dump' and 'bridge'
2555#
2556# @id: the name of the new network backend
2557#
2558# @props: #optional a list of properties to be passed to the backend in
2559# the format 'name=value', like 'ifname=tap0,script=no'
2560#
2561# Notes: The semantics of @props is not well defined. Future commands will be
2562# introduced that provide stronger typing for backend creation.
2563#
2564# Since: 0.14.0
2565#
2566# Returns: Nothing on success
2567# If @type is not a valid network backend, DeviceNotFound
928059a3
LC
2568##
2569{ 'command': 'netdev_add',
2570 'data': {'type': 'str', 'id': 'str', '*props': '**'},
2571 'gen': 'no' }
5f964155
LC
2572
2573##
2574# @netdev_del:
2575#
2576# Remove a network backend.
2577#
2578# @id: the name of the network backend to remove
2579#
2580# Returns: Nothing on success
2581# If @id is not a valid network backend, DeviceNotFound
2582#
2583# Since: 0.14.0
2584##
2585{ 'command': 'netdev_del', 'data': {'id': 'str'} }
208c9d1b 2586
14aa0c2d
LE
2587##
2588# @NetdevNoneOptions
2589#
2590# Use it alone to have zero network devices.
2591#
2592# Since 1.2
2593##
2594{ 'type': 'NetdevNoneOptions',
2595 'data': { } }
2596
2597##
2598# @NetLegacyNicOptions
2599#
2600# Create a new Network Interface Card.
2601#
2602# @netdev: #optional id of -netdev to connect to
2603#
2604# @macaddr: #optional MAC address
2605#
2606# @model: #optional device model (e1000, rtl8139, virtio etc.)
2607#
2608# @addr: #optional PCI device address
2609#
2610# @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
2611#
2612# Since 1.2
2613##
2614{ 'type': 'NetLegacyNicOptions',
2615 'data': {
2616 '*netdev': 'str',
2617 '*macaddr': 'str',
2618 '*model': 'str',
2619 '*addr': 'str',
2620 '*vectors': 'uint32' } }
2621
2622##
2623# @String
2624#
2625# A fat type wrapping 'str', to be embedded in lists.
2626#
2627# Since 1.2
2628##
2629{ 'type': 'String',
2630 'data': {
2631 'str': 'str' } }
2632
2633##
2634# @NetdevUserOptions
2635#
2636# Use the user mode network stack which requires no administrator privilege to
2637# run.
2638#
2639# @hostname: #optional client hostname reported by the builtin DHCP server
2640#
2641# @restrict: #optional isolate the guest from the host
2642#
2643# @ip: #optional legacy parameter, use net= instead
2644#
2645# @net: #optional IP address and optional netmask
2646#
2647# @host: #optional guest-visible address of the host
2648#
2649# @tftp: #optional root directory of the built-in TFTP server
2650#
2651# @bootfile: #optional BOOTP filename, for use with tftp=
2652#
2653# @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
2654# assign
2655#
2656# @dns: #optional guest-visible address of the virtual nameserver
2657#
63d2960b
KS
2658# @dnssearch: #optional list of DNS suffixes to search, passed as DHCP option
2659# to the guest
2660#
14aa0c2d
LE
2661# @smb: #optional root directory of the built-in SMB server
2662#
2663# @smbserver: #optional IP address of the built-in SMB server
2664#
2665# @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
2666# endpoints
2667#
2668# @guestfwd: #optional forward guest TCP connections
2669#
2670# Since 1.2
2671##
2672{ 'type': 'NetdevUserOptions',
2673 'data': {
2674 '*hostname': 'str',
2675 '*restrict': 'bool',
2676 '*ip': 'str',
2677 '*net': 'str',
2678 '*host': 'str',
2679 '*tftp': 'str',
2680 '*bootfile': 'str',
2681 '*dhcpstart': 'str',
2682 '*dns': 'str',
63d2960b 2683 '*dnssearch': ['String'],
14aa0c2d
LE
2684 '*smb': 'str',
2685 '*smbserver': 'str',
2686 '*hostfwd': ['String'],
2687 '*guestfwd': ['String'] } }
2688
2689##
2690# @NetdevTapOptions
2691#
2692# Connect the host TAP network interface name to the VLAN.
2693#
2694# @ifname: #optional interface name
2695#
2696# @fd: #optional file descriptor of an already opened tap
2697#
2ca81baa
JW
2698# @fds: #optional multiple file descriptors of already opened multiqueue capable
2699# tap
2700#
14aa0c2d
LE
2701# @script: #optional script to initialize the interface
2702#
2703# @downscript: #optional script to shut down the interface
2704#
2705# @helper: #optional command to execute to configure bridge
2706#
2707# @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
2708#
2709# @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
2710#
2711# @vhost: #optional enable vhost-net network accelerator
2712#
2713# @vhostfd: #optional file descriptor of an already opened vhost net device
2714#
2ca81baa
JW
2715# @vhostfds: #optional file descriptors of multiple already opened vhost net
2716# devices
2717#
14aa0c2d
LE
2718# @vhostforce: #optional vhost on for non-MSIX virtio guests
2719#
ec396014
JW
2720# @queues: #optional number of queues to be created for multiqueue capable tap
2721#
14aa0c2d
LE
2722# Since 1.2
2723##
2724{ 'type': 'NetdevTapOptions',
2725 'data': {
2726 '*ifname': 'str',
2727 '*fd': 'str',
264986e2 2728 '*fds': 'str',
14aa0c2d
LE
2729 '*script': 'str',
2730 '*downscript': 'str',
2731 '*helper': 'str',
2732 '*sndbuf': 'size',
2733 '*vnet_hdr': 'bool',
2734 '*vhost': 'bool',
2735 '*vhostfd': 'str',
264986e2
JW
2736 '*vhostfds': 'str',
2737 '*vhostforce': 'bool',
2738 '*queues': 'uint32'} }
14aa0c2d
LE
2739
2740##
2741# @NetdevSocketOptions
2742#
2743# Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
2744# socket connection.
2745#
2746# @fd: #optional file descriptor of an already opened socket
2747#
2748# @listen: #optional port number, and optional hostname, to listen on
2749#
2750# @connect: #optional port number, and optional hostname, to connect to
2751#
2752# @mcast: #optional UDP multicast address and port number
2753#
2754# @localaddr: #optional source address and port for multicast and udp packets
2755#
2756# @udp: #optional UDP unicast address and port number
2757#
2758# Since 1.2
2759##
2760{ 'type': 'NetdevSocketOptions',
2761 'data': {
2762 '*fd': 'str',
2763 '*listen': 'str',
2764 '*connect': 'str',
2765 '*mcast': 'str',
2766 '*localaddr': 'str',
2767 '*udp': 'str' } }
2768
2769##
2770# @NetdevVdeOptions
2771#
2772# Connect the VLAN to a vde switch running on the host.
2773#
2774# @sock: #optional socket path
2775#
2776# @port: #optional port number
2777#
2778# @group: #optional group owner of socket
2779#
2780# @mode: #optional permissions for socket
2781#
2782# Since 1.2
2783##
2784{ 'type': 'NetdevVdeOptions',
2785 'data': {
2786 '*sock': 'str',
2787 '*port': 'uint16',
2788 '*group': 'str',
2789 '*mode': 'uint16' } }
2790
2791##
2792# @NetdevDumpOptions
2793#
2794# Dump VLAN network traffic to a file.
2795#
2796# @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
2797# suffixes.
2798#
2799# @file: #optional dump file path (default is qemu-vlan0.pcap)
2800#
2801# Since 1.2
2802##
2803{ 'type': 'NetdevDumpOptions',
2804 'data': {
2805 '*len': 'size',
2806 '*file': 'str' } }
2807
2808##
2809# @NetdevBridgeOptions
2810#
2811# Connect a host TAP network interface to a host bridge device.
2812#
2813# @br: #optional bridge name
2814#
2815# @helper: #optional command to execute to configure bridge
2816#
2817# Since 1.2
2818##
2819{ 'type': 'NetdevBridgeOptions',
2820 'data': {
2821 '*br': 'str',
2822 '*helper': 'str' } }
2823
f6c874e3
SH
2824##
2825# @NetdevHubPortOptions
2826#
2827# Connect two or more net clients through a software hub.
2828#
2829# @hubid: hub identifier number
2830#
2831# Since 1.2
2832##
2833{ 'type': 'NetdevHubPortOptions',
2834 'data': {
2835 'hubid': 'int32' } }
2836
14aa0c2d
LE
2837##
2838# @NetClientOptions
2839#
2840# A discriminated record of network device traits.
2841#
2842# Since 1.2
2843##
2844{ 'union': 'NetClientOptions',
2845 'data': {
f6c874e3
SH
2846 'none': 'NetdevNoneOptions',
2847 'nic': 'NetLegacyNicOptions',
2848 'user': 'NetdevUserOptions',
2849 'tap': 'NetdevTapOptions',
2850 'socket': 'NetdevSocketOptions',
2851 'vde': 'NetdevVdeOptions',
2852 'dump': 'NetdevDumpOptions',
2853 'bridge': 'NetdevBridgeOptions',
2854 'hubport': 'NetdevHubPortOptions' } }
14aa0c2d
LE
2855
2856##
2857# @NetLegacy
2858#
2859# Captures the configuration of a network device; legacy.
2860#
2861# @vlan: #optional vlan number
2862#
2863# @id: #optional identifier for monitor commands
2864#
2865# @name: #optional identifier for monitor commands, ignored if @id is present
2866#
2867# @opts: device type specific properties (legacy)
2868#
2869# Since 1.2
2870##
2871{ 'type': 'NetLegacy',
2872 'data': {
2873 '*vlan': 'int32',
2874 '*id': 'str',
2875 '*name': 'str',
2876 'opts': 'NetClientOptions' } }
2877
2878##
2879# @Netdev
2880#
2881# Captures the configuration of a network device.
2882#
2883# @id: identifier for monitor commands.
2884#
2885# @opts: device type specific properties
2886#
2887# Since 1.2
2888##
2889{ 'type': 'Netdev',
2890 'data': {
2891 'id': 'str',
2892 'opts': 'NetClientOptions' } }
2893
5be8c759
PB
2894##
2895# @InetSocketAddress
2896#
2897# Captures a socket address or address range in the Internet namespace.
2898#
2899# @host: host part of the address
2900#
2901# @port: port part of the address, or lowest port if @to is present
2902#
2903# @to: highest port to try
2904#
2905# @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6
2906# #optional
2907#
2908# @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6
2909# #optional
2910#
2911# Since 1.3
2912##
2913{ 'type': 'InetSocketAddress',
2914 'data': {
2915 'host': 'str',
2916 'port': 'str',
2917 '*to': 'uint16',
2918 '*ipv4': 'bool',
2919 '*ipv6': 'bool' } }
2920
2921##
2922# @UnixSocketAddress
2923#
2924# Captures a socket address in the local ("Unix socket") namespace.
2925#
2926# @path: filesystem path to use
2927#
2928# Since 1.3
2929##
2930{ 'type': 'UnixSocketAddress',
2931 'data': {
2932 'path': 'str' } }
2933
2934##
2935# @SocketAddress
2936#
2937# Captures the address of a socket, which could also be a named file descriptor
2938#
2939# Since 1.3
2940##
2941{ 'union': 'SocketAddress',
2942 'data': {
2943 'inet': 'InetSocketAddress',
2944 'unix': 'UnixSocketAddress',
2945 'fd': 'String' } }
2946
208c9d1b
CB
2947##
2948# @getfd:
2949#
2950# Receive a file descriptor via SCM rights and assign it a name
2951#
2952# @fdname: file descriptor name
2953#
2954# Returns: Nothing on success
208c9d1b
CB
2955#
2956# Since: 0.14.0
2957#
2958# Notes: If @fdname already exists, the file descriptor assigned to
2959# it will be closed and replaced by the received file
2960# descriptor.
2961# The 'closefd' command can be used to explicitly close the
2962# file descriptor when it is no longer needed.
2963##
2964{ 'command': 'getfd', 'data': {'fdname': 'str'} }
2965
2966##
2967# @closefd:
2968#
2969# Close a file descriptor previously passed via SCM rights
2970#
2971# @fdname: file descriptor name
2972#
2973# Returns: Nothing on success
208c9d1b
CB
2974#
2975# Since: 0.14.0
2976##
2977{ 'command': 'closefd', 'data': {'fdname': 'str'} }
01d3c80d
AL
2978
2979##
2980# @MachineInfo:
2981#
2982# Information describing a machine.
2983#
2984# @name: the name of the machine
2985#
2986# @alias: #optional an alias for the machine name
2987#
2988# @default: #optional whether the machine is default
2989#
c72e7688
MN
2990# @cpu-max: maximum number of CPUs supported by the machine type
2991# (since 1.5.0)
2992#
01d3c80d
AL
2993# Since: 1.2.0
2994##
2995{ 'type': 'MachineInfo',
2996 'data': { 'name': 'str', '*alias': 'str',
c72e7688 2997 '*is-default': 'bool', 'cpu-max': 'int' } }
01d3c80d
AL
2998
2999##
3000# @query-machines:
3001#
3002# Return a list of supported machines
3003#
3004# Returns: a list of MachineInfo
3005#
3006# Since: 1.2.0
3007##
3008{ 'command': 'query-machines', 'returns': ['MachineInfo'] }
e4e31c63
AL
3009
3010##
3011# @CpuDefinitionInfo:
3012#
3013# Virtual CPU definition.
3014#
3015# @name: the name of the CPU definition
3016#
3017# Since: 1.2.0
3018##
3019{ 'type': 'CpuDefinitionInfo',
3020 'data': { 'name': 'str' } }
3021
3022##
3023# @query-cpu-definitions:
3024#
3025# Return a list of supported virtual CPU definitions
3026#
3027# Returns: a list of CpuDefInfo
3028#
3029# Since: 1.2.0
3030##
3031{ 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
ba1c048a
CB
3032
3033# @AddfdInfo:
3034#
3035# Information about a file descriptor that was added to an fd set.
3036#
3037# @fdset-id: The ID of the fd set that @fd was added to.
3038#
3039# @fd: The file descriptor that was received via SCM rights and
3040# added to the fd set.
3041#
3042# Since: 1.2.0
3043##
3044{ 'type': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
3045
3046##
3047# @add-fd:
3048#
3049# Add a file descriptor, that was passed via SCM rights, to an fd set.
3050#
3051# @fdset-id: #optional The ID of the fd set to add the file descriptor to.
3052#
3053# @opaque: #optional A free-form string that can be used to describe the fd.
3054#
3055# Returns: @AddfdInfo on success
3056# If file descriptor was not received, FdNotSupplied
9ac54af0 3057# If @fdset-id is a negative value, InvalidParameterValue
ba1c048a
CB
3058#
3059# Notes: The list of fd sets is shared by all monitor connections.
3060#
3061# If @fdset-id is not specified, a new fd set will be created.
3062#
3063# Since: 1.2.0
3064##
3065{ 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
3066 'returns': 'AddfdInfo' }
3067
3068##
3069# @remove-fd:
3070#
3071# Remove a file descriptor from an fd set.
3072#
3073# @fdset-id: The ID of the fd set that the file descriptor belongs to.
3074#
3075# @fd: #optional The file descriptor that is to be removed.
3076#
3077# Returns: Nothing on success
3078# If @fdset-id or @fd is not found, FdNotFound
3079#
3080# Since: 1.2.0
3081#
3082# Notes: The list of fd sets is shared by all monitor connections.
3083#
3084# If @fd is not specified, all file descriptors in @fdset-id
3085# will be removed.
3086##
3087{ 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
3088
3089##
3090# @FdsetFdInfo:
3091#
3092# Information about a file descriptor that belongs to an fd set.
3093#
3094# @fd: The file descriptor value.
3095#
3096# @opaque: #optional A free-form string that can be used to describe the fd.
3097#
3098# Since: 1.2.0
3099##
3100{ 'type': 'FdsetFdInfo',
3101 'data': {'fd': 'int', '*opaque': 'str'} }
3102
3103##
3104# @FdsetInfo:
3105#
3106# Information about an fd set.
3107#
3108# @fdset-id: The ID of the fd set.
3109#
3110# @fds: A list of file descriptors that belong to this fd set.
3111#
3112# Since: 1.2.0
3113##
3114{ 'type': 'FdsetInfo',
3115 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
3116
3117##
3118# @query-fdsets:
3119#
3120# Return information describing all fd sets.
3121#
3122# Returns: A list of @FdsetInfo
3123#
3124# Since: 1.2.0
3125#
3126# Note: The list of fd sets is shared by all monitor connections.
3127#
3128##
3129{ 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
99afc91d 3130
99afc91d
DB
3131##
3132# @TargetInfo:
3133#
3134# Information describing the QEMU target.
3135#
3136# @arch: the target architecture (eg "x86_64", "i386", etc)
3137#
3138# Since: 1.2.0
3139##
3140{ 'type': 'TargetInfo',
c02a9552 3141 'data': { 'arch': 'str' } }
99afc91d
DB
3142
3143##
3144# @query-target:
3145#
3146# Return information about the target for this QEMU
3147#
3148# Returns: TargetInfo
3149#
3150# Since: 1.2.0
3151##
3152{ 'command': 'query-target', 'returns': 'TargetInfo' }
411656f4
AK
3153
3154##
3155# @QKeyCode:
3156#
3157# An enumeration of key name.
3158#
3159# This is used by the send-key command.
3160#
3161# Since: 1.3.0
3162##
3163{ 'enum': 'QKeyCode',
3164 'data': [ 'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
3165 'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
3166 '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
3167 'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
3168 'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
3169 'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
3170 'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
3171 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
3172 'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
3173 'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
3174 'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
3175 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
3176 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
3177 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
3178 'lf', 'help', 'meta_l', 'meta_r', 'compose' ] }
e4c8f004 3179
9f328977
LC
3180##
3181# @KeyValue
3182#
3183# Represents a keyboard key.
3184#
3185# Since: 1.3.0
3186##
3187{ 'union': 'KeyValue',
3188 'data': {
3189 'number': 'int',
3190 'qcode': 'QKeyCode' } }
3191
e4c8f004
AK
3192##
3193# @send-key:
3194#
3195# Send keys to guest.
3196#
9f328977
LC
3197# @keys: An array of @KeyValue elements. All @KeyValues in this array are
3198# simultaneously sent to the guest. A @KeyValue.number value is sent
3199# directly to the guest, while @KeyValue.qcode must be a valid
3200# @QKeyCode value
e4c8f004
AK
3201#
3202# @hold-time: #optional time to delay key up events, milliseconds. Defaults
3203# to 100
3204#
3205# Returns: Nothing on success
3206# If key is unknown or redundant, InvalidParameter
3207#
3208# Since: 1.3.0
3209#
3210##
3211{ 'command': 'send-key',
9f328977 3212 'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
ad39cf6d
LC
3213
3214##
3215# @screendump:
3216#
3217# Write a PPM of the VGA screen to a file.
3218#
3219# @filename: the path of a new PPM file to store the image
3220#
3221# Returns: Nothing on success
3222#
3223# Since: 0.14.0
3224##
3225{ 'command': 'screendump', 'data': {'filename': 'str'} }
6dd844db
PB
3226
3227##
3228# @nbd-server-start:
3229#
3230# Start an NBD server listening on the given host and port. Block
3231# devices can then be exported using @nbd-server-add. The NBD
3232# server will present them as named exports; for example, another
3233# QEMU instance could refer to them as "nbd:HOST:PORT:exportname=NAME".
3234#
3235# @addr: Address on which to listen.
3236#
3237# Returns: error if the server is already running.
3238#
3239# Since: 1.3.0
3240##
3241{ 'command': 'nbd-server-start',
3242 'data': { 'addr': 'SocketAddress' } }
3243
3244##
3245# @nbd-server-add:
3246#
3247# Export a device to QEMU's embedded NBD server.
3248#
3249# @device: Block device to be exported
3250#
3251# @writable: Whether clients should be able to write to the device via the
3252# NBD connection (default false). #optional
3253#
3254# Returns: error if the device is already marked for export.
3255#
3256# Since: 1.3.0
3257##
3258{ 'command': 'nbd-server-add', 'data': {'device': 'str', '*writable': 'bool'} }
3259
3260##
3261# @nbd-server-stop:
3262#
3263# Stop QEMU's embedded NBD server, and unregister all devices previously
3264# added via @nbd-server-add.
3265#
3266# Since: 1.3.0
3267##
3268{ 'command': 'nbd-server-stop' }
f1a1a356 3269
ffbdbe59
GH
3270##
3271# @ChardevFile:
3272#
3273# Configuration info for file chardevs.
3274#
3275# @in: #optional The name of the input file
3276# @out: The name of the output file
3277#
3278# Since: 1.4
3279##
3280{ 'type': 'ChardevFile', 'data': { '*in' : 'str',
3281 'out' : 'str' } }
3282
d59044ef 3283##
d36b2b90 3284# @ChardevHostdev:
d59044ef 3285#
548cbb36 3286# Configuration info for device and pipe chardevs.
d59044ef
GH
3287#
3288# @device: The name of the special file for the device,
3289# i.e. /dev/ttyS0 on Unix or COM1: on Windows
3290# @type: What kind of device this is.
3291#
3292# Since: 1.4
3293##
d36b2b90 3294{ 'type': 'ChardevHostdev', 'data': { 'device' : 'str' } }
d59044ef 3295
f6bd5d6e
GH
3296##
3297# @ChardevSocket:
3298#
3ecc059d 3299# Configuration info for (stream) socket chardevs.
f6bd5d6e
GH
3300#
3301# @addr: socket address to listen on (server=true)
3302# or connect to (server=false)
3303# @server: #optional create server socket (default: true)
ef993ba7
GH
3304# @wait: #optional wait for incoming connection on server
3305# sockets (default: false).
f6bd5d6e 3306# @nodelay: #optional set TCP_NODELAY socket option (default: false)
ef993ba7
GH
3307# @telnet: #optional enable telnet protocol on server
3308# sockets (default: false)
f6bd5d6e
GH
3309#
3310# Since: 1.4
3311##
3312{ 'type': 'ChardevSocket', 'data': { 'addr' : 'SocketAddress',
3313 '*server' : 'bool',
3314 '*wait' : 'bool',
3315 '*nodelay' : 'bool',
3316 '*telnet' : 'bool' } }
3317
3ecc059d 3318##
08d0ab3f 3319# @ChardevUdp:
3ecc059d
GH
3320#
3321# Configuration info for datagram socket chardevs.
3322#
3323# @remote: remote address
3324# @local: #optional local address
3325#
3326# Since: 1.5
3327##
08d0ab3f
LL
3328{ 'type': 'ChardevUdp', 'data': { 'remote' : 'SocketAddress',
3329 '*local' : 'SocketAddress' } }
3ecc059d 3330
edb2fb3c
GH
3331##
3332# @ChardevMux:
3333#
3334# Configuration info for mux chardevs.
3335#
3336# @chardev: name of the base chardev.
3337#
3338# Since: 1.5
3339##
3340{ 'type': 'ChardevMux', 'data': { 'chardev' : 'str' } }
3341
7c358031
GH
3342##
3343# @ChardevStdio:
3344#
3345# Configuration info for stdio chardevs.
3346#
3347# @signal: #optional Allow signals (such as SIGINT triggered by ^C)
3348# be delivered to qemu. Default: true in -nographic mode,
3349# false otherwise.
3350#
3351# Since: 1.5
3352##
3353{ 'type': 'ChardevStdio', 'data': { '*signal' : 'bool' } }
3354
cd153e2a
GH
3355##
3356# @ChardevSpiceChannel:
3357#
3358# Configuration info for spice vm channel chardevs.
3359#
3360# @type: kind of channel (for example vdagent).
3361#
3362# Since: 1.5
3363##
3364{ 'type': 'ChardevSpiceChannel', 'data': { 'type' : 'str' } }
3365
3366##
3367# @ChardevSpicePort:
3368#
3369# Configuration info for spice port chardevs.
3370#
3371# @fqdn: name of the channel (see docs/spice-port-fqdn.txt)
3372#
3373# Since: 1.5
3374##
3375{ 'type': 'ChardevSpicePort', 'data': { 'fqdn' : 'str' } }
3376
702ec69c
GH
3377##
3378# @ChardevVC:
3379#
3380# Configuration info for virtual console chardevs.
3381#
3382# @width: console width, in pixels
3383# @height: console height, in pixels
3384# @cols: console width, in chars
3385# @rows: console height, in chars
3386#
3387# Since: 1.5
3388##
3389{ 'type': 'ChardevVC', 'data': { '*width' : 'int',
3390 '*height' : 'int',
3391 '*cols' : 'int',
3392 '*rows' : 'int' } }
3393
1da48c65 3394##
4f57378f 3395# @ChardevRingbuf:
1da48c65 3396#
3a1da42e 3397# Configuration info for ring buffer chardevs.
1da48c65 3398#
3a1da42e 3399# @size: #optional ring buffer size, must be power of two, default is 65536
1da48c65
GH
3400#
3401# Since: 1.5
3402##
4f57378f 3403{ 'type': 'ChardevRingbuf', 'data': { '*size' : 'int' } }
1da48c65 3404
f1a1a356
GH
3405##
3406# @ChardevBackend:
3407#
3408# Configuration info for the new chardev backend.
3409#
3410# Since: 1.4
3411##
3412{ 'type': 'ChardevDummy', 'data': { } }
3413
f6bd5d6e 3414{ 'union': 'ChardevBackend', 'data': { 'file' : 'ChardevFile',
d36b2b90
MA
3415 'serial' : 'ChardevHostdev',
3416 'parallel': 'ChardevHostdev',
548cbb36 3417 'pipe' : 'ChardevHostdev',
f6bd5d6e 3418 'socket' : 'ChardevSocket',
08d0ab3f 3419 'udp' : 'ChardevUdp',
0a1a7fab 3420 'pty' : 'ChardevDummy',
edb2fb3c 3421 'null' : 'ChardevDummy',
f5a51cab 3422 'mux' : 'ChardevMux',
2d57286d 3423 'msmouse': 'ChardevDummy',
7c358031 3424 'braille': 'ChardevDummy',
d9ac374f 3425 'stdio' : 'ChardevStdio',
cd153e2a
GH
3426 'console': 'ChardevDummy',
3427 'spicevmc' : 'ChardevSpiceChannel',
702ec69c 3428 'spiceport' : 'ChardevSpicePort',
1da48c65 3429 'vc' : 'ChardevVC',
3a1da42e
MA
3430 'ringbuf': 'ChardevRingbuf',
3431 # next one is just for compatibility
4f57378f 3432 'memory' : 'ChardevRingbuf' } }
f1a1a356
GH
3433
3434##
3435# @ChardevReturn:
3436#
3437# Return info about the chardev backend just created.
3438#
58fa4325
MA
3439# @pty: #optional name of the slave pseudoterminal device, present if
3440# and only if a chardev of type 'pty' was created
3441#
f1a1a356
GH
3442# Since: 1.4
3443##
0a1a7fab 3444{ 'type' : 'ChardevReturn', 'data': { '*pty' : 'str' } }
f1a1a356
GH
3445
3446##
3447# @chardev-add:
3448#
58fa4325 3449# Add a character device backend
f1a1a356
GH
3450#
3451# @id: the chardev's ID, must be unique
3452# @backend: backend type and parameters
3453#
58fa4325 3454# Returns: ChardevReturn.
f1a1a356
GH
3455#
3456# Since: 1.4
3457##
3458{ 'command': 'chardev-add', 'data': {'id' : 'str',
3459 'backend' : 'ChardevBackend' },
3460 'returns': 'ChardevReturn' }
3461
3462##
3463# @chardev-remove:
3464#
58fa4325 3465# Remove a character device backend
f1a1a356
GH
3466#
3467# @id: the chardev's ID, must exist and not be in use
3468#
3469# Returns: Nothing on success
3470#
3471# Since: 1.4
3472##
3473{ 'command': 'chardev-remove', 'data': {'id': 'str'} }
d1a0cf73
SB
3474
3475##
3476# @TpmModel:
3477#
3478# An enumeration of TPM models
3479#
3480# @tpm-tis: TPM TIS model
3481#
3482# Since: 1.5
3483##
3484{ 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] }
3485
3486##
3487# @query-tpm-models:
3488#
3489# Return a list of supported TPM models
3490#
3491# Returns: a list of TpmModel
3492#
3493# Since: 1.5
3494##
3495{ 'command': 'query-tpm-models', 'returns': ['TpmModel'] }
3496
3497##
3498# @TpmType:
3499#
3500# An enumeration of TPM types
3501#
3502# @passthrough: TPM passthrough type
3503#
3504# Since: 1.5
3505##
3506{ 'enum': 'TpmType', 'data': [ 'passthrough' ] }
3507
3508##
3509# @query-tpm-types:
3510#
3511# Return a list of supported TPM types
3512#
3513# Returns: a list of TpmType
3514#
3515# Since: 1.5
3516##
3517{ 'command': 'query-tpm-types', 'returns': ['TpmType'] }
3518
3519##
3520# @TPMPassthroughOptions:
3521#
3522# Information about the TPM passthrough type
3523#
3524# @path: #optional string describing the path used for accessing the TPM device
3525#
3526# @cancel-path: #optional string showing the TPM's sysfs cancel file
3527# for cancellation of TPM commands while they are executing
3528#
3529# Since: 1.5
3530##
3531{ 'type': 'TPMPassthroughOptions', 'data': { '*path' : 'str',
3532 '*cancel-path' : 'str'} }
3533
3534##
3535# @TpmTypeOptions:
3536#
3537# A union referencing different TPM backend types' configuration options
3538#
88ca7bcf 3539# @passthrough: The configuration options for the TPM passthrough type
d1a0cf73
SB
3540#
3541# Since: 1.5
3542##
3543{ 'union': 'TpmTypeOptions',
88ca7bcf 3544 'data': { 'passthrough' : 'TPMPassthroughOptions' } }
d1a0cf73
SB
3545
3546##
3547# @TpmInfo:
3548#
3549# Information about the TPM
3550#
3551# @id: The Id of the TPM
3552#
3553# @model: The TPM frontend model
3554#
88ca7bcf 3555# @options: The TPM (backend) type configuration options
d1a0cf73
SB
3556#
3557# Since: 1.5
3558##
3559{ 'type': 'TPMInfo',
3560 'data': {'id': 'str',
3561 'model': 'TpmModel',
88ca7bcf 3562 'options': 'TpmTypeOptions' } }
d1a0cf73
SB
3563
3564##
3565# @query-tpm:
3566#
3567# Return information about the TPM device
3568#
3569# Returns: @TPMInfo on success
3570#
3571# Since: 1.5
3572##
3573{ 'command': 'query-tpm', 'returns': ['TPMInfo'] }
8ccbad5c
LE
3574
3575##
3576# @AcpiTableOptions
3577#
3578# Specify an ACPI table on the command line to load.
3579#
3580# At most one of @file and @data can be specified. The list of files specified
3581# by any one of them is loaded and concatenated in order. If both are omitted,
3582# @data is implied.
3583#
3584# Other fields / optargs can be used to override fields of the generic ACPI
3585# table header; refer to the ACPI specification 5.0, section 5.2.6 System
3586# Description Table Header. If a header field is not overridden, then the
3587# corresponding value from the concatenated blob is used (in case of @file), or
3588# it is filled in with a hard-coded value (in case of @data).
3589#
3590# String fields are copied into the matching ACPI member from lowest address
3591# upwards, and silently truncated / NUL-padded to length.
3592#
3593# @sig: #optional table signature / identifier (4 bytes)
3594#
3595# @rev: #optional table revision number (dependent on signature, 1 byte)
3596#
3597# @oem_id: #optional OEM identifier (6 bytes)
3598#
3599# @oem_table_id: #optional OEM table identifier (8 bytes)
3600#
3601# @oem_rev: #optional OEM-supplied revision number (4 bytes)
3602#
3603# @asl_compiler_id: #optional identifier of the utility that created the table
3604# (4 bytes)
3605#
3606# @asl_compiler_rev: #optional revision number of the utility that created the
3607# table (4 bytes)
3608#
3609# @file: #optional colon (:) separated list of pathnames to load and
3610# concatenate as table data. The resultant binary blob is expected to
3611# have an ACPI table header. At least one file is required. This field
3612# excludes @data.
3613#
3614# @data: #optional colon (:) separated list of pathnames to load and
3615# concatenate as table data. The resultant binary blob must not have an
3616# ACPI table header. At least one file is required. This field excludes
3617# @file.
3618#
3619# Since 1.5
3620##
3621{ 'type': 'AcpiTableOptions',
3622 'data': {
3623 '*sig': 'str',
3624 '*rev': 'uint8',
3625 '*oem_id': 'str',
3626 '*oem_table_id': 'str',
3627 '*oem_rev': 'uint32',
3628 '*asl_compiler_id': 'str',
3629 '*asl_compiler_rev': 'uint32',
3630 '*file': 'str',
3631 '*data': 'str' }}
1f8f987d
AK
3632
3633##
3634# @CommandLineParameterType:
3635#
3636# Possible types for an option parameter.
3637#
3638# @string: accepts a character string
3639#
3640# @boolean: accepts "on" or "off"
3641#
3642# @number: accepts a number
3643#
3644# @size: accepts a number followed by an optional suffix (K)ilo,
3645# (M)ega, (G)iga, (T)era
3646#
3647# Since 1.5
3648##
3649{ 'enum': 'CommandLineParameterType',
3650 'data': ['string', 'boolean', 'number', 'size'] }
3651
3652##
3653# @CommandLineParameterInfo:
3654#
3655# Details about a single parameter of a command line option.
3656#
3657# @name: parameter name
3658#
3659# @type: parameter @CommandLineParameterType
3660#
3661# @help: #optional human readable text string, not suitable for parsing.
3662#
3663# Since 1.5
3664##
3665{ 'type': 'CommandLineParameterInfo',
3666 'data': { 'name': 'str',
3667 'type': 'CommandLineParameterType',
3668 '*help': 'str' } }
3669
3670##
3671# @CommandLineOptionInfo:
3672#
3673# Details about a command line option, including its list of parameter details
3674#
3675# @option: option name
3676#
3677# @parameters: an array of @CommandLineParameterInfo
3678#
3679# Since 1.5
3680##
3681{ 'type': 'CommandLineOptionInfo',
3682 'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
3683
3684##
3685# @query-command-line-options:
3686#
3687# Query command line option schema.
3688#
3689# @option: #optional option name
3690#
3691# Returns: list of @CommandLineOptionInfo for all options (or for the given
3692# @option). Returns an error if the given @option doesn't exist.
3693#
3694# Since 1.5
3695##
3696{'command': 'query-command-line-options', 'data': { '*option': 'str' },
3697 'returns': ['CommandLineOptionInfo'] }
8e8aba50
EH
3698
3699##
3700# @X86CPURegister32
3701#
3702# A X86 32-bit register
3703#
3704# Since: 1.5
3705##
3706{ 'enum': 'X86CPURegister32',
3707 'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
3708
3709##
3710# @X86CPUFeatureWordInfo
3711#
3712# Information about a X86 CPU feature word
3713#
3714# @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
3715#
3716# @cpuid-input-ecx: #optional Input ECX value for CPUID instruction for that
3717# feature word
3718#
3719# @cpuid-register: Output register containing the feature bits
3720#
3721# @features: value of output register, containing the feature bits
3722#
3723# Since: 1.5
3724##
3725{ 'type': 'X86CPUFeatureWordInfo',
3726 'data': { 'cpuid-input-eax': 'int',
3727 '*cpuid-input-ecx': 'int',
3728 'cpuid-register': 'X86CPURegister32',
3729 'features': 'int' } }
b1be4280
AK
3730
3731##
3732# @RxState:
3733#
3734# Packets receiving state
3735#
3736# @normal: filter assigned packets according to the mac-table
3737#
3738# @none: don't receive any assigned packet
3739#
3740# @all: receive all assigned packets
3741#
3742# Since: 1.6
3743##
3744{ 'enum': 'RxState', 'data': [ 'normal', 'none', 'all' ] }
3745
3746##
3747# @RxFilterInfo:
3748#
3749# Rx-filter information for a NIC.
3750#
3751# @name: net client name
3752#
3753# @promiscuous: whether promiscuous mode is enabled
3754#
3755# @multicast: multicast receive state
3756#
3757# @unicast: unicast receive state
3758#
3759# @broadcast-allowed: whether to receive broadcast
3760#
3761# @multicast-overflow: multicast table is overflowed or not
3762#
3763# @unicast-overflow: unicast table is overflowed or not
3764#
3765# @main-mac: the main macaddr string
3766#
3767# @vlan-table: a list of active vlan id
3768#
3769# @unicast-table: a list of unicast macaddr string
3770#
3771# @multicast-table: a list of multicast macaddr string
3772#
3773# Since 1.6
3774##
3775
3776{ 'type': 'RxFilterInfo',
3777 'data': {
3778 'name': 'str',
3779 'promiscuous': 'bool',
3780 'multicast': 'RxState',
3781 'unicast': 'RxState',
3782 'broadcast-allowed': 'bool',
3783 'multicast-overflow': 'bool',
3784 'unicast-overflow': 'bool',
3785 'main-mac': 'str',
3786 'vlan-table': ['int'],
3787 'unicast-table': ['str'],
3788 'multicast-table': ['str'] }}
3789
3790##
3791# @query-rx-filter:
3792#
3793# Return rx-filter information for all NICs (or for the given NIC).
3794#
3795# @name: #optional net client name
3796#
3797# Returns: list of @RxFilterInfo for all NICs (or for the given NIC).
3798# Returns an error if the given @name doesn't exist, or given
3799# NIC doesn't support rx-filter querying, or given net client
3800# isn't a NIC.
3801#
3802# Since: 1.6
3803##
3804{ 'command': 'query-rx-filter', 'data': { '*name': 'str' },
3805 'returns': ['RxFilterInfo'] }