]> git.proxmox.com Git - mirror_qemu.git/blame - qapi/run-state.json
stream: Allow users to request only format driver names in backing file format
[mirror_qemu.git] / qapi / run-state.json
CommitLineData
0e201d34 1# -*- Mode: Python -*-
f7160f32 2# vim: filetype=python
0e201d34
MA
3#
4
5##
6# = VM run state
7##
8
9##
10# @RunState:
11#
12# An enumeration of VM run states.
13#
14# @debug: QEMU is running on a debugger
15#
16# @finish-migrate: guest is paused to finish the migration process
17#
18# @inmigrate: guest is paused waiting for an incoming migration. Note
a937b6aa
MA
19# that this state does not tell whether the machine will start at
20# the end of the migration. This depends on the command-line -S
21# option and any invocation of 'stop' or 'cont' that has happened
22# since QEMU was started.
0e201d34 23#
a937b6aa
MA
24# @internal-error: An internal error that prevents further guest
25# execution has occurred
0e201d34 26#
a937b6aa
MA
27# @io-error: the last IOP has failed and the device is configured to
28# pause on I/O errors
0e201d34
MA
29#
30# @paused: guest has been paused via the 'stop' command
31#
32# @postmigrate: guest is paused following a successful 'migrate'
33#
34# @prelaunch: QEMU was started with -S and guest has not started
35#
36# @restore-vm: guest is paused to restore VM state
37#
38# @running: guest is actively running
39#
40# @save-vm: guest is paused to save the VM state
41#
42# @shutdown: guest is shut down (and -no-shutdown is in use)
43#
44# @suspended: guest is suspended (ACPI S3)
45#
a937b6aa
MA
46# @watchdog: the watchdog action is configured to pause and has been
47# triggered
0e201d34 48#
a937b6aa
MA
49# @guest-panicked: guest has been panicked as a result of guest OS
50# panic
0e201d34 51#
a937b6aa
MA
52# @colo: guest is paused to save/restore VM state under colo
53# checkpoint, VM can not get into this state unless colo
54# capability is enabled for migration. (since 2.8)
0e201d34
MA
55##
56{ 'enum': 'RunState',
57 'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
58 'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
59 'running', 'save-vm', 'shutdown', 'suspended', 'watchdog',
164dafd1 60 'guest-panicked', 'colo' ] }
0e201d34 61
d43013e2
DC
62##
63# @ShutdownCause:
64#
65# An enumeration of reasons for a Shutdown.
66#
67# @none: No shutdown request pending
68#
69# @host-error: An error prevents further use of guest
70#
92548938
DC
71# @host-qmp-quit: Reaction to the QMP command 'quit'
72#
73# @host-qmp-system-reset: Reaction to the QMP command 'system_reset'
d43013e2
DC
74#
75# @host-signal: Reaction to a signal, such as SIGINT
76#
77# @host-ui: Reaction to a UI event, like window close
78#
79# @guest-shutdown: Guest shutdown/suspend request, via ACPI or other
a937b6aa 80# hardware-specific means
d43013e2
DC
81#
82# @guest-reset: Guest reset request, and command line turns that into
a937b6aa 83# a shutdown
d43013e2 84#
a937b6aa
MA
85# @guest-panic: Guest panicked, and command line turns that into a
86# shutdown
d43013e2 87#
a937b6aa
MA
88# @subsystem-reset: Partial guest reset that does not trigger QMP
89# events and ignores --no-reboot. This is useful for sanitizing
90# hypercalls on s390 that are used during kexec/kdump/boot
d43013e2 91#
7966d70f 92# @snapshot-load: A snapshot is being loaded by the record & replay
a937b6aa
MA
93# subsystem. This value is used only within QEMU. It doesn't
94# occur in QMP. (since 7.2)
d43013e2
DC
95##
96{ 'enum': 'ShutdownCause',
97 # Beware, shutdown_caused_by_guest() depends on enumeration order
92548938
DC
98 'data': [ 'none', 'host-error', 'host-qmp-quit', 'host-qmp-system-reset',
99 'host-signal', 'host-ui', 'guest-shutdown', 'guest-reset',
7966d70f 100 'guest-panic', 'subsystem-reset', 'snapshot-load'] }
d43013e2 101
0e201d34
MA
102##
103# @StatusInfo:
104#
b9ae473d 105# Information about VM run state
0e201d34
MA
106#
107# @running: true if all VCPUs are runnable, false if not runnable
108#
0e201d34
MA
109# @status: the virtual machine @RunState
110#
34c18203 111# Features:
a937b6aa 112#
23e46452 113# Since: 0.14
0e201d34 114#
0e201d34
MA
115##
116{ 'struct': 'StatusInfo',
34c18203 117 'data': {'running': 'bool',
34c18203 118 'status': 'RunState'} }
0e201d34
MA
119
120##
121# @query-status:
122#
b9ae473d 123# Query the run status of the VM
0e201d34 124#
b9ae473d 125# Returns: @StatusInfo reflecting the VM
0e201d34 126#
23e46452 127# Since: 0.14
0e201d34
MA
128#
129# Example:
130#
131# -> { "execute": "query-status" }
132# <- { "return": { "running": true,
0e201d34 133# "status": "running" } }
0e201d34 134##
d6fe3d02
IM
135{ 'command': 'query-status', 'returns': 'StatusInfo',
136 'allow-preconfig': true }
0e201d34
MA
137
138##
139# @SHUTDOWN:
140#
a937b6aa
MA
141# Emitted when the virtual machine has shut down, indicating that qemu
142# is about to exit.
0e201d34 143#
a937b6aa
MA
144# @guest: If true, the shutdown was triggered by a guest request (such
145# as a guest-initiated ACPI shutdown request or other
146# hardware-specific action) rather than a host request (such as
147# sending qemu a SIGINT). (since 2.10)
0e201d34 148#
a937b6aa
MA
149# @reason: The @ShutdownCause which resulted in the SHUTDOWN. (since
150# 4.0)
ecd7a0d5 151#
a937b6aa
MA
152# Note: If the command-line option "-no-shutdown" has been specified,
153# qemu will not exit, and a STOP event will eventually follow the
154# SHUTDOWN event
0e201d34 155#
9bc6e893 156# Since: 0.12
0e201d34
MA
157#
158# Example:
159#
d219119f
VT
160# <- { "event": "SHUTDOWN",
161# "data": { "guest": true, "reason": "guest-shutdown" },
0e201d34 162# "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
0e201d34 163##
ecd7a0d5 164{ 'event': 'SHUTDOWN', 'data': { 'guest': 'bool', 'reason': 'ShutdownCause' } }
0e201d34
MA
165
166##
167# @POWERDOWN:
168#
a937b6aa
MA
169# Emitted when the virtual machine is powered down through the power
170# control system, such as via ACPI.
0e201d34 171#
9bc6e893 172# Since: 0.12
0e201d34
MA
173#
174# Example:
175#
176# <- { "event": "POWERDOWN",
177# "timestamp": { "seconds": 1267040730, "microseconds": 682951 } }
0e201d34
MA
178##
179{ 'event': 'POWERDOWN' }
180
181##
182# @RESET:
183#
184# Emitted when the virtual machine is reset
185#
186# @guest: If true, the reset was triggered by a guest request (such as
a937b6aa
MA
187# a guest-initiated ACPI reboot request or other hardware-specific
188# action) rather than a host request (such as the QMP command
189# system_reset). (since 2.10)
0e201d34 190#
ecd7a0d5
DC
191# @reason: The @ShutdownCause of the RESET. (since 4.0)
192#
9bc6e893 193# Since: 0.12
0e201d34
MA
194#
195# Example:
196#
d219119f
VT
197# <- { "event": "RESET",
198# "data": { "guest": false, "reason": "guest-reset" },
0e201d34 199# "timestamp": { "seconds": 1267041653, "microseconds": 9518 } }
0e201d34 200##
ecd7a0d5 201{ 'event': 'RESET', 'data': { 'guest': 'bool', 'reason': 'ShutdownCause' } }
0e201d34
MA
202
203##
204# @STOP:
205#
206# Emitted when the virtual machine is stopped
207#
9bc6e893 208# Since: 0.12
0e201d34
MA
209#
210# Example:
211#
212# <- { "event": "STOP",
213# "timestamp": { "seconds": 1267041730, "microseconds": 281295 } }
0e201d34
MA
214##
215{ 'event': 'STOP' }
216
217##
218# @RESUME:
219#
220# Emitted when the virtual machine resumes execution
221#
9bc6e893 222# Since: 0.12
0e201d34
MA
223#
224# Example:
225#
226# <- { "event": "RESUME",
227# "timestamp": { "seconds": 1271770767, "microseconds": 582542 } }
0e201d34
MA
228##
229{ 'event': 'RESUME' }
230
231##
232# @SUSPEND:
233#
a937b6aa
MA
234# Emitted when guest enters a hardware suspension state, for example,
235# S3 state, which is sometimes called standby state
0e201d34
MA
236#
237# Since: 1.1
238#
239# Example:
240#
241# <- { "event": "SUSPEND",
242# "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
0e201d34
MA
243##
244{ 'event': 'SUSPEND' }
245
246##
247# @SUSPEND_DISK:
248#
a937b6aa
MA
249# Emitted when guest enters a hardware suspension state with data
250# saved on disk, for example, S4 state, which is sometimes called
251# hibernate state
0e201d34 252#
a937b6aa
MA
253# Note: QEMU shuts down (similar to event @SHUTDOWN) when entering
254# this state
0e201d34
MA
255#
256# Since: 1.2
257#
258# Example:
259#
37fa48a4
MA
260# <- { "event": "SUSPEND_DISK",
261# "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
0e201d34
MA
262##
263{ 'event': 'SUSPEND_DISK' }
264
265##
266# @WAKEUP:
267#
a937b6aa
MA
268# Emitted when the guest has woken up from suspend state and is
269# running
0e201d34
MA
270#
271# Since: 1.1
272#
273# Example:
274#
275# <- { "event": "WAKEUP",
276# "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
0e201d34
MA
277##
278{ 'event': 'WAKEUP' }
279
280##
281# @WATCHDOG:
282#
283# Emitted when the watchdog device's timer is expired
284#
285# @action: action that has been taken
286#
a937b6aa
MA
287# Note: If action is "reset", "shutdown", or "pause" the WATCHDOG
288# event is followed respectively by the RESET, SHUTDOWN, or STOP
289# events
0e201d34
MA
290#
291# Note: This event is rate-limited.
292#
9bc6e893 293# Since: 0.13
0e201d34
MA
294#
295# Example:
296#
297# <- { "event": "WATCHDOG",
298# "data": { "action": "reset" },
299# "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
0e201d34
MA
300##
301{ 'event': 'WATCHDOG',
14d53b4f 302 'data': { 'action': 'WatchdogAction' } }
0e201d34
MA
303
304##
14d53b4f 305# @WatchdogAction:
0e201d34 306#
a937b6aa
MA
307# An enumeration of the actions taken when the watchdog device's timer
308# is expired
0e201d34
MA
309#
310# @reset: system resets
311#
a937b6aa
MA
312# @shutdown: system shutdown, note that it is similar to @powerdown,
313# which tries to set to system status and notify guest
0e201d34
MA
314#
315# @poweroff: system poweroff, the emulator program exits
316#
317# @pause: system pauses, similar to @stop
318#
319# @debug: system enters debug state
320#
321# @none: nothing is done
322#
a937b6aa
MA
323# @inject-nmi: a non-maskable interrupt is injected into the first
324# VCPU (all VCPUS on x86) (since 2.4)
0e201d34
MA
325#
326# Since: 2.1
327##
14d53b4f 328{ 'enum': 'WatchdogAction',
0e201d34
MA
329 'data': [ 'reset', 'shutdown', 'poweroff', 'pause', 'debug', 'none',
330 'inject-nmi' ] }
331
e6dba048
AJ
332##
333# @RebootAction:
334#
335# Possible QEMU actions upon guest reboot
336#
c27025e0 337# @reset: Reset the VM
e6dba048 338#
a937b6aa
MA
339# @shutdown: Shutdown the VM and exit, according to the shutdown
340# action
e6dba048
AJ
341#
342# Since: 6.0
343##
344{ 'enum': 'RebootAction',
c27025e0 345 'data': [ 'reset', 'shutdown' ] }
e6dba048
AJ
346
347##
348# @ShutdownAction:
349#
350# Possible QEMU actions upon guest shutdown
351#
352# @poweroff: Shutdown the VM and exit
353#
f39057d5 354# @pause: pause the VM
e6dba048
AJ
355#
356# Since: 6.0
357##
358{ 'enum': 'ShutdownAction',
359 'data': [ 'poweroff', 'pause' ] }
360
c753e8e7
AJ
361##
362# @PanicAction:
363#
364# @none: Continue VM execution
365#
366# @pause: Pause the VM
367#
a937b6aa
MA
368# @shutdown: Shutdown the VM and exit, according to the shutdown
369# action
c27025e0 370#
a937b6aa
MA
371# @exit-failure: Shutdown the VM and exit with nonzero status (since
372# 7.1)
0882caf4 373#
c753e8e7
AJ
374# Since: 6.0
375##
376{ 'enum': 'PanicAction',
0882caf4 377 'data': [ 'pause', 'shutdown', 'exit-failure', 'none' ] }
c753e8e7 378
3da7a416
EB
379##
380# @watchdog-set-action:
381#
382# Set watchdog action
383#
384# Since: 2.11
385##
386{ 'command': 'watchdog-set-action', 'data' : {'action': 'WatchdogAction'} }
387
e6dba048
AJ
388##
389# @set-action:
390#
a937b6aa
MA
391# Set the actions that will be taken by the emulator in response to
392# guest events.
e6dba048
AJ
393#
394# @reboot: @RebootAction action taken on guest reboot.
395#
396# @shutdown: @ShutdownAction action taken on guest shutdown.
397#
c753e8e7
AJ
398# @panic: @PanicAction action taken on guest panic.
399#
a937b6aa
MA
400# @watchdog: @WatchdogAction action taken when watchdog timer expires
401# .
e6dba048
AJ
402#
403# Returns: Nothing on success.
404#
405# Since: 6.0
406#
407# Example:
408#
409# -> { "execute": "set-action",
410# "arguments": { "reboot": "shutdown",
411# "shutdown" : "pause",
c753e8e7 412# "panic": "pause",
e6dba048
AJ
413# "watchdog": "inject-nmi" } }
414# <- { "return": {} }
415##
416{ 'command': 'set-action',
417 'data': { '*reboot': 'RebootAction',
418 '*shutdown': 'ShutdownAction',
c753e8e7 419 '*panic': 'PanicAction',
e6dba048
AJ
420 '*watchdog': 'WatchdogAction' },
421 'allow-preconfig': true }
422
0e201d34
MA
423##
424# @GUEST_PANICKED:
425#
426# Emitted when guest OS panic is detected
427#
428# @action: action that has been taken, currently always "pause"
429#
430# @info: information about a panic (since 2.9)
431#
432# Since: 1.5
433#
434# Example:
435#
436# <- { "event": "GUEST_PANICKED",
1c4ec791
VT
437# "data": { "action": "pause" },
438# "timestamp": { "seconds": 1648245231, "microseconds": 900001 } }
0e201d34
MA
439##
440{ 'event': 'GUEST_PANICKED',
441 'data': { 'action': 'GuestPanicAction', '*info': 'GuestPanicInformation' } }
442
7dc58dee
ZP
443##
444# @GUEST_CRASHLOADED:
445#
446# Emitted when guest OS crash loaded is detected
447#
448# @action: action that has been taken, currently always "run"
449#
450# @info: information about a panic
451#
452# Since: 5.0
453#
454# Example:
455#
456# <- { "event": "GUEST_CRASHLOADED",
1c4ec791
VT
457# "data": { "action": "run" },
458# "timestamp": { "seconds": 1648245259, "microseconds": 893771 } }
7dc58dee
ZP
459##
460{ 'event': 'GUEST_CRASHLOADED',
461 'data': { 'action': 'GuestPanicAction', '*info': 'GuestPanicInformation' } }
462
0e201d34
MA
463##
464# @GuestPanicAction:
465#
466# An enumeration of the actions taken when guest OS panic is detected
467#
468# @pause: system pauses
469#
86bf13ae
MA
470# @poweroff: system powers off (since 2.8)
471#
472# @run: system continues to run (since 5.0)
473#
474# Since: 2.1
0e201d34
MA
475##
476{ 'enum': 'GuestPanicAction',
7dc58dee 477 'data': [ 'pause', 'poweroff', 'run' ] }
0e201d34
MA
478
479##
480# @GuestPanicInformationType:
481#
482# An enumeration of the guest panic information types
483#
4ada99ad
CB
484# @hyper-v: hyper-v guest panic information type
485#
486# @s390: s390 guest panic information type (Since: 2.12)
487#
0e201d34
MA
488# Since: 2.9
489##
490{ 'enum': 'GuestPanicInformationType',
4ada99ad 491 'data': [ 'hyper-v', 's390' ] }
0e201d34
MA
492
493##
494# @GuestPanicInformation:
495#
496# Information about a guest panic
497#
4ada99ad
CB
498# @type: Crash type that defines the hypervisor specific information
499#
0e201d34
MA
500# Since: 2.9
501##
502{'union': 'GuestPanicInformation',
503 'base': {'type': 'GuestPanicInformationType'},
504 'discriminator': 'type',
a937b6aa
MA
505 'data': {'hyper-v': 'GuestPanicInformationHyperV',
506 's390': 'GuestPanicInformationS390'}}
0e201d34
MA
507
508##
509# @GuestPanicInformationHyperV:
510#
511# Hyper-V specific guest panic information (HV crash MSRs)
512#
513# Since: 2.9
514##
515{'struct': 'GuestPanicInformationHyperV',
a937b6aa
MA
516 'data': {'arg1': 'uint64',
517 'arg2': 'uint64',
518 'arg3': 'uint64',
519 'arg4': 'uint64',
520 'arg5': 'uint64'}}
4ada99ad
CB
521
522##
523# @S390CrashReason:
524#
525# Reason why the CPU is in a crashed state.
526#
527# @unknown: no crash reason was set
528#
529# @disabled-wait: the CPU has entered a disabled wait state
530#
a937b6aa
MA
531# @extint-loop: clock comparator or cpu timer interrupt with new PSW
532# enabled for external interrupts
4ada99ad
CB
533#
534# @pgmint-loop: program interrupt with BAD new PSW
535#
a937b6aa
MA
536# @opint-loop: operation exception interrupt with invalid code at the
537# program interrupt new PSW
4ada99ad
CB
538#
539# Since: 2.12
540##
541{ 'enum': 'S390CrashReason',
542 'data': [ 'unknown',
543 'disabled-wait',
544 'extint-loop',
545 'pgmint-loop',
546 'opint-loop' ] }
547
548##
549# @GuestPanicInformationS390:
550#
551# S390 specific guest panic information (PSW)
552#
553# @core: core id of the CPU that crashed
a937b6aa 554#
4ada99ad 555# @psw-mask: control fields of guest PSW
a937b6aa 556#
4ada99ad 557# @psw-addr: guest instruction address
a937b6aa 558#
4ada99ad
CB
559# @reason: guest crash reason
560#
561# Since: 2.12
562##
563{'struct': 'GuestPanicInformationS390',
a937b6aa
MA
564 'data': {'core': 'uint32',
565 'psw-mask': 'uint64',
566 'psw-addr': 'uint64',
567 'reason': 'S390CrashReason'}}
77b285f7
ZP
568
569##
570# @MEMORY_FAILURE:
571#
572# Emitted when a memory failure occurs on host side.
573#
574# @recipient: recipient is defined as @MemoryFailureRecipient.
575#
a937b6aa
MA
576# @action: action that has been taken. action is defined as
577# @MemoryFailureAction.
77b285f7 578#
a937b6aa
MA
579# @flags: flags for MemoryFailureAction. action is defined as
580# @MemoryFailureFlags.
77b285f7
ZP
581#
582# Since: 5.2
583#
584# Example:
585#
586# <- { "event": "MEMORY_FAILURE",
587# "data": { "recipient": "hypervisor",
588# "action": "fatal",
05df03cf
VT
589# "flags": { "action-required": false,
590# "recursive": false } },
591# "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
77b285f7
ZP
592##
593{ 'event': 'MEMORY_FAILURE',
594 'data': { 'recipient': 'MemoryFailureRecipient',
595 'action': 'MemoryFailureAction',
596 'flags': 'MemoryFailureFlags'} }
597
598##
599# @MemoryFailureRecipient:
600#
601# Hardware memory failure occurs, handled by recipient.
602#
a937b6aa
MA
603# @hypervisor: memory failure at QEMU process address space. (none
604# guest memory, but used by QEMU itself).
77b285f7
ZP
605#
606# @guest: memory failure at guest memory,
607#
608# Since: 5.2
77b285f7
ZP
609##
610{ 'enum': 'MemoryFailureRecipient',
611 'data': [ 'hypervisor',
612 'guest' ] }
613
77b285f7
ZP
614##
615# @MemoryFailureAction:
616#
617# Actions taken by QEMU in response to a hardware memory failure.
618#
a937b6aa
MA
619# @ignore: the memory failure could be ignored. This will only be the
620# case for action-optional failures.
77b285f7 621#
a937b6aa
MA
622# @inject: memory failure occurred in guest memory, the guest enabled
623# MCE handling mechanism, and QEMU could inject the MCE into the
624# guest successfully.
77b285f7 625#
a937b6aa
MA
626# @fatal: the failure is unrecoverable. This occurs for
627# action-required failures if the recipient is the hypervisor;
628# QEMU will exit.
77b285f7 629#
a937b6aa
MA
630# @reset: the failure is unrecoverable but confined to the guest.
631# This occurs if the recipient is a guest guest which is not ready
632# to handle memory failures.
77b285f7
ZP
633#
634# Since: 5.2
77b285f7
ZP
635##
636{ 'enum': 'MemoryFailureAction',
637 'data': [ 'ignore',
638 'inject',
639 'fatal',
640 'reset' ] }
641
642##
643# @MemoryFailureFlags:
644#
645# Additional information on memory failures.
646#
647# @action-required: whether a memory failure event is action-required
a937b6aa 648# or action-optional (e.g. a failure during memory scrub).
77b285f7 649#
a937b6aa
MA
650# @recursive: whether the failure occurred while the previous failure
651# was still in progress.
77b285f7
ZP
652#
653# Since: 5.2
77b285f7
ZP
654##
655{ 'struct': 'MemoryFailureFlags',
656 'data': { 'action-required': 'bool',
657 'recursive': 'bool'} }
e2e69f6b
CQ
658
659##
660# @NotifyVmexitOption:
661#
662# An enumeration of the options specified when enabling notify VM exit
663#
a937b6aa
MA
664# @run: enable the feature, do nothing and continue if the notify VM
665# exit happens.
e2e69f6b 666#
a937b6aa
MA
667# @internal-error: enable the feature, raise a internal error if the
668# notify VM exit happens.
e2e69f6b
CQ
669#
670# @disable: disable the feature.
671#
672# Since: 7.2
673##
674{ 'enum': 'NotifyVmexitOption',
c27f4b66 675 'data': [ 'run', 'internal-error', 'disable' ] }