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 # 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
75 # Notes: @singlestep is enabled through the GDB stub
77 { 'struct': 'StatusInfo',
78 'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
83 # Query the run status of all VCPUs
85 # Returns: @StatusInfo reflecting all VCPUs
91 # -> { "execute": "query-status" }
92 # <- { "return": { "running": true,
93 # "singlestep": false,
94 # "status": "running" } }
97 { 'command': 'query-status', 'returns': 'StatusInfo' }
102 # Emitted when the virtual machine has shut down, indicating that qemu is
105 # @guest: If true, the shutdown was triggered by a guest request (such as
106 # a guest-initiated ACPI shutdown request or other hardware-specific action)
107 # rather than a host request (such as sending qemu a SIGINT). (since 2.10)
109 # Note: If the command-line option "-no-shutdown" has been specified, qemu will
110 # not exit, and a STOP event will eventually follow the SHUTDOWN event
116 # <- { "event": "SHUTDOWN", "data": { "guest": true },
117 # "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
120 { 'event': 'SHUTDOWN', 'data': { 'guest': 'bool' } }
125 # Emitted when the virtual machine is powered down through the power control
126 # system, such as via ACPI.
132 # <- { "event": "POWERDOWN",
133 # "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
136 { 'event': 'POWERDOWN' }
141 # Emitted when the virtual machine is reset
143 # @guest: If true, the reset was triggered by a guest request (such as
144 # a guest-initiated ACPI reboot request or other hardware-specific action)
145 # rather than a host request (such as the QMP command system_reset).
152 # <- { "event": "RESET", "data": { "guest": false },
153 # "timestamp": { "seconds": 1267041653, "microseconds": 9518 } }
156 { 'event': 'RESET', 'data': { 'guest': 'bool' } }
161 # Emitted when the virtual machine is stopped
167 # <- { "event": "STOP",
168 # "timestamp": { "seconds": 1267041730, "microseconds": 281295 } }
176 # Emitted when the virtual machine resumes execution
182 # <- { "event": "RESUME",
183 # "timestamp": { "seconds": 1271770767, "microseconds": 582542 } }
186 { 'event': 'RESUME' }
191 # Emitted when guest enters a hardware suspension state, for example, S3 state,
192 # which is sometimes called standby state
198 # <- { "event": "SUSPEND",
199 # "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
202 { 'event': 'SUSPEND' }
207 # Emitted when guest enters a hardware suspension state with data saved on
208 # disk, for example, S4 state, which is sometimes called hibernate state
210 # Note: QEMU shuts down (similar to event @SHUTDOWN) when entering this state
216 # <- { "event": "SUSPEND_DISK",
217 # "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
220 { 'event': 'SUSPEND_DISK' }
225 # Emitted when the guest has woken up from suspend state and is running
231 # <- { "event": "WAKEUP",
232 # "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
235 { 'event': 'WAKEUP' }
240 # Emitted when the watchdog device's timer is expired
242 # @action: action that has been taken
244 # Note: If action is "reset", "shutdown", or "pause" the WATCHDOG event is
245 # followed respectively by the RESET, SHUTDOWN, or STOP events
247 # Note: This event is rate-limited.
253 # <- { "event": "WATCHDOG",
254 # "data": { "action": "reset" },
255 # "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
258 { 'event': 'WATCHDOG',
259 'data': { 'action': 'WatchdogAction' } }
264 # An enumeration of the actions taken when the watchdog device's timer is
267 # @reset: system resets
269 # @shutdown: system shutdown, note that it is similar to @powerdown, which
270 # tries to set to system status and notify guest
272 # @poweroff: system poweroff, the emulator program exits
274 # @pause: system pauses, similar to @stop
276 # @debug: system enters debug state
278 # @none: nothing is done
280 # @inject-nmi: a non-maskable interrupt is injected into the first VCPU (all
281 # VCPUS on x86) (since 2.4)
285 { 'enum': 'WatchdogAction',
286 'data': [ 'reset', 'shutdown', 'poweroff', 'pause', 'debug', 'none',
290 # @watchdog-set-action:
292 # Set watchdog action
296 { 'command': 'watchdog-set-action', 'data' : {'action': 'WatchdogAction'} }
301 # Emitted when guest OS panic is detected
303 # @action: action that has been taken, currently always "pause"
305 # @info: information about a panic (since 2.9)
311 # <- { "event": "GUEST_PANICKED",
312 # "data": { "action": "pause" } }
315 { 'event': 'GUEST_PANICKED',
316 'data': { 'action': 'GuestPanicAction', '*info': 'GuestPanicInformation' } }
321 # An enumeration of the actions taken when guest OS panic is detected
323 # @pause: system pauses
325 # Since: 2.1 (poweroff since 2.8)
327 { 'enum': 'GuestPanicAction',
328 'data': [ 'pause', 'poweroff' ] }
331 # @GuestPanicInformationType:
333 # An enumeration of the guest panic information types
335 # @hyper-v: hyper-v guest panic information type
337 # @s390: s390 guest panic information type (Since: 2.12)
341 { 'enum': 'GuestPanicInformationType',
342 'data': [ 'hyper-v', 's390' ] }
345 # @GuestPanicInformation:
347 # Information about a guest panic
349 # @type: Crash type that defines the hypervisor specific information
353 {'union': 'GuestPanicInformation',
354 'base': {'type': 'GuestPanicInformationType'},
355 'discriminator': 'type',
356 'data': { 'hyper-v': 'GuestPanicInformationHyperV',
357 's390': 'GuestPanicInformationS390' } }
360 # @GuestPanicInformationHyperV:
362 # Hyper-V specific guest panic information (HV crash MSRs)
366 {'struct': 'GuestPanicInformationHyperV',
367 'data': { 'arg1': 'uint64',
376 # Reason why the CPU is in a crashed state.
378 # @unknown: no crash reason was set
380 # @disabled-wait: the CPU has entered a disabled wait state
382 # @extint-loop: clock comparator or cpu timer interrupt with new PSW enabled
383 # for external interrupts
385 # @pgmint-loop: program interrupt with BAD new PSW
387 # @opint-loop: operation exception interrupt with invalid code at the program
392 { 'enum': 'S390CrashReason',
400 # @GuestPanicInformationS390:
402 # S390 specific guest panic information (PSW)
404 # @core: core id of the CPU that crashed
405 # @psw-mask: control fields of guest PSW
406 # @psw-addr: guest instruction address
407 # @reason: guest crash reason
411 {'struct': 'GuestPanicInformationS390',
412 'data': { 'core': 'uint32',
413 'psw-mask': 'uint64',
414 'psw-addr': 'uint64',
415 'reason': 'S390CrashReason' } }