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
23 # @internal-error: An internal error that prevents further guest execution
26 # @io-error: the last IOP has failed and the device is configured to pause
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.
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' ] }
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
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'] }
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
111 # Notes: @singlestep is enabled through the GDB stub
113 { 'struct': 'StatusInfo',
114 'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
119 # Query the run status of all VCPUs
121 # Returns: @StatusInfo reflecting all VCPUs
127 # -> { "execute": "query-status" }
128 # <- { "return": { "running": true,
129 # "singlestep": false,
130 # "status": "running" } }
133 { 'command': 'query-status', 'returns': 'StatusInfo',
134 'allow-preconfig': true }
139 # Emitted when the virtual machine has shut down, indicating that qemu is
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
155 # <- { "event": "SHUTDOWN", "data": { "guest": true },
156 # "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
159 { 'event': 'SHUTDOWN', 'data': { 'guest': 'bool', 'reason': 'ShutdownCause' } }
164 # Emitted when the virtual machine is powered down through the power control
165 # system, such as via ACPI.
171 # <- { "event": "POWERDOWN",
172 # "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
175 { 'event': 'POWERDOWN' }
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).
187 # @reason: The @ShutdownCause of the RESET. (since 4.0)
193 # <- { "event": "RESET", "data": { "guest": false },
194 # "timestamp": { "seconds": 1267041653, "microseconds": 9518 } }
197 { 'event': 'RESET', 'data': { 'guest': 'bool', 'reason': 'ShutdownCause' } }
202 # Emitted when the virtual machine is stopped
208 # <- { "event": "STOP",
209 # "timestamp": { "seconds": 1267041730, "microseconds": 281295 } }
217 # Emitted when the virtual machine resumes execution
223 # <- { "event": "RESUME",
224 # "timestamp": { "seconds": 1271770767, "microseconds": 582542 } }
227 { 'event': 'RESUME' }
232 # Emitted when guest enters a hardware suspension state, for example, S3 state,
233 # which is sometimes called standby state
239 # <- { "event": "SUSPEND",
240 # "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
243 { 'event': 'SUSPEND' }
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
257 # <- { "event": "SUSPEND_DISK",
258 # "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
261 { 'event': 'SUSPEND_DISK' }
266 # Emitted when the guest has woken up from suspend state and is running
272 # <- { "event": "WAKEUP",
273 # "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
276 { 'event': 'WAKEUP' }
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.
294 # <- { "event": "WATCHDOG",
295 # "data": { "action": "reset" },
296 # "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
299 { 'event': 'WATCHDOG',
300 'data': { 'action': 'WatchdogAction' } }
305 # An enumeration of the actions taken when the watchdog device's timer is
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)
326 { 'enum': 'WatchdogAction',
327 'data': [ 'reset', 'shutdown', 'poweroff', 'pause', 'debug', 'none',
331 # @watchdog-set-action:
333 # Set watchdog action
337 { 'command': 'watchdog-set-action', 'data' : {'action': 'WatchdogAction'} }
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)
352 # <- { "event": "GUEST_PANICKED",
353 # "data": { "action": "pause" } }
356 { 'event': 'GUEST_PANICKED',
357 'data': { 'action': 'GuestPanicAction', '*info': 'GuestPanicInformation' } }
362 # An enumeration of the actions taken when guest OS panic is detected
364 # @pause: system pauses
366 # Since: 2.1 (poweroff since 2.8)
368 { 'enum': 'GuestPanicAction',
369 'data': [ 'pause', 'poweroff' ] }
372 # @GuestPanicInformationType:
374 # An enumeration of the guest panic information types
376 # @hyper-v: hyper-v guest panic information type
378 # @s390: s390 guest panic information type (Since: 2.12)
382 { 'enum': 'GuestPanicInformationType',
383 'data': [ 'hyper-v', 's390' ] }
386 # @GuestPanicInformation:
388 # Information about a guest panic
390 # @type: Crash type that defines the hypervisor specific information
394 {'union': 'GuestPanicInformation',
395 'base': {'type': 'GuestPanicInformationType'},
396 'discriminator': 'type',
397 'data': { 'hyper-v': 'GuestPanicInformationHyperV',
398 's390': 'GuestPanicInformationS390' } }
401 # @GuestPanicInformationHyperV:
403 # Hyper-V specific guest panic information (HV crash MSRs)
407 {'struct': 'GuestPanicInformationHyperV',
408 'data': { 'arg1': 'uint64',
417 # Reason why the CPU is in a crashed state.
419 # @unknown: no crash reason was set
421 # @disabled-wait: the CPU has entered a disabled wait state
423 # @extint-loop: clock comparator or cpu timer interrupt with new PSW enabled
424 # for external interrupts
426 # @pgmint-loop: program interrupt with BAD new PSW
428 # @opint-loop: operation exception interrupt with invalid code at the program
433 { 'enum': 'S390CrashReason',
441 # @GuestPanicInformationS390:
443 # S390 specific guest panic information (PSW)
445 # @core: core id of the CPU that crashed
446 # @psw-mask: control fields of guest PSW
447 # @psw-addr: guest instruction address
448 # @reason: guest crash reason
452 {'struct': 'GuestPanicInformationS390',
453 'data': { 'core': 'uint32',
454 'psw-mask': 'uint64',
455 'psw-addr': 'uint64',
456 'reason': 'S390CrashReason' } }