Statistics
| Branch: | Revision:

root / qapi-schema.json @ 8599ea4c

History | View | Annotate | Download (86.6 kB)

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