s390x: introduce 4.0 compat machine
[qemu.git] / qapi / run-state.json
blob332e44897b718eed2368e0c63f88a252b06c0e5a
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 # @StatusInfo:
65 # Information about VCPU run state
67 # @running: true if all VCPUs are runnable, false if not runnable
69 # @singlestep: true if VCPUs are in single-step mode
71 # @status: the virtual machine @RunState
73 # Since:  0.14.0
75 # Notes: @singlestep is enabled through the GDB stub
77 { 'struct': 'StatusInfo',
78   'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
81 # @query-status:
83 # Query the run status of all VCPUs
85 # Returns: @StatusInfo reflecting all VCPUs
87 # Since:  0.14.0
89 # Example:
91 # -> { "execute": "query-status" }
92 # <- { "return": { "running": true,
93 #                  "singlestep": false,
94 #                  "status": "running" } }
97 { 'command': 'query-status', 'returns': 'StatusInfo',
98   'allow-preconfig': true }
101 # @SHUTDOWN:
103 # Emitted when the virtual machine has shut down, indicating that qemu is
104 # about to exit.
106 # @guest: If true, the shutdown was triggered by a guest request (such as
107 # a guest-initiated ACPI shutdown request or other hardware-specific action)
108 # rather than a host request (such as sending qemu a SIGINT). (since 2.10)
110 # Note: If the command-line option "-no-shutdown" has been specified, qemu will
111 # not exit, and a STOP event will eventually follow the SHUTDOWN event
113 # Since: 0.12.0
115 # Example:
117 # <- { "event": "SHUTDOWN", "data": { "guest": true },
118 #      "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
121 { 'event': 'SHUTDOWN', 'data': { 'guest': 'bool' } }
124 # @POWERDOWN:
126 # Emitted when the virtual machine is powered down through the power control
127 # system, such as via ACPI.
129 # Since: 0.12.0
131 # Example:
133 # <- { "event": "POWERDOWN",
134 #      "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
137 { 'event': 'POWERDOWN' }
140 # @RESET:
142 # Emitted when the virtual machine is reset
144 # @guest: If true, the reset was triggered by a guest request (such as
145 # a guest-initiated ACPI reboot request or other hardware-specific action)
146 # rather than a host request (such as the QMP command system_reset).
147 # (since 2.10)
149 # Since: 0.12.0
151 # Example:
153 # <- { "event": "RESET", "data": { "guest": false },
154 #      "timestamp": { "seconds": 1267041653, "microseconds": 9518 } }
157 { 'event': 'RESET', 'data': { 'guest': 'bool' } }
160 # @STOP:
162 # Emitted when the virtual machine is stopped
164 # Since: 0.12.0
166 # Example:
168 # <- { "event": "STOP",
169 #      "timestamp": { "seconds": 1267041730, "microseconds": 281295 } }
172 { 'event': 'STOP' }
175 # @RESUME:
177 # Emitted when the virtual machine resumes execution
179 # Since: 0.12.0
181 # Example:
183 # <- { "event": "RESUME",
184 #      "timestamp": { "seconds": 1271770767, "microseconds": 582542 } }
187 { 'event': 'RESUME' }
190 # @SUSPEND:
192 # Emitted when guest enters a hardware suspension state, for example, S3 state,
193 # which is sometimes called standby state
195 # Since: 1.1
197 # Example:
199 # <- { "event": "SUSPEND",
200 #      "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
203 { 'event': 'SUSPEND' }
206 # @SUSPEND_DISK:
208 # Emitted when guest enters a hardware suspension state with data saved on
209 # disk, for example, S4 state, which is sometimes called hibernate state
211 # Note: QEMU shuts down (similar to event @SHUTDOWN) when entering this state
213 # Since: 1.2
215 # Example:
217 # <-   { "event": "SUSPEND_DISK",
218 #        "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
221 { 'event': 'SUSPEND_DISK' }
224 # @WAKEUP:
226 # Emitted when the guest has woken up from suspend state and is running
228 # Since: 1.1
230 # Example:
232 # <- { "event": "WAKEUP",
233 #      "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
236 { 'event': 'WAKEUP' }
239 # @WATCHDOG:
241 # Emitted when the watchdog device's timer is expired
243 # @action: action that has been taken
245 # Note: If action is "reset", "shutdown", or "pause" the WATCHDOG event is
246 # followed respectively by the RESET, SHUTDOWN, or STOP events
248 # Note: This event is rate-limited.
250 # Since: 0.13.0
252 # Example:
254 # <- { "event": "WATCHDOG",
255 #      "data": { "action": "reset" },
256 #      "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
259 { 'event': 'WATCHDOG',
260   'data': { 'action': 'WatchdogAction' } }
263 # @WatchdogAction:
265 # An enumeration of the actions taken when the watchdog device's timer is
266 # expired
268 # @reset: system resets
270 # @shutdown: system shutdown, note that it is similar to @powerdown, which
271 #            tries to set to system status and notify guest
273 # @poweroff: system poweroff, the emulator program exits
275 # @pause: system pauses, similar to @stop
277 # @debug: system enters debug state
279 # @none: nothing is done
281 # @inject-nmi: a non-maskable interrupt is injected into the first VCPU (all
282 #              VCPUS on x86) (since 2.4)
284 # Since: 2.1
286 { 'enum': 'WatchdogAction',
287   'data': [ 'reset', 'shutdown', 'poweroff', 'pause', 'debug', 'none',
288             'inject-nmi' ] }
291 # @watchdog-set-action:
293 # Set watchdog action
295 # Since: 2.11
297 { 'command': 'watchdog-set-action', 'data' : {'action': 'WatchdogAction'} }
300 # @GUEST_PANICKED:
302 # Emitted when guest OS panic is detected
304 # @action: action that has been taken, currently always "pause"
306 # @info: information about a panic (since 2.9)
308 # Since: 1.5
310 # Example:
312 # <- { "event": "GUEST_PANICKED",
313 #      "data": { "action": "pause" } }
316 { 'event': 'GUEST_PANICKED',
317   'data': { 'action': 'GuestPanicAction', '*info': 'GuestPanicInformation' } }
320 # @GuestPanicAction:
322 # An enumeration of the actions taken when guest OS panic is detected
324 # @pause: system pauses
326 # Since: 2.1 (poweroff since 2.8)
328 { 'enum': 'GuestPanicAction',
329   'data': [ 'pause', 'poweroff' ] }
332 # @GuestPanicInformationType:
334 # An enumeration of the guest panic information types
336 # @hyper-v: hyper-v guest panic information type
338 # @s390: s390 guest panic information type (Since: 2.12)
340 # Since: 2.9
342 { 'enum': 'GuestPanicInformationType',
343   'data': [ 'hyper-v', 's390' ] }
346 # @GuestPanicInformation:
348 # Information about a guest panic
350 # @type: Crash type that defines the hypervisor specific information
352 # Since: 2.9
354 {'union': 'GuestPanicInformation',
355  'base': {'type': 'GuestPanicInformationType'},
356  'discriminator': 'type',
357  'data': { 'hyper-v': 'GuestPanicInformationHyperV',
358            's390': 'GuestPanicInformationS390' } }
361 # @GuestPanicInformationHyperV:
363 # Hyper-V specific guest panic information (HV crash MSRs)
365 # Since: 2.9
367 {'struct': 'GuestPanicInformationHyperV',
368  'data': { 'arg1': 'uint64',
369            'arg2': 'uint64',
370            'arg3': 'uint64',
371            'arg4': 'uint64',
372            'arg5': 'uint64' } }
375 # @S390CrashReason:
377 # Reason why the CPU is in a crashed state.
379 # @unknown: no crash reason was set
381 # @disabled-wait: the CPU has entered a disabled wait state
383 # @extint-loop: clock comparator or cpu timer interrupt with new PSW enabled
384 #              for external interrupts
386 # @pgmint-loop: program interrupt with BAD new PSW
388 # @opint-loop: operation exception interrupt with invalid code at the program
389 #             interrupt new PSW
391 # Since: 2.12
393 { 'enum': 'S390CrashReason',
394   'data': [ 'unknown',
395             'disabled-wait',
396             'extint-loop',
397             'pgmint-loop',
398             'opint-loop' ] }
401 # @GuestPanicInformationS390:
403 # S390 specific guest panic information (PSW)
405 # @core: core id of the CPU that crashed
406 # @psw-mask: control fields of guest PSW
407 # @psw-addr: guest instruction address
408 # @reason: guest crash reason
410 # Since: 2.12
412 {'struct': 'GuestPanicInformationS390',
413  'data': { 'core': 'uint32',
414            'psw-mask': 'uint64',
415            'psw-addr': 'uint64',
416            'reason': 'S390CrashReason' } }