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: Reaction to a QMP command, like 'quit'
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
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', 'host-signal', 'host-ui',
93 'guest-shutdown', 'guest-reset', 'guest-panic',
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
109 # Notes: @singlestep is enabled through the GDB stub
111 { 'struct': 'StatusInfo',
112 'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
117 # Query the run status of all VCPUs
119 # Returns: @StatusInfo reflecting all VCPUs
125 # -> { "execute": "query-status" }
126 # <- { "return": { "running": true,
127 # "singlestep": false,
128 # "status": "running" } }
131 { 'command': 'query-status', 'returns': 'StatusInfo',
132 'allow-preconfig': true }
137 # Emitted when the virtual machine has shut down, indicating that qemu is
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 # Note: If the command-line option "-no-shutdown" has been specified, qemu will
145 # not exit, and a STOP event will eventually follow the SHUTDOWN event
151 # <- { "event": "SHUTDOWN", "data": { "guest": true },
152 # "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
155 { 'event': 'SHUTDOWN', 'data': { 'guest': 'bool' } }
160 # Emitted when the virtual machine is powered down through the power control
161 # system, such as via ACPI.
167 # <- { "event": "POWERDOWN",
168 # "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
171 { 'event': 'POWERDOWN' }
176 # Emitted when the virtual machine is reset
178 # @guest: If true, the reset was triggered by a guest request (such as
179 # a guest-initiated ACPI reboot request or other hardware-specific action)
180 # rather than a host request (such as the QMP command system_reset).
187 # <- { "event": "RESET", "data": { "guest": false },
188 # "timestamp": { "seconds": 1267041653, "microseconds": 9518 } }
191 { 'event': 'RESET', 'data': { 'guest': 'bool' } }
196 # Emitted when the virtual machine is stopped
202 # <- { "event": "STOP",
203 # "timestamp": { "seconds": 1267041730, "microseconds": 281295 } }
211 # Emitted when the virtual machine resumes execution
217 # <- { "event": "RESUME",
218 # "timestamp": { "seconds": 1271770767, "microseconds": 582542 } }
221 { 'event': 'RESUME' }
226 # Emitted when guest enters a hardware suspension state, for example, S3 state,
227 # which is sometimes called standby state
233 # <- { "event": "SUSPEND",
234 # "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
237 { 'event': 'SUSPEND' }
242 # Emitted when guest enters a hardware suspension state with data saved on
243 # disk, for example, S4 state, which is sometimes called hibernate state
245 # Note: QEMU shuts down (similar to event @SHUTDOWN) when entering this state
251 # <- { "event": "SUSPEND_DISK",
252 # "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
255 { 'event': 'SUSPEND_DISK' }
260 # Emitted when the guest has woken up from suspend state and is running
266 # <- { "event": "WAKEUP",
267 # "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
270 { 'event': 'WAKEUP' }
275 # Emitted when the watchdog device's timer is expired
277 # @action: action that has been taken
279 # Note: If action is "reset", "shutdown", or "pause" the WATCHDOG event is
280 # followed respectively by the RESET, SHUTDOWN, or STOP events
282 # Note: This event is rate-limited.
288 # <- { "event": "WATCHDOG",
289 # "data": { "action": "reset" },
290 # "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
293 { 'event': 'WATCHDOG',
294 'data': { 'action': 'WatchdogAction' } }
299 # An enumeration of the actions taken when the watchdog device's timer is
302 # @reset: system resets
304 # @shutdown: system shutdown, note that it is similar to @powerdown, which
305 # tries to set to system status and notify guest
307 # @poweroff: system poweroff, the emulator program exits
309 # @pause: system pauses, similar to @stop
311 # @debug: system enters debug state
313 # @none: nothing is done
315 # @inject-nmi: a non-maskable interrupt is injected into the first VCPU (all
316 # VCPUS on x86) (since 2.4)
320 { 'enum': 'WatchdogAction',
321 'data': [ 'reset', 'shutdown', 'poweroff', 'pause', 'debug', 'none',
325 # @watchdog-set-action:
327 # Set watchdog action
331 { 'command': 'watchdog-set-action', 'data' : {'action': 'WatchdogAction'} }
336 # Emitted when guest OS panic is detected
338 # @action: action that has been taken, currently always "pause"
340 # @info: information about a panic (since 2.9)
346 # <- { "event": "GUEST_PANICKED",
347 # "data": { "action": "pause" } }
350 { 'event': 'GUEST_PANICKED',
351 'data': { 'action': 'GuestPanicAction', '*info': 'GuestPanicInformation' } }
356 # An enumeration of the actions taken when guest OS panic is detected
358 # @pause: system pauses
360 # Since: 2.1 (poweroff since 2.8)
362 { 'enum': 'GuestPanicAction',
363 'data': [ 'pause', 'poweroff' ] }
366 # @GuestPanicInformationType:
368 # An enumeration of the guest panic information types
370 # @hyper-v: hyper-v guest panic information type
372 # @s390: s390 guest panic information type (Since: 2.12)
376 { 'enum': 'GuestPanicInformationType',
377 'data': [ 'hyper-v', 's390' ] }
380 # @GuestPanicInformation:
382 # Information about a guest panic
384 # @type: Crash type that defines the hypervisor specific information
388 {'union': 'GuestPanicInformation',
389 'base': {'type': 'GuestPanicInformationType'},
390 'discriminator': 'type',
391 'data': { 'hyper-v': 'GuestPanicInformationHyperV',
392 's390': 'GuestPanicInformationS390' } }
395 # @GuestPanicInformationHyperV:
397 # Hyper-V specific guest panic information (HV crash MSRs)
401 {'struct': 'GuestPanicInformationHyperV',
402 'data': { 'arg1': 'uint64',
411 # Reason why the CPU is in a crashed state.
413 # @unknown: no crash reason was set
415 # @disabled-wait: the CPU has entered a disabled wait state
417 # @extint-loop: clock comparator or cpu timer interrupt with new PSW enabled
418 # for external interrupts
420 # @pgmint-loop: program interrupt with BAD new PSW
422 # @opint-loop: operation exception interrupt with invalid code at the program
427 { 'enum': 'S390CrashReason',
435 # @GuestPanicInformationS390:
437 # S390 specific guest panic information (PSW)
439 # @core: core id of the CPU that crashed
440 # @psw-mask: control fields of guest PSW
441 # @psw-addr: guest instruction address
442 # @reason: guest crash reason
446 {'struct': 'GuestPanicInformationS390',
447 'data': { 'core': 'uint32',
448 'psw-mask': 'uint64',
449 'psw-addr': 'uint64',
450 'reason': 'S390CrashReason' } }