Merge remote-tracking branch 'qemu/master'
[qemu/ar7.git] / qapi / run-state.json
blobbca46a8785f7ffdec5f8693bef46b674140af723
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)
53 { 'enum': 'RunState',
54   'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
55             'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
56             'running', 'save-vm', 'shutdown', 'suspended', 'watchdog',
57             'guest-panicked', 'colo' ] }
60 # @StatusInfo:
62 # Information about VCPU run state
64 # @running: true if all VCPUs are runnable, false if not runnable
66 # @singlestep: true if VCPUs are in single-step mode
68 # @status: the virtual machine @RunState
70 # Since:  0.14.0
72 # Notes: @singlestep is enabled through the GDB stub
74 { 'struct': 'StatusInfo',
75   'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
78 # @query-status:
80 # Query the run status of all VCPUs
82 # Returns: @StatusInfo reflecting all VCPUs
84 # Since:  0.14.0
86 # Example:
88 # -> { "execute": "query-status" }
89 # <- { "return": { "running": true,
90 #                  "singlestep": false,
91 #                  "status": "running" } }
94 { 'command': 'query-status', 'returns': 'StatusInfo' }
97 # @SHUTDOWN:
99 # Emitted when the virtual machine has shut down, indicating that qemu is
100 # about to exit.
102 # @guest: If true, the shutdown was triggered by a guest request (such as
103 # a guest-initiated ACPI shutdown request or other hardware-specific action)
104 # rather than a host request (such as sending qemu a SIGINT). (since 2.10)
106 # Note: If the command-line option "-no-shutdown" has been specified, qemu will
107 # not exit, and a STOP event will eventually follow the SHUTDOWN event
109 # Since: 0.12.0
111 # Example:
113 # <- { "event": "SHUTDOWN", "data": { "guest": true },
114 #      "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
117 { 'event': 'SHUTDOWN', 'data': { 'guest': 'bool' } }
120 # @POWERDOWN:
122 # Emitted when the virtual machine is powered down through the power control
123 # system, such as via ACPI.
125 # Since: 0.12.0
127 # Example:
129 # <- { "event": "POWERDOWN",
130 #      "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
133 { 'event': 'POWERDOWN' }
136 # @RESET:
138 # Emitted when the virtual machine is reset
140 # @guest: If true, the reset was triggered by a guest request (such as
141 # a guest-initiated ACPI reboot request or other hardware-specific action)
142 # rather than a host request (such as the QMP command system_reset).
143 # (since 2.10)
145 # Since: 0.12.0
147 # Example:
149 # <- { "event": "RESET", "data": { "guest": false },
150 #      "timestamp": { "seconds": 1267041653, "microseconds": 9518 } }
153 { 'event': 'RESET', 'data': { 'guest': 'bool' } }
156 # @STOP:
158 # Emitted when the virtual machine is stopped
160 # Since: 0.12.0
162 # Example:
164 # <- { "event": "STOP",
165 #      "timestamp": { "seconds": 1267041730, "microseconds": 281295 } }
168 { 'event': 'STOP' }
171 # @RESUME:
173 # Emitted when the virtual machine resumes execution
175 # Since: 0.12.0
177 # Example:
179 # <- { "event": "RESUME",
180 #      "timestamp": { "seconds": 1271770767, "microseconds": 582542 } }
183 { 'event': 'RESUME' }
186 # @SUSPEND:
188 # Emitted when guest enters a hardware suspension state, for example, S3 state,
189 # which is sometimes called standby state
191 # Since: 1.1
193 # Example:
195 # <- { "event": "SUSPEND",
196 #      "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
199 { 'event': 'SUSPEND' }
202 # @SUSPEND_DISK:
204 # Emitted when guest enters a hardware suspension state with data saved on
205 # disk, for example, S4 state, which is sometimes called hibernate state
207 # Note: QEMU shuts down (similar to event @SHUTDOWN) when entering this state
209 # Since: 1.2
211 # Example:
213 # <-   { "event": "SUSPEND_DISK",
214 #        "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
217 { 'event': 'SUSPEND_DISK' }
220 # @WAKEUP:
222 # Emitted when the guest has woken up from suspend state and is running
224 # Since: 1.1
226 # Example:
228 # <- { "event": "WAKEUP",
229 #      "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
232 { 'event': 'WAKEUP' }
235 # @WATCHDOG:
237 # Emitted when the watchdog device's timer is expired
239 # @action: action that has been taken
241 # Note: If action is "reset", "shutdown", or "pause" the WATCHDOG event is
242 # followed respectively by the RESET, SHUTDOWN, or STOP events
244 # Note: This event is rate-limited.
246 # Since: 0.13.0
248 # Example:
250 # <- { "event": "WATCHDOG",
251 #      "data": { "action": "reset" },
252 #      "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
255 { 'event': 'WATCHDOG',
256   'data': { 'action': 'WatchdogAction' } }
259 # @WatchdogAction:
261 # An enumeration of the actions taken when the watchdog device's timer is
262 # expired
264 # @reset: system resets
266 # @shutdown: system shutdown, note that it is similar to @powerdown, which
267 #            tries to set to system status and notify guest
269 # @poweroff: system poweroff, the emulator program exits
271 # @pause: system pauses, similar to @stop
273 # @debug: system enters debug state
275 # @none: nothing is done
277 # @inject-nmi: a non-maskable interrupt is injected into the first VCPU (all
278 #              VCPUS on x86) (since 2.4)
280 # Since: 2.1
282 { 'enum': 'WatchdogAction',
283   'data': [ 'reset', 'shutdown', 'poweroff', 'pause', 'debug', 'none',
284             'inject-nmi' ] }
287 # @GUEST_PANICKED:
289 # Emitted when guest OS panic is detected
291 # @action: action that has been taken, currently always "pause"
293 # @info: information about a panic (since 2.9)
295 # Since: 1.5
297 # Example:
299 # <- { "event": "GUEST_PANICKED",
300 #      "data": { "action": "pause" } }
303 { 'event': 'GUEST_PANICKED',
304   'data': { 'action': 'GuestPanicAction', '*info': 'GuestPanicInformation' } }
307 # @GuestPanicAction:
309 # An enumeration of the actions taken when guest OS panic is detected
311 # @pause: system pauses
313 # Since: 2.1 (poweroff since 2.8)
315 { 'enum': 'GuestPanicAction',
316   'data': [ 'pause', 'poweroff' ] }
319 # @GuestPanicInformationType:
321 # An enumeration of the guest panic information types
323 # Since: 2.9
325 { 'enum': 'GuestPanicInformationType',
326   'data': [ 'hyper-v'] }
329 # @GuestPanicInformation:
331 # Information about a guest panic
333 # Since: 2.9
335 {'union': 'GuestPanicInformation',
336  'base': {'type': 'GuestPanicInformationType'},
337  'discriminator': 'type',
338  'data': { 'hyper-v': 'GuestPanicInformationHyperV' } }
341 # @GuestPanicInformationHyperV:
343 # Hyper-V specific guest panic information (HV crash MSRs)
345 # Since: 2.9
347 {'struct': 'GuestPanicInformationHyperV',
348  'data': { 'arg1': 'uint64',
349            'arg2': 'uint64',
350            'arg3': 'uint64',
351            'arg4': 'uint64',
352            'arg5': 'uint64' } }