sm501: Drop unneded variable
[qemu/ar7.git] / qapi / run-state.json
blob2e2290774007dfc78a1adeec806107dafbd54b4c
1 # -*- Mode: Python -*-
4 ##
5 # = VM run state
6 ##
8 ##
9 # @RunState:
11 # An enumeration of VM run states.
13 # @debug: QEMU is running on a debugger
15 # @finish-migrate: guest is paused to finish the migration process
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.
23 # @internal-error: An internal error that prevents further guest execution
24 #                  has occurred
26 # @io-error: the last IOP has failed and the device is configured to pause
27 #            on I/O errors
29 # @paused: guest has been paused via the 'stop' command
31 # @postmigrate: guest is paused following a successful 'migrate'
33 # @prelaunch: QEMU was started with -S and guest has not started
35 # @restore-vm: guest is paused to restore VM state
37 # @running: guest is actively running
39 # @save-vm: guest is paused to save the VM state
41 # @shutdown: guest is shut down (and -no-shutdown is in use)
43 # @suspended: guest is suspended (ACPI S3)
45 # @watchdog: the watchdog action is configured to pause and has been triggered
47 # @guest-panicked: guest has been panicked as a result of guest OS panic
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)
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' ] }
63 # @ShutdownCause:
65 # An enumeration of reasons for a Shutdown.
67 # @none: No shutdown request pending
69 # @host-error: An error prevents further use of guest
71 # @host-qmp-quit: Reaction to the QMP command 'quit'
73 # @host-qmp-system-reset: Reaction to the QMP command 'system_reset'
75 # @host-signal: Reaction to a signal, such as SIGINT
77 # @host-ui: Reaction to a UI event, like window close
79 # @guest-shutdown: Guest shutdown/suspend request, via ACPI or other
80 #                  hardware-specific means
82 # @guest-reset: Guest reset request, and command line turns that into
83 #               a shutdown
85 # @guest-panic: Guest panicked, and command line turns that into a shutdown
87 # @subsystem-reset: Partial guest reset that does not trigger QMP events and
88 #                   ignores --no-reboot. This is useful for sanitizing
89 #                   hypercalls on s390 that are used during kexec/kdump/boot
92 { 'enum': 'ShutdownCause',
93   # Beware, shutdown_caused_by_guest() depends on enumeration order
94   'data': [ 'none', 'host-error', 'host-qmp-quit', 'host-qmp-system-reset',
95             'host-signal', 'host-ui', 'guest-shutdown', 'guest-reset',
96             'guest-panic', 'subsystem-reset'] }
99 # @StatusInfo:
101 # Information about VCPU run state
103 # @running: true if all VCPUs are runnable, false if not runnable
105 # @singlestep: true if VCPUs are in single-step mode
107 # @status: the virtual machine @RunState
109 # Since:  0.14.0
111 # Notes: @singlestep is enabled through the GDB stub
113 { 'struct': 'StatusInfo',
114   'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
117 # @query-status:
119 # Query the run status of all VCPUs
121 # Returns: @StatusInfo reflecting all VCPUs
123 # Since:  0.14.0
125 # Example:
127 # -> { "execute": "query-status" }
128 # <- { "return": { "running": true,
129 #                  "singlestep": false,
130 #                  "status": "running" } }
133 { 'command': 'query-status', 'returns': 'StatusInfo',
134   'allow-preconfig': true }
137 # @SHUTDOWN:
139 # Emitted when the virtual machine has shut down, indicating that qemu is
140 # about to exit.
142 # @guest: If true, the shutdown was triggered by a guest request (such as
143 #         a guest-initiated ACPI shutdown request or other hardware-specific action)
144 #         rather than a host request (such as sending qemu a SIGINT). (since 2.10)
146 # @reason: The @ShutdownCause which resulted in the SHUTDOWN. (since 4.0)
148 # Note: If the command-line option "-no-shutdown" has been specified, qemu will
149 #       not exit, and a STOP event will eventually follow the SHUTDOWN event
151 # Since: 0.12.0
153 # Example:
155 # <- { "event": "SHUTDOWN", "data": { "guest": true },
156 #      "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
159 { 'event': 'SHUTDOWN', 'data': { 'guest': 'bool', 'reason': 'ShutdownCause' } }
162 # @POWERDOWN:
164 # Emitted when the virtual machine is powered down through the power control
165 # system, such as via ACPI.
167 # Since: 0.12.0
169 # Example:
171 # <- { "event": "POWERDOWN",
172 #      "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
175 { 'event': 'POWERDOWN' }
178 # @RESET:
180 # Emitted when the virtual machine is reset
182 # @guest: If true, the reset was triggered by a guest request (such as
183 #         a guest-initiated ACPI reboot request or other hardware-specific action)
184 #         rather than a host request (such as the QMP command system_reset).
185 #         (since 2.10)
187 # @reason: The @ShutdownCause of the RESET. (since 4.0)
189 # Since: 0.12.0
191 # Example:
193 # <- { "event": "RESET", "data": { "guest": false },
194 #      "timestamp": { "seconds": 1267041653, "microseconds": 9518 } }
197 { 'event': 'RESET', 'data': { 'guest': 'bool', 'reason': 'ShutdownCause' } }
200 # @STOP:
202 # Emitted when the virtual machine is stopped
204 # Since: 0.12.0
206 # Example:
208 # <- { "event": "STOP",
209 #      "timestamp": { "seconds": 1267041730, "microseconds": 281295 } }
212 { 'event': 'STOP' }
215 # @RESUME:
217 # Emitted when the virtual machine resumes execution
219 # Since: 0.12.0
221 # Example:
223 # <- { "event": "RESUME",
224 #      "timestamp": { "seconds": 1271770767, "microseconds": 582542 } }
227 { 'event': 'RESUME' }
230 # @SUSPEND:
232 # Emitted when guest enters a hardware suspension state, for example, S3 state,
233 # which is sometimes called standby state
235 # Since: 1.1
237 # Example:
239 # <- { "event": "SUSPEND",
240 #      "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
243 { 'event': 'SUSPEND' }
246 # @SUSPEND_DISK:
248 # Emitted when guest enters a hardware suspension state with data saved on
249 # disk, for example, S4 state, which is sometimes called hibernate state
251 # Note: QEMU shuts down (similar to event @SHUTDOWN) when entering this state
253 # Since: 1.2
255 # Example:
257 # <-   { "event": "SUSPEND_DISK",
258 #        "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
261 { 'event': 'SUSPEND_DISK' }
264 # @WAKEUP:
266 # Emitted when the guest has woken up from suspend state and is running
268 # Since: 1.1
270 # Example:
272 # <- { "event": "WAKEUP",
273 #      "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
276 { 'event': 'WAKEUP' }
279 # @WATCHDOG:
281 # Emitted when the watchdog device's timer is expired
283 # @action: action that has been taken
285 # Note: If action is "reset", "shutdown", or "pause" the WATCHDOG event is
286 #       followed respectively by the RESET, SHUTDOWN, or STOP events
288 # Note: This event is rate-limited.
290 # Since: 0.13.0
292 # Example:
294 # <- { "event": "WATCHDOG",
295 #      "data": { "action": "reset" },
296 #      "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
299 { 'event': 'WATCHDOG',
300   'data': { 'action': 'WatchdogAction' } }
303 # @WatchdogAction:
305 # An enumeration of the actions taken when the watchdog device's timer is
306 # expired
308 # @reset: system resets
310 # @shutdown: system shutdown, note that it is similar to @powerdown, which
311 #            tries to set to system status and notify guest
313 # @poweroff: system poweroff, the emulator program exits
315 # @pause: system pauses, similar to @stop
317 # @debug: system enters debug state
319 # @none: nothing is done
321 # @inject-nmi: a non-maskable interrupt is injected into the first VCPU (all
322 #              VCPUS on x86) (since 2.4)
324 # Since: 2.1
326 { 'enum': 'WatchdogAction',
327   'data': [ 'reset', 'shutdown', 'poweroff', 'pause', 'debug', 'none',
328             'inject-nmi' ] }
331 # @watchdog-set-action:
333 # Set watchdog action
335 # Since: 2.11
337 { 'command': 'watchdog-set-action', 'data' : {'action': 'WatchdogAction'} }
340 # @GUEST_PANICKED:
342 # Emitted when guest OS panic is detected
344 # @action: action that has been taken, currently always "pause"
346 # @info: information about a panic (since 2.9)
348 # Since: 1.5
350 # Example:
352 # <- { "event": "GUEST_PANICKED",
353 #      "data": { "action": "pause" } }
356 { 'event': 'GUEST_PANICKED',
357   'data': { 'action': 'GuestPanicAction', '*info': 'GuestPanicInformation' } }
360 # @GUEST_CRASHLOADED:
362 # Emitted when guest OS crash loaded is detected
364 # @action: action that has been taken, currently always "run"
366 # @info: information about a panic
368 # Since: 5.0
370 # Example:
372 # <- { "event": "GUEST_CRASHLOADED",
373 #      "data": { "action": "run" } }
376 { 'event': 'GUEST_CRASHLOADED',
377   'data': { 'action': 'GuestPanicAction', '*info': 'GuestPanicInformation' } }
380 # @GuestPanicAction:
382 # An enumeration of the actions taken when guest OS panic is detected
384 # @pause: system pauses
386 # Since: 2.1 (poweroff since 2.8, run since 5.0)
388 { 'enum': 'GuestPanicAction',
389   'data': [ 'pause', 'poweroff', 'run' ] }
392 # @GuestPanicInformationType:
394 # An enumeration of the guest panic information types
396 # @hyper-v: hyper-v guest panic information type
398 # @s390: s390 guest panic information type (Since: 2.12)
400 # Since: 2.9
402 { 'enum': 'GuestPanicInformationType',
403   'data': [ 'hyper-v', 's390' ] }
406 # @GuestPanicInformation:
408 # Information about a guest panic
410 # @type: Crash type that defines the hypervisor specific information
412 # Since: 2.9
414 {'union': 'GuestPanicInformation',
415  'base': {'type': 'GuestPanicInformationType'},
416  'discriminator': 'type',
417  'data': { 'hyper-v': 'GuestPanicInformationHyperV',
418            's390': 'GuestPanicInformationS390' } }
421 # @GuestPanicInformationHyperV:
423 # Hyper-V specific guest panic information (HV crash MSRs)
425 # Since: 2.9
427 {'struct': 'GuestPanicInformationHyperV',
428  'data': { 'arg1': 'uint64',
429            'arg2': 'uint64',
430            'arg3': 'uint64',
431            'arg4': 'uint64',
432            'arg5': 'uint64' } }
435 # @S390CrashReason:
437 # Reason why the CPU is in a crashed state.
439 # @unknown: no crash reason was set
441 # @disabled-wait: the CPU has entered a disabled wait state
443 # @extint-loop: clock comparator or cpu timer interrupt with new PSW enabled
444 #               for external interrupts
446 # @pgmint-loop: program interrupt with BAD new PSW
448 # @opint-loop: operation exception interrupt with invalid code at the program
449 #              interrupt new PSW
451 # Since: 2.12
453 { 'enum': 'S390CrashReason',
454   'data': [ 'unknown',
455             'disabled-wait',
456             'extint-loop',
457             'pgmint-loop',
458             'opint-loop' ] }
461 # @GuestPanicInformationS390:
463 # S390 specific guest panic information (PSW)
465 # @core: core id of the CPU that crashed
466 # @psw-mask: control fields of guest PSW
467 # @psw-addr: guest instruction address
468 # @reason: guest crash reason
470 # Since: 2.12
472 {'struct': 'GuestPanicInformationS390',
473  'data': { 'core': 'uint32',
474            'psw-mask': 'uint64',
475            'psw-addr': 'uint64',
476            'reason': 'S390CrashReason' } }