diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2018-12-19 14:34:17 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2018-12-19 14:34:17 +0000 |
commit | adf02c4419e9ac4b3d9a16efdb7e3089c19ae246 (patch) | |
tree | 64fa9e44b78ec9de53545f2b32f32eec550bcf45 /qapi | |
parent | e85c577158a2e8e252414959da9ef15c12eec63d (diff) | |
parent | ce1a1aec47877a281d69dbc2e65f86bfe8fea231 (diff) | |
download | qemu-adf02c4419e9ac4b3d9a16efdb7e3089c19ae246.zip qemu-adf02c4419e9ac4b3d9a16efdb7e3089c19ae246.tar.gz qemu-adf02c4419e9ac4b3d9a16efdb7e3089c19ae246.tar.bz2 |
Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2018-12-18' into staging
QAPI patches for 2018-12-18
# gpg: Signature made Tue 18 Dec 2018 07:20:11 GMT
# gpg: using RSA key 3870B400EB918653
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>"
# gpg: aka "Markus Armbruster <armbru@pond.sub.org>"
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653
* remotes/armbru/tags/pull-qapi-2018-12-18:
qapi: fix flat union on uncovered branches conditionals
qmp hmp: Make system_wakeup check wake-up support and run state
qga: update guest-suspend-ram and guest-suspend-hybrid descriptions
qmp: query-current-machine with wakeup-suspend-support
qmp: Split ShutdownCause host-qmp into quit and system-reset
qmp: Add reason to SHUTDOWN and RESET events
qapi: Turn ShutdownCause into QAPI enum
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'qapi')
-rw-r--r-- | qapi/misc.json | 32 | ||||
-rw-r--r-- | qapi/run-state.json | 44 |
2 files changed, 73 insertions, 3 deletions
diff --git a/qapi/misc.json b/qapi/misc.json index 8325e0d..24d20a8 100644 --- a/qapi/misc.json +++ b/qapi/misc.json @@ -1239,12 +1239,18 @@ ## # @system_wakeup: # -# Wakeup guest from suspend. Does nothing in case the guest isn't suspended. +# Wake up guest from suspend. If the guest has wake-up from suspend +# support enabled (wakeup-suspend-support flag from +# query-current-machine), wake-up guest from suspend if the guest is +# in SUSPENDED state. Return an error otherwise. # # Since: 1.1 # # Returns: nothing. # +# Note: prior to 4.0, this command does nothing in case the guest +# isn't suspended. +# # Example: # # -> { "execute": "system_wakeup" } @@ -2013,6 +2019,30 @@ { 'command': 'query-machines', 'returns': ['MachineInfo'] } ## +# @CurrentMachineParams: +# +# Information describing the running machine parameters. +# +# @wakeup-suspend-support: true if the machine supports wake up from +# suspend +# +# Since: 4.0 +## +{ 'struct': 'CurrentMachineParams', + 'data': { 'wakeup-suspend-support': 'bool'} } + +## +# @query-current-machine: +# +# Return information on the current virtual machine. +# +# Returns: CurrentMachineParams +# +# Since: 4.0 +## +{ 'command': 'query-current-machine', 'returns': 'CurrentMachineParams' } + +## # @CpuDefinitionInfo: # # Virtual CPU definition. diff --git a/qapi/run-state.json b/qapi/run-state.json index 332e448..d7477cd 100644 --- a/qapi/run-state.json +++ b/qapi/run-state.json @@ -60,6 +60,42 @@ 'guest-panicked', 'colo', 'preconfig' ] } ## +# @ShutdownCause: +# +# An enumeration of reasons for a Shutdown. +# +# @none: No shutdown request pending +# +# @host-error: An error prevents further use of guest +# +# @host-qmp-quit: Reaction to the QMP command 'quit' +# +# @host-qmp-system-reset: Reaction to the QMP command 'system_reset' +# +# @host-signal: Reaction to a signal, such as SIGINT +# +# @host-ui: Reaction to a UI event, like window close +# +# @guest-shutdown: Guest shutdown/suspend request, via ACPI or other +# hardware-specific means +# +# @guest-reset: Guest reset request, and command line turns that into +# a shutdown +# +# @guest-panic: Guest panicked, and command line turns that into a shutdown +# +# @subsystem-reset: Partial guest reset that does not trigger QMP events and +# ignores --no-reboot. This is useful for sanitizing +# hypercalls on s390 that are used during kexec/kdump/boot +# +## +{ 'enum': 'ShutdownCause', + # Beware, shutdown_caused_by_guest() depends on enumeration order + 'data': [ 'none', 'host-error', 'host-qmp-quit', 'host-qmp-system-reset', + 'host-signal', 'host-ui', 'guest-shutdown', 'guest-reset', + 'guest-panic', 'subsystem-reset'] } + +## # @StatusInfo: # # Information about VCPU run state @@ -107,6 +143,8 @@ # a guest-initiated ACPI shutdown request or other hardware-specific action) # rather than a host request (such as sending qemu a SIGINT). (since 2.10) # +# @reason: The @ShutdownCause which resulted in the SHUTDOWN. (since 4.0) +# # Note: If the command-line option "-no-shutdown" has been specified, qemu will # not exit, and a STOP event will eventually follow the SHUTDOWN event # @@ -118,7 +156,7 @@ # "timestamp": { "seconds": 1267040730, "microseconds": 682951 } } # ## -{ 'event': 'SHUTDOWN', 'data': { 'guest': 'bool' } } +{ 'event': 'SHUTDOWN', 'data': { 'guest': 'bool', 'reason': 'ShutdownCause' } } ## # @POWERDOWN: @@ -146,6 +184,8 @@ # rather than a host request (such as the QMP command system_reset). # (since 2.10) # +# @reason: The @ShutdownCause of the RESET. (since 4.0) +# # Since: 0.12.0 # # Example: @@ -154,7 +194,7 @@ # "timestamp": { "seconds": 1267041653, "microseconds": 9518 } } # ## -{ 'event': 'RESET', 'data': { 'guest': 'bool' } } +{ 'event': 'RESET', 'data': { 'guest': 'bool', 'reason': 'ShutdownCause' } } ## # @STOP: |