]> Git Repo - qemu.git/blob - qapi/run-state.json
qapi: introduce preconfig runstate
[qemu.git] / qapi / run-state.json
1 # -*- Mode: Python -*-
2 #
3
4 ##
5 # = VM run state
6 ##
7
8 ##
9 # @RunState:
10 #
11 # An enumeration of VM run states.
12 #
13 # @debug: QEMU is running on a debugger
14 #
15 # @finish-migrate: guest is paused to finish the migration process
16 #
17 # @inmigrate: guest is paused waiting for an incoming migration.  Note
18 # that this state does not tell whether the machine will start at the
19 # end of the migration.  This depends on the command-line -S option and
20 # any invocation of 'stop' or 'cont' that has happened since QEMU was
21 # started.
22 #
23 # @internal-error: An internal error that prevents further guest execution
24 # has occurred
25 #
26 # @io-error: the last IOP has failed and the device is configured to pause
27 # on I/O errors
28 #
29 # @paused: guest has been paused via the 'stop' command
30 #
31 # @postmigrate: guest is paused following a successful 'migrate'
32 #
33 # @prelaunch: QEMU was started with -S and guest has not started
34 #
35 # @restore-vm: guest is paused to restore VM state
36 #
37 # @running: guest is actively running
38 #
39 # @save-vm: guest is paused to save the VM state
40 #
41 # @shutdown: guest is shut down (and -no-shutdown is in use)
42 #
43 # @suspended: guest is suspended (ACPI S3)
44 #
45 # @watchdog: the watchdog action is configured to pause and has been triggered
46 #
47 # @guest-panicked: guest has been panicked as a result of guest OS panic
48 #
49 # @colo: guest is paused to save/restore VM state under colo checkpoint,
50 #        VM can not get into this state unless colo capability is enabled
51 #        for migration. (since 2.8)
52 # @preconfig: QEMU is paused before board specific init callback is executed.
53 #             The state is reachable only if the --preconfig CLI option is used.
54 #             (Since 3.0)
55 ##
56 { 'enum': 'RunState',
57   'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
58             'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
59             'running', 'save-vm', 'shutdown', 'suspended', 'watchdog',
60             'guest-panicked', 'colo', 'preconfig' ] }
61
62 ##
63 # @StatusInfo:
64 #
65 # Information about VCPU run state
66 #
67 # @running: true if all VCPUs are runnable, false if not runnable
68 #
69 # @singlestep: true if VCPUs are in single-step mode
70 #
71 # @status: the virtual machine @RunState
72 #
73 # Since:  0.14.0
74 #
75 # Notes: @singlestep is enabled through the GDB stub
76 ##
77 { 'struct': 'StatusInfo',
78   'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
79
80 ##
81 # @query-status:
82 #
83 # Query the run status of all VCPUs
84 #
85 # Returns: @StatusInfo reflecting all VCPUs
86 #
87 # Since:  0.14.0
88 #
89 # Example:
90 #
91 # -> { "execute": "query-status" }
92 # <- { "return": { "running": true,
93 #                  "singlestep": false,
94 #                  "status": "running" } }
95 #
96 ##
97 { 'command': 'query-status', 'returns': 'StatusInfo' }
98
99 ##
100 # @SHUTDOWN:
101 #
102 # Emitted when the virtual machine has shut down, indicating that qemu is
103 # about to exit.
104 #
105 # @guest: If true, the shutdown was triggered by a guest request (such as
106 # a guest-initiated ACPI shutdown request or other hardware-specific action)
107 # rather than a host request (such as sending qemu a SIGINT). (since 2.10)
108 #
109 # Note: If the command-line option "-no-shutdown" has been specified, qemu will
110 # not exit, and a STOP event will eventually follow the SHUTDOWN event
111 #
112 # Since: 0.12.0
113 #
114 # Example:
115 #
116 # <- { "event": "SHUTDOWN", "data": { "guest": true },
117 #      "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
118 #
119 ##
120 { 'event': 'SHUTDOWN', 'data': { 'guest': 'bool' } }
121
122 ##
123 # @POWERDOWN:
124 #
125 # Emitted when the virtual machine is powered down through the power control
126 # system, such as via ACPI.
127 #
128 # Since: 0.12.0
129 #
130 # Example:
131 #
132 # <- { "event": "POWERDOWN",
133 #      "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
134 #
135 ##
136 { 'event': 'POWERDOWN' }
137
138 ##
139 # @RESET:
140 #
141 # Emitted when the virtual machine is reset
142 #
143 # @guest: If true, the reset was triggered by a guest request (such as
144 # a guest-initiated ACPI reboot request or other hardware-specific action)
145 # rather than a host request (such as the QMP command system_reset).
146 # (since 2.10)
147 #
148 # Since: 0.12.0
149 #
150 # Example:
151 #
152 # <- { "event": "RESET", "data": { "guest": false },
153 #      "timestamp": { "seconds": 1267041653, "microseconds": 9518 } }
154 #
155 ##
156 { 'event': 'RESET', 'data': { 'guest': 'bool' } }
157
158 ##
159 # @STOP:
160 #
161 # Emitted when the virtual machine is stopped
162 #
163 # Since: 0.12.0
164 #
165 # Example:
166 #
167 # <- { "event": "STOP",
168 #      "timestamp": { "seconds": 1267041730, "microseconds": 281295 } }
169 #
170 ##
171 { 'event': 'STOP' }
172
173 ##
174 # @RESUME:
175 #
176 # Emitted when the virtual machine resumes execution
177 #
178 # Since: 0.12.0
179 #
180 # Example:
181 #
182 # <- { "event": "RESUME",
183 #      "timestamp": { "seconds": 1271770767, "microseconds": 582542 } }
184 #
185 ##
186 { 'event': 'RESUME' }
187
188 ##
189 # @SUSPEND:
190 #
191 # Emitted when guest enters a hardware suspension state, for example, S3 state,
192 # which is sometimes called standby state
193 #
194 # Since: 1.1
195 #
196 # Example:
197 #
198 # <- { "event": "SUSPEND",
199 #      "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
200 #
201 ##
202 { 'event': 'SUSPEND' }
203
204 ##
205 # @SUSPEND_DISK:
206 #
207 # Emitted when guest enters a hardware suspension state with data saved on
208 # disk, for example, S4 state, which is sometimes called hibernate state
209 #
210 # Note: QEMU shuts down (similar to event @SHUTDOWN) when entering this state
211 #
212 # Since: 1.2
213 #
214 # Example:
215 #
216 # <-   { "event": "SUSPEND_DISK",
217 #        "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
218 #
219 ##
220 { 'event': 'SUSPEND_DISK' }
221
222 ##
223 # @WAKEUP:
224 #
225 # Emitted when the guest has woken up from suspend state and is running
226 #
227 # Since: 1.1
228 #
229 # Example:
230 #
231 # <- { "event": "WAKEUP",
232 #      "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
233 #
234 ##
235 { 'event': 'WAKEUP' }
236
237 ##
238 # @WATCHDOG:
239 #
240 # Emitted when the watchdog device's timer is expired
241 #
242 # @action: action that has been taken
243 #
244 # Note: If action is "reset", "shutdown", or "pause" the WATCHDOG event is
245 # followed respectively by the RESET, SHUTDOWN, or STOP events
246 #
247 # Note: This event is rate-limited.
248 #
249 # Since: 0.13.0
250 #
251 # Example:
252 #
253 # <- { "event": "WATCHDOG",
254 #      "data": { "action": "reset" },
255 #      "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
256 #
257 ##
258 { 'event': 'WATCHDOG',
259   'data': { 'action': 'WatchdogAction' } }
260
261 ##
262 # @WatchdogAction:
263 #
264 # An enumeration of the actions taken when the watchdog device's timer is
265 # expired
266 #
267 # @reset: system resets
268 #
269 # @shutdown: system shutdown, note that it is similar to @powerdown, which
270 #            tries to set to system status and notify guest
271 #
272 # @poweroff: system poweroff, the emulator program exits
273 #
274 # @pause: system pauses, similar to @stop
275 #
276 # @debug: system enters debug state
277 #
278 # @none: nothing is done
279 #
280 # @inject-nmi: a non-maskable interrupt is injected into the first VCPU (all
281 #              VCPUS on x86) (since 2.4)
282 #
283 # Since: 2.1
284 ##
285 { 'enum': 'WatchdogAction',
286   'data': [ 'reset', 'shutdown', 'poweroff', 'pause', 'debug', 'none',
287             'inject-nmi' ] }
288
289 ##
290 # @watchdog-set-action:
291 #
292 # Set watchdog action
293 #
294 # Since: 2.11
295 ##
296 { 'command': 'watchdog-set-action', 'data' : {'action': 'WatchdogAction'} }
297
298 ##
299 # @GUEST_PANICKED:
300 #
301 # Emitted when guest OS panic is detected
302 #
303 # @action: action that has been taken, currently always "pause"
304 #
305 # @info: information about a panic (since 2.9)
306 #
307 # Since: 1.5
308 #
309 # Example:
310 #
311 # <- { "event": "GUEST_PANICKED",
312 #      "data": { "action": "pause" } }
313 #
314 ##
315 { 'event': 'GUEST_PANICKED',
316   'data': { 'action': 'GuestPanicAction', '*info': 'GuestPanicInformation' } }
317
318 ##
319 # @GuestPanicAction:
320 #
321 # An enumeration of the actions taken when guest OS panic is detected
322 #
323 # @pause: system pauses
324 #
325 # Since: 2.1 (poweroff since 2.8)
326 ##
327 { 'enum': 'GuestPanicAction',
328   'data': [ 'pause', 'poweroff' ] }
329
330 ##
331 # @GuestPanicInformationType:
332 #
333 # An enumeration of the guest panic information types
334 #
335 # @hyper-v: hyper-v guest panic information type
336 #
337 # @s390: s390 guest panic information type (Since: 2.12)
338 #
339 # Since: 2.9
340 ##
341 { 'enum': 'GuestPanicInformationType',
342   'data': [ 'hyper-v', 's390' ] }
343
344 ##
345 # @GuestPanicInformation:
346 #
347 # Information about a guest panic
348 #
349 # @type: Crash type that defines the hypervisor specific information
350 #
351 # Since: 2.9
352 ##
353 {'union': 'GuestPanicInformation',
354  'base': {'type': 'GuestPanicInformationType'},
355  'discriminator': 'type',
356  'data': { 'hyper-v': 'GuestPanicInformationHyperV',
357            's390': 'GuestPanicInformationS390' } }
358
359 ##
360 # @GuestPanicInformationHyperV:
361 #
362 # Hyper-V specific guest panic information (HV crash MSRs)
363 #
364 # Since: 2.9
365 ##
366 {'struct': 'GuestPanicInformationHyperV',
367  'data': { 'arg1': 'uint64',
368            'arg2': 'uint64',
369            'arg3': 'uint64',
370            'arg4': 'uint64',
371            'arg5': 'uint64' } }
372
373 ##
374 # @S390CrashReason:
375 #
376 # Reason why the CPU is in a crashed state.
377 #
378 # @unknown: no crash reason was set
379 #
380 # @disabled-wait: the CPU has entered a disabled wait state
381 #
382 # @extint-loop: clock comparator or cpu timer interrupt with new PSW enabled
383 #              for external interrupts
384 #
385 # @pgmint-loop: program interrupt with BAD new PSW
386 #
387 # @opint-loop: operation exception interrupt with invalid code at the program
388 #             interrupt new PSW
389 #
390 # Since: 2.12
391 ##
392 { 'enum': 'S390CrashReason',
393   'data': [ 'unknown',
394             'disabled-wait',
395             'extint-loop',
396             'pgmint-loop',
397             'opint-loop' ] }
398
399 ##
400 # @GuestPanicInformationS390:
401 #
402 # S390 specific guest panic information (PSW)
403 #
404 # @core: core id of the CPU that crashed
405 # @psw-mask: control fields of guest PSW
406 # @psw-addr: guest instruction address
407 # @reason: guest crash reason
408 #
409 # Since: 2.12
410 ##
411 {'struct': 'GuestPanicInformationS390',
412  'data': { 'core': 'uint32',
413            'psw-mask': 'uint64',
414            'psw-addr': 'uint64',
415            'reason': 'S390CrashReason' } }
This page took 0.047234 seconds and 4 git commands to generate.