ppc4xx_sdram: Convert DDR SDRAM controller to new bank handling
[qemu/kevin.git] / qapi / run-state.json
blob49989d30e6b2bf212efe67d61d36b6f6b77600a1
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
90 { 'enum': 'ShutdownCause',
91   # Beware, shutdown_caused_by_guest() depends on enumeration order
92   'data': [ 'none', 'host-error', 'host-qmp-quit', 'host-qmp-system-reset',
93             'host-signal', 'host-ui', 'guest-shutdown', 'guest-reset',
94             'guest-panic', 'subsystem-reset'] }
97 # @StatusInfo:
99 # Information about VCPU run state
101 # @running: true if all VCPUs are runnable, false if not runnable
103 # @singlestep: true if VCPUs are in single-step mode
105 # @status: the virtual machine @RunState
107 # Since: 0.14
109 # Notes: @singlestep is enabled through the GDB stub
111 { 'struct': 'StatusInfo',
112   'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
115 # @query-status:
117 # Query the run status of all VCPUs
119 # Returns: @StatusInfo reflecting all VCPUs
121 # Since: 0.14
123 # Example:
125 # -> { "execute": "query-status" }
126 # <- { "return": { "running": true,
127 #                  "singlestep": false,
128 #                  "status": "running" } }
131 { 'command': 'query-status', 'returns': 'StatusInfo',
132   'allow-preconfig': true }
135 # @SHUTDOWN:
137 # Emitted when the virtual machine has shut down, indicating that qemu is
138 # about to exit.
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)
144 # @reason: The @ShutdownCause which resulted in the SHUTDOWN. (since 4.0)
146 # Note: If the command-line option "-no-shutdown" has been specified, qemu will
147 #       not exit, and a STOP event will eventually follow the SHUTDOWN event
149 # Since: 0.12
151 # Example:
153 # <- { "event": "SHUTDOWN",
154 #      "data": { "guest": true, "reason": "guest-shutdown" },
155 #      "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
158 { 'event': 'SHUTDOWN', 'data': { 'guest': 'bool', 'reason': 'ShutdownCause' } }
161 # @POWERDOWN:
163 # Emitted when the virtual machine is powered down through the power control
164 # system, such as via ACPI.
166 # Since: 0.12
168 # Example:
170 # <- { "event": "POWERDOWN",
171 #      "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
174 { 'event': 'POWERDOWN' }
177 # @RESET:
179 # Emitted when the virtual machine is reset
181 # @guest: If true, the reset was triggered by a guest request (such as
182 #         a guest-initiated ACPI reboot request or other hardware-specific action)
183 #         rather than a host request (such as the QMP command system_reset).
184 #         (since 2.10)
186 # @reason: The @ShutdownCause of the RESET. (since 4.0)
188 # Since: 0.12
190 # Example:
192 # <- { "event": "RESET",
193 #      "data": { "guest": false, "reason": "guest-reset" },
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
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
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
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 # @RebootAction:
333 # Possible QEMU actions upon guest reboot
335 # @reset: Reset the VM
337 # @shutdown: Shutdown the VM and exit, according to the shutdown action
339 # Since: 6.0
341 { 'enum': 'RebootAction',
342   'data': [ 'reset', 'shutdown' ] }
345 # @ShutdownAction:
347 # Possible QEMU actions upon guest shutdown
349 # @poweroff: Shutdown the VM and exit
351 # @pause: pause the VM
353 # Since: 6.0
355 { 'enum': 'ShutdownAction',
356   'data': [ 'poweroff', 'pause' ] }
359 # @PanicAction:
361 # @none: Continue VM execution
363 # @pause: Pause the VM
365 # @shutdown: Shutdown the VM and exit, according to the shutdown action
367 # @exit-failure: Shutdown the VM and exit with nonzero status
368 #                (since 7.1)
370 # Since: 6.0
372 { 'enum': 'PanicAction',
373   'data': [ 'pause', 'shutdown', 'exit-failure', 'none' ] }
376 # @watchdog-set-action:
378 # Set watchdog action
380 # Since: 2.11
382 { 'command': 'watchdog-set-action', 'data' : {'action': 'WatchdogAction'} }
385 # @set-action:
387 # Set the actions that will be taken by the emulator in response to guest
388 # events.
390 # @reboot: @RebootAction action taken on guest reboot.
392 # @shutdown: @ShutdownAction action taken on guest shutdown.
394 # @panic: @PanicAction action taken on guest panic.
396 # @watchdog: @WatchdogAction action taken when watchdog timer expires .
398 # Returns: Nothing on success.
400 # Since: 6.0
402 # Example:
404 # -> { "execute": "set-action",
405 #      "arguments": { "reboot": "shutdown",
406 #                     "shutdown" : "pause",
407 #                     "panic": "pause",
408 #                     "watchdog": "inject-nmi" } }
409 # <- { "return": {} }
411 { 'command': 'set-action',
412   'data': { '*reboot': 'RebootAction',
413             '*shutdown': 'ShutdownAction',
414             '*panic': 'PanicAction',
415             '*watchdog': 'WatchdogAction' },
416   'allow-preconfig': true }
419 # @GUEST_PANICKED:
421 # Emitted when guest OS panic is detected
423 # @action: action that has been taken, currently always "pause"
425 # @info: information about a panic (since 2.9)
427 # Since: 1.5
429 # Example:
431 # <- { "event": "GUEST_PANICKED",
432 #      "data": { "action": "pause" },
433 #      "timestamp": { "seconds": 1648245231, "microseconds": 900001 } }
436 { 'event': 'GUEST_PANICKED',
437   'data': { 'action': 'GuestPanicAction', '*info': 'GuestPanicInformation' } }
440 # @GUEST_CRASHLOADED:
442 # Emitted when guest OS crash loaded is detected
444 # @action: action that has been taken, currently always "run"
446 # @info: information about a panic
448 # Since: 5.0
450 # Example:
452 # <- { "event": "GUEST_CRASHLOADED",
453 #      "data": { "action": "run" },
454 #      "timestamp": { "seconds": 1648245259, "microseconds": 893771 } }
457 { 'event': 'GUEST_CRASHLOADED',
458   'data': { 'action': 'GuestPanicAction', '*info': 'GuestPanicInformation' } }
461 # @GuestPanicAction:
463 # An enumeration of the actions taken when guest OS panic is detected
465 # @pause: system pauses
467 # Since: 2.1 (poweroff since 2.8, run since 5.0)
469 { 'enum': 'GuestPanicAction',
470   'data': [ 'pause', 'poweroff', 'run' ] }
473 # @GuestPanicInformationType:
475 # An enumeration of the guest panic information types
477 # @hyper-v: hyper-v guest panic information type
479 # @s390: s390 guest panic information type (Since: 2.12)
481 # Since: 2.9
483 { 'enum': 'GuestPanicInformationType',
484   'data': [ 'hyper-v', 's390' ] }
487 # @GuestPanicInformation:
489 # Information about a guest panic
491 # @type: Crash type that defines the hypervisor specific information
493 # Since: 2.9
495 {'union': 'GuestPanicInformation',
496  'base': {'type': 'GuestPanicInformationType'},
497  'discriminator': 'type',
498  'data': { 'hyper-v': 'GuestPanicInformationHyperV',
499            's390': 'GuestPanicInformationS390' } }
502 # @GuestPanicInformationHyperV:
504 # Hyper-V specific guest panic information (HV crash MSRs)
506 # Since: 2.9
508 {'struct': 'GuestPanicInformationHyperV',
509  'data': { 'arg1': 'uint64',
510            'arg2': 'uint64',
511            'arg3': 'uint64',
512            'arg4': 'uint64',
513            'arg5': 'uint64' } }
516 # @S390CrashReason:
518 # Reason why the CPU is in a crashed state.
520 # @unknown: no crash reason was set
522 # @disabled-wait: the CPU has entered a disabled wait state
524 # @extint-loop: clock comparator or cpu timer interrupt with new PSW enabled
525 #               for external interrupts
527 # @pgmint-loop: program interrupt with BAD new PSW
529 # @opint-loop: operation exception interrupt with invalid code at the program
530 #              interrupt new PSW
532 # Since: 2.12
534 { 'enum': 'S390CrashReason',
535   'data': [ 'unknown',
536             'disabled-wait',
537             'extint-loop',
538             'pgmint-loop',
539             'opint-loop' ] }
542 # @GuestPanicInformationS390:
544 # S390 specific guest panic information (PSW)
546 # @core: core id of the CPU that crashed
547 # @psw-mask: control fields of guest PSW
548 # @psw-addr: guest instruction address
549 # @reason: guest crash reason
551 # Since: 2.12
553 {'struct': 'GuestPanicInformationS390',
554  'data': { 'core': 'uint32',
555            'psw-mask': 'uint64',
556            'psw-addr': 'uint64',
557            'reason': 'S390CrashReason' } }
560 # @MEMORY_FAILURE:
562 # Emitted when a memory failure occurs on host side.
564 # @recipient: recipient is defined as @MemoryFailureRecipient.
566 # @action: action that has been taken. action is defined as @MemoryFailureAction.
568 # @flags: flags for MemoryFailureAction. action is defined as @MemoryFailureFlags.
570 # Since: 5.2
572 # Example:
574 # <- { "event": "MEMORY_FAILURE",
575 #      "data": { "recipient": "hypervisor",
576 #                "action": "fatal",
577 #                "flags": { "action-required": false,
578 #                           "recursive": false } },
579 #      "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
582 { 'event': 'MEMORY_FAILURE',
583   'data': { 'recipient': 'MemoryFailureRecipient',
584             'action': 'MemoryFailureAction',
585             'flags': 'MemoryFailureFlags'} }
588 # @MemoryFailureRecipient:
590 # Hardware memory failure occurs, handled by recipient.
592 # @hypervisor: memory failure at QEMU process address space.
593 #              (none guest memory, but used by QEMU itself).
595 # @guest: memory failure at guest memory,
597 # Since: 5.2
599 { 'enum': 'MemoryFailureRecipient',
600   'data': [ 'hypervisor',
601             'guest' ] }
604 # @MemoryFailureAction:
606 # Actions taken by QEMU in response to a hardware memory failure.
608 # @ignore: the memory failure could be ignored.  This will only be the case
609 #          for action-optional failures.
611 # @inject: memory failure occurred in guest memory, the guest enabled MCE
612 #          handling mechanism, and QEMU could inject the MCE into the guest
613 #          successfully.
615 # @fatal: the failure is unrecoverable.  This occurs for action-required
616 #         failures if the recipient is the hypervisor; QEMU will exit.
618 # @reset: the failure is unrecoverable but confined to the guest.  This
619 #         occurs if the recipient is a guest guest which is not ready
620 #         to handle memory failures.
622 # Since: 5.2
624 { 'enum': 'MemoryFailureAction',
625   'data': [ 'ignore',
626             'inject',
627             'fatal',
628             'reset' ] }
631 # @MemoryFailureFlags:
633 # Additional information on memory failures.
635 # @action-required: whether a memory failure event is action-required
636 #                   or action-optional (e.g. a failure during memory scrub).
638 # @recursive: whether the failure occurred while the previous
639 #             failure was still in progress.
641 # Since: 5.2
643 { 'struct': 'MemoryFailureFlags',
644   'data': { 'action-required': 'bool',
645             'recursive': 'bool'} }
648 # @NotifyVmexitOption:
650 # An enumeration of the options specified when enabling notify VM exit
652 # @run: enable the feature, do nothing and continue if the notify VM exit happens.
654 # @internal-error: enable the feature, raise a internal error if the notify
655 #                  VM exit happens.
657 # @disable: disable the feature.
659 # Since: 7.2
661 { 'enum': 'NotifyVmexitOption',
662   'data': [ 'run', 'internal-error', 'disable' ] }