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