]> Git Repo - qemu.git/blob - qapi/run-state.json
qapi: Turn ShutdownCause into QAPI enum
[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 # @ShutdownCause:
64 #
65 # An enumeration of reasons for a Shutdown.
66 #
67 # @none: No shutdown request pending
68 #
69 # @host-error: An error prevents further use of guest
70 #
71 # @host-qmp: Reaction to a QMP command, like 'quit'
72 #
73 # @host-signal: Reaction to a signal, such as SIGINT
74 #
75 # @host-ui: Reaction to a UI event, like window close
76 #
77 # @guest-shutdown: Guest shutdown/suspend request, via ACPI or other
78 #                  hardware-specific means
79 #
80 # @guest-reset: Guest reset request, and command line turns that into
81 #               a shutdown
82 #
83 # @guest-panic: Guest panicked, and command line turns that into a shutdown
84 #
85 # @subsystem-reset: Partial guest reset that does not trigger QMP events and
86 #                  ignores --no-reboot. This is useful for sanitizing
87 #                  hypercalls on s390 that are used during kexec/kdump/boot
88 #
89 ##
90 { 'enum': 'ShutdownCause',
91   # Beware, shutdown_caused_by_guest() depends on enumeration order
92   'data': [ 'none', 'host-error', 'host-qmp', 'host-signal', 'host-ui',
93             'guest-shutdown', 'guest-reset', 'guest-panic',
94             'subsystem-reset'] }
95
96 ##
97 # @StatusInfo:
98 #
99 # Information about VCPU run state
100 #
101 # @running: true if all VCPUs are runnable, false if not runnable
102 #
103 # @singlestep: true if VCPUs are in single-step mode
104 #
105 # @status: the virtual machine @RunState
106 #
107 # Since:  0.14.0
108 #
109 # Notes: @singlestep is enabled through the GDB stub
110 ##
111 { 'struct': 'StatusInfo',
112   'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
113
114 ##
115 # @query-status:
116 #
117 # Query the run status of all VCPUs
118 #
119 # Returns: @StatusInfo reflecting all VCPUs
120 #
121 # Since:  0.14.0
122 #
123 # Example:
124 #
125 # -> { "execute": "query-status" }
126 # <- { "return": { "running": true,
127 #                  "singlestep": false,
128 #                  "status": "running" } }
129 #
130 ##
131 { 'command': 'query-status', 'returns': 'StatusInfo',
132   'allow-preconfig': true }
133
134 ##
135 # @SHUTDOWN:
136 #
137 # Emitted when the virtual machine has shut down, indicating that qemu is
138 # about to exit.
139 #
140 # @guest: If true, the shutdown was triggered by a guest request (such as
141 # a guest-initiated ACPI shutdown request or other hardware-specific action)
142 # rather than a host request (such as sending qemu a SIGINT). (since 2.10)
143 #
144 # Note: If the command-line option "-no-shutdown" has been specified, qemu will
145 # not exit, and a STOP event will eventually follow the SHUTDOWN event
146 #
147 # Since: 0.12.0
148 #
149 # Example:
150 #
151 # <- { "event": "SHUTDOWN", "data": { "guest": true },
152 #      "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
153 #
154 ##
155 { 'event': 'SHUTDOWN', 'data': { 'guest': 'bool' } }
156
157 ##
158 # @POWERDOWN:
159 #
160 # Emitted when the virtual machine is powered down through the power control
161 # system, such as via ACPI.
162 #
163 # Since: 0.12.0
164 #
165 # Example:
166 #
167 # <- { "event": "POWERDOWN",
168 #      "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
169 #
170 ##
171 { 'event': 'POWERDOWN' }
172
173 ##
174 # @RESET:
175 #
176 # Emitted when the virtual machine is reset
177 #
178 # @guest: If true, the reset was triggered by a guest request (such as
179 # a guest-initiated ACPI reboot request or other hardware-specific action)
180 # rather than a host request (such as the QMP command system_reset).
181 # (since 2.10)
182 #
183 # Since: 0.12.0
184 #
185 # Example:
186 #
187 # <- { "event": "RESET", "data": { "guest": false },
188 #      "timestamp": { "seconds": 1267041653, "microseconds": 9518 } }
189 #
190 ##
191 { 'event': 'RESET', 'data': { 'guest': 'bool' } }
192
193 ##
194 # @STOP:
195 #
196 # Emitted when the virtual machine is stopped
197 #
198 # Since: 0.12.0
199 #
200 # Example:
201 #
202 # <- { "event": "STOP",
203 #      "timestamp": { "seconds": 1267041730, "microseconds": 281295 } }
204 #
205 ##
206 { 'event': 'STOP' }
207
208 ##
209 # @RESUME:
210 #
211 # Emitted when the virtual machine resumes execution
212 #
213 # Since: 0.12.0
214 #
215 # Example:
216 #
217 # <- { "event": "RESUME",
218 #      "timestamp": { "seconds": 1271770767, "microseconds": 582542 } }
219 #
220 ##
221 { 'event': 'RESUME' }
222
223 ##
224 # @SUSPEND:
225 #
226 # Emitted when guest enters a hardware suspension state, for example, S3 state,
227 # which is sometimes called standby state
228 #
229 # Since: 1.1
230 #
231 # Example:
232 #
233 # <- { "event": "SUSPEND",
234 #      "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
235 #
236 ##
237 { 'event': 'SUSPEND' }
238
239 ##
240 # @SUSPEND_DISK:
241 #
242 # Emitted when guest enters a hardware suspension state with data saved on
243 # disk, for example, S4 state, which is sometimes called hibernate state
244 #
245 # Note: QEMU shuts down (similar to event @SHUTDOWN) when entering this state
246 #
247 # Since: 1.2
248 #
249 # Example:
250 #
251 # <-   { "event": "SUSPEND_DISK",
252 #        "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
253 #
254 ##
255 { 'event': 'SUSPEND_DISK' }
256
257 ##
258 # @WAKEUP:
259 #
260 # Emitted when the guest has woken up from suspend state and is running
261 #
262 # Since: 1.1
263 #
264 # Example:
265 #
266 # <- { "event": "WAKEUP",
267 #      "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
268 #
269 ##
270 { 'event': 'WAKEUP' }
271
272 ##
273 # @WATCHDOG:
274 #
275 # Emitted when the watchdog device's timer is expired
276 #
277 # @action: action that has been taken
278 #
279 # Note: If action is "reset", "shutdown", or "pause" the WATCHDOG event is
280 # followed respectively by the RESET, SHUTDOWN, or STOP events
281 #
282 # Note: This event is rate-limited.
283 #
284 # Since: 0.13.0
285 #
286 # Example:
287 #
288 # <- { "event": "WATCHDOG",
289 #      "data": { "action": "reset" },
290 #      "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
291 #
292 ##
293 { 'event': 'WATCHDOG',
294   'data': { 'action': 'WatchdogAction' } }
295
296 ##
297 # @WatchdogAction:
298 #
299 # An enumeration of the actions taken when the watchdog device's timer is
300 # expired
301 #
302 # @reset: system resets
303 #
304 # @shutdown: system shutdown, note that it is similar to @powerdown, which
305 #            tries to set to system status and notify guest
306 #
307 # @poweroff: system poweroff, the emulator program exits
308 #
309 # @pause: system pauses, similar to @stop
310 #
311 # @debug: system enters debug state
312 #
313 # @none: nothing is done
314 #
315 # @inject-nmi: a non-maskable interrupt is injected into the first VCPU (all
316 #              VCPUS on x86) (since 2.4)
317 #
318 # Since: 2.1
319 ##
320 { 'enum': 'WatchdogAction',
321   'data': [ 'reset', 'shutdown', 'poweroff', 'pause', 'debug', 'none',
322             'inject-nmi' ] }
323
324 ##
325 # @watchdog-set-action:
326 #
327 # Set watchdog action
328 #
329 # Since: 2.11
330 ##
331 { 'command': 'watchdog-set-action', 'data' : {'action': 'WatchdogAction'} }
332
333 ##
334 # @GUEST_PANICKED:
335 #
336 # Emitted when guest OS panic is detected
337 #
338 # @action: action that has been taken, currently always "pause"
339 #
340 # @info: information about a panic (since 2.9)
341 #
342 # Since: 1.5
343 #
344 # Example:
345 #
346 # <- { "event": "GUEST_PANICKED",
347 #      "data": { "action": "pause" } }
348 #
349 ##
350 { 'event': 'GUEST_PANICKED',
351   'data': { 'action': 'GuestPanicAction', '*info': 'GuestPanicInformation' } }
352
353 ##
354 # @GuestPanicAction:
355 #
356 # An enumeration of the actions taken when guest OS panic is detected
357 #
358 # @pause: system pauses
359 #
360 # Since: 2.1 (poweroff since 2.8)
361 ##
362 { 'enum': 'GuestPanicAction',
363   'data': [ 'pause', 'poweroff' ] }
364
365 ##
366 # @GuestPanicInformationType:
367 #
368 # An enumeration of the guest panic information types
369 #
370 # @hyper-v: hyper-v guest panic information type
371 #
372 # @s390: s390 guest panic information type (Since: 2.12)
373 #
374 # Since: 2.9
375 ##
376 { 'enum': 'GuestPanicInformationType',
377   'data': [ 'hyper-v', 's390' ] }
378
379 ##
380 # @GuestPanicInformation:
381 #
382 # Information about a guest panic
383 #
384 # @type: Crash type that defines the hypervisor specific information
385 #
386 # Since: 2.9
387 ##
388 {'union': 'GuestPanicInformation',
389  'base': {'type': 'GuestPanicInformationType'},
390  'discriminator': 'type',
391  'data': { 'hyper-v': 'GuestPanicInformationHyperV',
392            's390': 'GuestPanicInformationS390' } }
393
394 ##
395 # @GuestPanicInformationHyperV:
396 #
397 # Hyper-V specific guest panic information (HV crash MSRs)
398 #
399 # Since: 2.9
400 ##
401 {'struct': 'GuestPanicInformationHyperV',
402  'data': { 'arg1': 'uint64',
403            'arg2': 'uint64',
404            'arg3': 'uint64',
405            'arg4': 'uint64',
406            'arg5': 'uint64' } }
407
408 ##
409 # @S390CrashReason:
410 #
411 # Reason why the CPU is in a crashed state.
412 #
413 # @unknown: no crash reason was set
414 #
415 # @disabled-wait: the CPU has entered a disabled wait state
416 #
417 # @extint-loop: clock comparator or cpu timer interrupt with new PSW enabled
418 #              for external interrupts
419 #
420 # @pgmint-loop: program interrupt with BAD new PSW
421 #
422 # @opint-loop: operation exception interrupt with invalid code at the program
423 #             interrupt new PSW
424 #
425 # Since: 2.12
426 ##
427 { 'enum': 'S390CrashReason',
428   'data': [ 'unknown',
429             'disabled-wait',
430             'extint-loop',
431             'pgmint-loop',
432             'opint-loop' ] }
433
434 ##
435 # @GuestPanicInformationS390:
436 #
437 # S390 specific guest panic information (PSW)
438 #
439 # @core: core id of the CPU that crashed
440 # @psw-mask: control fields of guest PSW
441 # @psw-addr: guest instruction address
442 # @reason: guest crash reason
443 #
444 # Since: 2.12
445 ##
446 {'struct': 'GuestPanicInformationS390',
447  'data': { 'core': 'uint32',
448            'psw-mask': 'uint64',
449            'psw-addr': 'uint64',
450            'reason': 'S390CrashReason' } }
This page took 0.046718 seconds and 4 git commands to generate.