hw/gpio/omap_gpio: Use CamelCase for TYPE_OMAP1_GPIO type name
[qemu.git] / qapi / run-state.json
blob419c188dd1ad21a8d74aedc2c7257400a4c3e202
1 # -*- Mode: Python -*-
2 # vim: filetype=python
5 ##
6 # = VM run state
7 ##
9 ##
10 # @RunState:
12 # An enumeration of VM run states.
14 # @debug: QEMU is running on a debugger
16 # @finish-migrate: guest is paused to finish the migration process
18 # @inmigrate: guest is paused waiting for an incoming migration.  Note
19 #             that this state does not tell whether the machine will start at the
20 #             end of the migration.  This depends on the command-line -S option and
21 #             any invocation of 'stop' or 'cont' that has happened since QEMU was
22 #             started.
24 # @internal-error: An internal error that prevents further guest execution
25 #                  has occurred
27 # @io-error: the last IOP has failed and the device is configured to pause
28 #            on I/O errors
30 # @paused: guest has been paused via the 'stop' command
32 # @postmigrate: guest is paused following a successful 'migrate'
34 # @prelaunch: QEMU was started with -S and guest has not started
36 # @restore-vm: guest is paused to restore VM state
38 # @running: guest is actively running
40 # @save-vm: guest is paused to save the VM state
42 # @shutdown: guest is shut down (and -no-shutdown is in use)
44 # @suspended: guest is suspended (ACPI S3)
46 # @watchdog: the watchdog action is configured to pause and has been triggered
48 # @guest-panicked: guest has been panicked as a result of guest OS panic
50 # @colo: guest is paused to save/restore VM state under colo checkpoint,
51 #        VM can not get into this state unless colo capability is enabled
52 #        for migration. (since 2.8)
54 { 'enum': 'RunState',
55   'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
56             'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
57             'running', 'save-vm', 'shutdown', 'suspended', 'watchdog',
58             'guest-panicked', 'colo' ] }
61 # @ShutdownCause:
63 # An enumeration of reasons for a Shutdown.
65 # @none: No shutdown request pending
67 # @host-error: An error prevents further use of guest
69 # @host-qmp-quit: Reaction to the QMP command 'quit'
71 # @host-qmp-system-reset: Reaction to the QMP command 'system_reset'
73 # @host-signal: Reaction to a signal, such as SIGINT
75 # @host-ui: Reaction to a UI event, like window close
77 # @guest-shutdown: Guest shutdown/suspend request, via ACPI or other
78 #                  hardware-specific means
80 # @guest-reset: Guest reset request, and command line turns that into
81 #               a shutdown
83 # @guest-panic: Guest panicked, and command line turns that into a shutdown
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
89 # @snapshot-load: A snapshot is being loaded by the record & replay
90 #                 subsystem. This value is used only within QEMU.  It
91 #                 doesn't occur in QMP. (since 7.2)
94 { 'enum': 'ShutdownCause',
95   # Beware, shutdown_caused_by_guest() depends on enumeration order
96   'data': [ 'none', 'host-error', 'host-qmp-quit', 'host-qmp-system-reset',
97             'host-signal', 'host-ui', 'guest-shutdown', 'guest-reset',
98             'guest-panic', 'subsystem-reset', 'snapshot-load'] }
101 # @StatusInfo:
103 # Information about VCPU run state
105 # @running: true if all VCPUs are runnable, false if not runnable
107 # @singlestep: true if VCPUs are in single-step mode
109 # @status: the virtual machine @RunState
111 # Since: 0.14
113 # Notes: @singlestep is enabled through the GDB stub
115 { 'struct': 'StatusInfo',
116   'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
119 # @query-status:
121 # Query the run status of all VCPUs
123 # Returns: @StatusInfo reflecting all VCPUs
125 # Since: 0.14
127 # Example:
129 # -> { "execute": "query-status" }
130 # <- { "return": { "running": true,
131 #                  "singlestep": false,
132 #                  "status": "running" } }
135 { 'command': 'query-status', 'returns': 'StatusInfo',
136   'allow-preconfig': true }
139 # @SHUTDOWN:
141 # Emitted when the virtual machine has shut down, indicating that qemu is
142 # about to exit.
144 # @guest: If true, the shutdown was triggered by a guest request (such as
145 #         a guest-initiated ACPI shutdown request or other hardware-specific action)
146 #         rather than a host request (such as sending qemu a SIGINT). (since 2.10)
148 # @reason: The @ShutdownCause which resulted in the SHUTDOWN. (since 4.0)
150 # Note: If the command-line option "-no-shutdown" has been specified, qemu will
151 #       not exit, and a STOP event will eventually follow the SHUTDOWN event
153 # Since: 0.12
155 # Example:
157 # <- { "event": "SHUTDOWN",
158 #      "data": { "guest": true, "reason": "guest-shutdown" },
159 #      "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
162 { 'event': 'SHUTDOWN', 'data': { 'guest': 'bool', 'reason': 'ShutdownCause' } }
165 # @POWERDOWN:
167 # Emitted when the virtual machine is powered down through the power control
168 # system, such as via ACPI.
170 # Since: 0.12
172 # Example:
174 # <- { "event": "POWERDOWN",
175 #      "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
178 { 'event': 'POWERDOWN' }
181 # @RESET:
183 # Emitted when the virtual machine is reset
185 # @guest: If true, the reset was triggered by a guest request (such as
186 #         a guest-initiated ACPI reboot request or other hardware-specific action)
187 #         rather than a host request (such as the QMP command system_reset).
188 #         (since 2.10)
190 # @reason: The @ShutdownCause of the RESET. (since 4.0)
192 # Since: 0.12
194 # Example:
196 # <- { "event": "RESET",
197 #      "data": { "guest": false, "reason": "guest-reset" },
198 #      "timestamp": { "seconds": 1267041653, "microseconds": 9518 } }
201 { 'event': 'RESET', 'data': { 'guest': 'bool', 'reason': 'ShutdownCause' } }
204 # @STOP:
206 # Emitted when the virtual machine is stopped
208 # Since: 0.12
210 # Example:
212 # <- { "event": "STOP",
213 #      "timestamp": { "seconds": 1267041730, "microseconds": 281295 } }
216 { 'event': 'STOP' }
219 # @RESUME:
221 # Emitted when the virtual machine resumes execution
223 # Since: 0.12
225 # Example:
227 # <- { "event": "RESUME",
228 #      "timestamp": { "seconds": 1271770767, "microseconds": 582542 } }
231 { 'event': 'RESUME' }
234 # @SUSPEND:
236 # Emitted when guest enters a hardware suspension state, for example, S3 state,
237 # which is sometimes called standby state
239 # Since: 1.1
241 # Example:
243 # <- { "event": "SUSPEND",
244 #      "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
247 { 'event': 'SUSPEND' }
250 # @SUSPEND_DISK:
252 # Emitted when guest enters a hardware suspension state with data saved on
253 # disk, for example, S4 state, which is sometimes called hibernate state
255 # Note: QEMU shuts down (similar to event @SHUTDOWN) when entering this state
257 # Since: 1.2
259 # Example:
261 # <-   { "event": "SUSPEND_DISK",
262 #        "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
265 { 'event': 'SUSPEND_DISK' }
268 # @WAKEUP:
270 # Emitted when the guest has woken up from suspend state and is running
272 # Since: 1.1
274 # Example:
276 # <- { "event": "WAKEUP",
277 #      "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
280 { 'event': 'WAKEUP' }
283 # @WATCHDOG:
285 # Emitted when the watchdog device's timer is expired
287 # @action: action that has been taken
289 # Note: If action is "reset", "shutdown", or "pause" the WATCHDOG event is
290 #       followed respectively by the RESET, SHUTDOWN, or STOP events
292 # Note: This event is rate-limited.
294 # Since: 0.13
296 # Example:
298 # <- { "event": "WATCHDOG",
299 #      "data": { "action": "reset" },
300 #      "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
303 { 'event': 'WATCHDOG',
304   'data': { 'action': 'WatchdogAction' } }
307 # @WatchdogAction:
309 # An enumeration of the actions taken when the watchdog device's timer is
310 # expired
312 # @reset: system resets
314 # @shutdown: system shutdown, note that it is similar to @powerdown, which
315 #            tries to set to system status and notify guest
317 # @poweroff: system poweroff, the emulator program exits
319 # @pause: system pauses, similar to @stop
321 # @debug: system enters debug state
323 # @none: nothing is done
325 # @inject-nmi: a non-maskable interrupt is injected into the first VCPU (all
326 #              VCPUS on x86) (since 2.4)
328 # Since: 2.1
330 { 'enum': 'WatchdogAction',
331   'data': [ 'reset', 'shutdown', 'poweroff', 'pause', 'debug', 'none',
332             'inject-nmi' ] }
335 # @RebootAction:
337 # Possible QEMU actions upon guest reboot
339 # @reset: Reset the VM
341 # @shutdown: Shutdown the VM and exit, according to the shutdown action
343 # Since: 6.0
345 { 'enum': 'RebootAction',
346   'data': [ 'reset', 'shutdown' ] }
349 # @ShutdownAction:
351 # Possible QEMU actions upon guest shutdown
353 # @poweroff: Shutdown the VM and exit
355 # @pause: pause the VM
357 # Since: 6.0
359 { 'enum': 'ShutdownAction',
360   'data': [ 'poweroff', 'pause' ] }
363 # @PanicAction:
365 # @none: Continue VM execution
367 # @pause: Pause the VM
369 # @shutdown: Shutdown the VM and exit, according to the shutdown action
371 # @exit-failure: Shutdown the VM and exit with nonzero status
372 #                (since 7.1)
374 # Since: 6.0
376 { 'enum': 'PanicAction',
377   'data': [ 'pause', 'shutdown', 'exit-failure', 'none' ] }
380 # @watchdog-set-action:
382 # Set watchdog action
384 # Since: 2.11
386 { 'command': 'watchdog-set-action', 'data' : {'action': 'WatchdogAction'} }
389 # @set-action:
391 # Set the actions that will be taken by the emulator in response to guest
392 # events.
394 # @reboot: @RebootAction action taken on guest reboot.
396 # @shutdown: @ShutdownAction action taken on guest shutdown.
398 # @panic: @PanicAction action taken on guest panic.
400 # @watchdog: @WatchdogAction action taken when watchdog timer expires .
402 # Returns: Nothing on success.
404 # Since: 6.0
406 # Example:
408 # -> { "execute": "set-action",
409 #      "arguments": { "reboot": "shutdown",
410 #                     "shutdown" : "pause",
411 #                     "panic": "pause",
412 #                     "watchdog": "inject-nmi" } }
413 # <- { "return": {} }
415 { 'command': 'set-action',
416   'data': { '*reboot': 'RebootAction',
417             '*shutdown': 'ShutdownAction',
418             '*panic': 'PanicAction',
419             '*watchdog': 'WatchdogAction' },
420   'allow-preconfig': true }
423 # @GUEST_PANICKED:
425 # Emitted when guest OS panic is detected
427 # @action: action that has been taken, currently always "pause"
429 # @info: information about a panic (since 2.9)
431 # Since: 1.5
433 # Example:
435 # <- { "event": "GUEST_PANICKED",
436 #      "data": { "action": "pause" },
437 #      "timestamp": { "seconds": 1648245231, "microseconds": 900001 } }
440 { 'event': 'GUEST_PANICKED',
441   'data': { 'action': 'GuestPanicAction', '*info': 'GuestPanicInformation' } }
444 # @GUEST_CRASHLOADED:
446 # Emitted when guest OS crash loaded is detected
448 # @action: action that has been taken, currently always "run"
450 # @info: information about a panic
452 # Since: 5.0
454 # Example:
456 # <- { "event": "GUEST_CRASHLOADED",
457 #      "data": { "action": "run" },
458 #      "timestamp": { "seconds": 1648245259, "microseconds": 893771 } }
461 { 'event': 'GUEST_CRASHLOADED',
462   'data': { 'action': 'GuestPanicAction', '*info': 'GuestPanicInformation' } }
465 # @GuestPanicAction:
467 # An enumeration of the actions taken when guest OS panic is detected
469 # @pause: system pauses
471 # Since: 2.1 (poweroff since 2.8, run since 5.0)
473 { 'enum': 'GuestPanicAction',
474   'data': [ 'pause', 'poweroff', 'run' ] }
477 # @GuestPanicInformationType:
479 # An enumeration of the guest panic information types
481 # @hyper-v: hyper-v guest panic information type
483 # @s390: s390 guest panic information type (Since: 2.12)
485 # Since: 2.9
487 { 'enum': 'GuestPanicInformationType',
488   'data': [ 'hyper-v', 's390' ] }
491 # @GuestPanicInformation:
493 # Information about a guest panic
495 # @type: Crash type that defines the hypervisor specific information
497 # Since: 2.9
499 {'union': 'GuestPanicInformation',
500  'base': {'type': 'GuestPanicInformationType'},
501  'discriminator': 'type',
502  'data': { 'hyper-v': 'GuestPanicInformationHyperV',
503            's390': 'GuestPanicInformationS390' } }
506 # @GuestPanicInformationHyperV:
508 # Hyper-V specific guest panic information (HV crash MSRs)
510 # Since: 2.9
512 {'struct': 'GuestPanicInformationHyperV',
513  'data': { 'arg1': 'uint64',
514            'arg2': 'uint64',
515            'arg3': 'uint64',
516            'arg4': 'uint64',
517            'arg5': 'uint64' } }
520 # @S390CrashReason:
522 # Reason why the CPU is in a crashed state.
524 # @unknown: no crash reason was set
526 # @disabled-wait: the CPU has entered a disabled wait state
528 # @extint-loop: clock comparator or cpu timer interrupt with new PSW enabled
529 #               for external interrupts
531 # @pgmint-loop: program interrupt with BAD new PSW
533 # @opint-loop: operation exception interrupt with invalid code at the program
534 #              interrupt new PSW
536 # Since: 2.12
538 { 'enum': 'S390CrashReason',
539   'data': [ 'unknown',
540             'disabled-wait',
541             'extint-loop',
542             'pgmint-loop',
543             'opint-loop' ] }
546 # @GuestPanicInformationS390:
548 # S390 specific guest panic information (PSW)
550 # @core: core id of the CPU that crashed
551 # @psw-mask: control fields of guest PSW
552 # @psw-addr: guest instruction address
553 # @reason: guest crash reason
555 # Since: 2.12
557 {'struct': 'GuestPanicInformationS390',
558  'data': { 'core': 'uint32',
559            'psw-mask': 'uint64',
560            'psw-addr': 'uint64',
561            'reason': 'S390CrashReason' } }
564 # @MEMORY_FAILURE:
566 # Emitted when a memory failure occurs on host side.
568 # @recipient: recipient is defined as @MemoryFailureRecipient.
570 # @action: action that has been taken. action is defined as @MemoryFailureAction.
572 # @flags: flags for MemoryFailureAction. action is defined as @MemoryFailureFlags.
574 # Since: 5.2
576 # Example:
578 # <- { "event": "MEMORY_FAILURE",
579 #      "data": { "recipient": "hypervisor",
580 #                "action": "fatal",
581 #                "flags": { "action-required": false,
582 #                           "recursive": false } },
583 #      "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
586 { 'event': 'MEMORY_FAILURE',
587   'data': { 'recipient': 'MemoryFailureRecipient',
588             'action': 'MemoryFailureAction',
589             'flags': 'MemoryFailureFlags'} }
592 # @MemoryFailureRecipient:
594 # Hardware memory failure occurs, handled by recipient.
596 # @hypervisor: memory failure at QEMU process address space.
597 #              (none guest memory, but used by QEMU itself).
599 # @guest: memory failure at guest memory,
601 # Since: 5.2
603 { 'enum': 'MemoryFailureRecipient',
604   'data': [ 'hypervisor',
605             'guest' ] }
608 # @MemoryFailureAction:
610 # Actions taken by QEMU in response to a hardware memory failure.
612 # @ignore: the memory failure could be ignored.  This will only be the case
613 #          for action-optional failures.
615 # @inject: memory failure occurred in guest memory, the guest enabled MCE
616 #          handling mechanism, and QEMU could inject the MCE into the guest
617 #          successfully.
619 # @fatal: the failure is unrecoverable.  This occurs for action-required
620 #         failures if the recipient is the hypervisor; QEMU will exit.
622 # @reset: the failure is unrecoverable but confined to the guest.  This
623 #         occurs if the recipient is a guest guest which is not ready
624 #         to handle memory failures.
626 # Since: 5.2
628 { 'enum': 'MemoryFailureAction',
629   'data': [ 'ignore',
630             'inject',
631             'fatal',
632             'reset' ] }
635 # @MemoryFailureFlags:
637 # Additional information on memory failures.
639 # @action-required: whether a memory failure event is action-required
640 #                   or action-optional (e.g. a failure during memory scrub).
642 # @recursive: whether the failure occurred while the previous
643 #             failure was still in progress.
645 # Since: 5.2
647 { 'struct': 'MemoryFailureFlags',
648   'data': { 'action-required': 'bool',
649             'recursive': 'bool'} }
652 # @NotifyVmexitOption:
654 # An enumeration of the options specified when enabling notify VM exit
656 # @run: enable the feature, do nothing and continue if the notify VM exit happens.
658 # @internal-error: enable the feature, raise a internal error if the notify
659 #                  VM exit happens.
661 # @disable: disable the feature.
663 # Since: 7.2
665 { 'enum': 'NotifyVmexitOption',
666   'data': [ 'run', 'internal-error', 'disable' ] }