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',
98 'allow-preconfig': true }
103 # Emitted when the virtual machine has shut down, indicating that qemu is
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
117 # <- { "event": "SHUTDOWN", "data": { "guest": true },
118 # "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
121 { 'event': 'SHUTDOWN', 'data': { 'guest': 'bool' } }
126 # Emitted when the virtual machine is powered down through the power control
127 # system, such as via ACPI.
133 # <- { "event": "POWERDOWN",
134 # "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
137 { 'event': 'POWERDOWN' }
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).
153 # <- { "event": "RESET", "data": { "guest": false },
154 # "timestamp": { "seconds": 1267041653, "microseconds": 9518 } }
157 { 'event': 'RESET', 'data': { 'guest': 'bool' } }
162 # Emitted when the virtual machine is stopped
168 # <- { "event": "STOP",
169 # "timestamp": { "seconds": 1267041730, "microseconds": 281295 } }
177 # Emitted when the virtual machine resumes execution
183 # <- { "event": "RESUME",
184 # "timestamp": { "seconds": 1271770767, "microseconds": 582542 } }
187 { 'event': 'RESUME' }
192 # Emitted when guest enters a hardware suspension state, for example, S3 state,
193 # which is sometimes called standby state
199 # <- { "event": "SUSPEND",
200 # "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
203 { 'event': 'SUSPEND' }
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
217 # <- { "event": "SUSPEND_DISK",
218 # "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
221 { 'event': 'SUSPEND_DISK' }
226 # Emitted when the guest has woken up from suspend state and is running
232 # <- { "event": "WAKEUP",
233 # "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
236 { 'event': 'WAKEUP' }
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.
254 # <- { "event": "WATCHDOG",
255 # "data": { "action": "reset" },
256 # "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
259 { 'event': 'WATCHDOG',
260 'data': { 'action': 'WatchdogAction' } }
265 # An enumeration of the actions taken when the watchdog device's timer is
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)
286 { 'enum': 'WatchdogAction',
287 'data': [ 'reset', 'shutdown', 'poweroff', 'pause', 'debug', 'none',
291 # @watchdog-set-action:
293 # Set watchdog action
297 { 'command': 'watchdog-set-action', 'data' : {'action': 'WatchdogAction'} }
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)
312 # <- { "event": "GUEST_PANICKED",
313 # "data": { "action": "pause" } }
316 { 'event': 'GUEST_PANICKED',
317 'data': { 'action': 'GuestPanicAction', '*info': 'GuestPanicInformation' } }
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)
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
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)
367 {'struct': 'GuestPanicInformationHyperV',
368 'data': { 'arg1': 'uint64',
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
393 { 'enum': 'S390CrashReason',
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
412 {'struct': 'GuestPanicInformationS390',
413 'data': { 'core': 'uint32',
414 'psw-mask': 'uint64',
415 'psw-addr': 'uint64',
416 'reason': 'S390CrashReason' } }