diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2020-12-15 21:24:31 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2020-12-15 21:24:31 +0000 |
commit | af3f37319cb1e1ca0c42842ecdbd1bcfc64a4b6f (patch) | |
tree | 101575a319b7c2f95e75ef44cf1483a87a564226 /qapi | |
parent | 657ee88ef3ec55c3a6164da88c11a6640ca7507c (diff) | |
parent | bbd2d5a8120771ec59b86a80a1f51884e0a26e53 (diff) | |
download | qemu-af3f37319cb1e1ca0c42842ecdbd1bcfc64a4b6f.zip qemu-af3f37319cb1e1ca0c42842ecdbd1bcfc64a4b6f.tar.gz qemu-af3f37319cb1e1ca0c42842ecdbd1bcfc64a4b6f.tar.bz2 |
Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into staging
* New -action option and set-action QMP command (Alejandro)
* More vl.c cleanup (myself with help from Daniel and Igor)
* Remove deprecated options (Philippe, Thomas)
* Dirty bitmap fix (Zenghui)
* icount caching speedup (Pavel)
* SCSI race fix (Maxim)
* Remove pre-GCC 4.8 code (Marc-André)
# gpg: Signature made Tue 15 Dec 2020 17:53:24 GMT
# gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83
# gpg: issuer "pbonzini@redhat.com"
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full]
# gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full]
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1
# Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83
* remotes/bonzini-gitlab/tags/for-upstream: (45 commits)
build: -no-pie is no functional linker flag
scripts/git.orderfile: Keep files with .inc extension sorted
compiler.h: remove QEMU_GNUC_PREREQ
linux-user: remove GNUC check
compiler: remove GNUC check
xen: remove GNUC check
poison: remove GNUC check
compiler.h: explicit case for Clang printf attribute
virtiofsd: replace _Static_assert with QEMU_BUILD_BUG_ON
tests: remove GCC < 4 fallbacks
qemu-plugin.h: remove GCC < 4
compiler.h: remove GCC < 3 __builtin_expect fallback
accel/tcg: Remove special case for GCC < 4.6
qemu/atomic: Drop special case for unsupported compiler
hw/core: Restrict 'fw-path-provider.c' to system mode emulation
docs: set CONFDIR when running sphinx
vl: rename local variable in configure_accelerators
qemu-option: pass QemuOptsList to opts_accepts_any
qemu-option: simplify search for end of key
kvm: Take into account the unaligned section size when preparing bitmap
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
# Conflicts:
# softmmu/vl.c
Diffstat (limited to 'qapi')
-rw-r--r-- | qapi/control.json | 3 | ||||
-rw-r--r-- | qapi/qmp-dispatch.c | 5 | ||||
-rw-r--r-- | qapi/run-state.json | 79 |
3 files changed, 78 insertions, 9 deletions
diff --git a/qapi/control.json b/qapi/control.json index 9c8a513..2615d51 100644 --- a/qapi/control.json +++ b/qapi/control.json @@ -219,7 +219,8 @@ # -> { "execute": "quit" } # <- { "return": {} } ## -{ 'command': 'quit' } +{ 'command': 'quit', + 'allow-preconfig': true } ## # @MonitorMode: diff --git a/qapi/qmp-dispatch.c b/qapi/qmp-dispatch.c index 9a2d7dd..0a2b20a 100644 --- a/qapi/qmp-dispatch.c +++ b/qapi/qmp-dispatch.c @@ -167,10 +167,7 @@ QDict *qmp_dispatch(const QmpCommandList *cmds, QObject *request, goto out; } - if (runstate_check(RUN_STATE_PRECONFIG) && - !(cmd->options & QCO_ALLOW_PRECONFIG)) { - error_setg(&err, "The command '%s' isn't permitted in '%s' state", - cmd->name, RunState_str(RUN_STATE_PRECONFIG)); + if (!qmp_command_available(cmd, &err)) { goto out; } diff --git a/qapi/run-state.json b/qapi/run-state.json index b2f77cb..1f3b329 100644 --- a/qapi/run-state.json +++ b/qapi/run-state.json @@ -50,15 +50,12 @@ # @colo: guest is paused to save/restore VM state under colo checkpoint, # VM can not get into this state unless colo capability is enabled # for migration. (since 2.8) -# @preconfig: QEMU is paused before board specific init callback is executed. -# The state is reachable only if the --preconfig CLI option is used. -# (Since 3.0) ## { 'enum': 'RunState', 'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused', 'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm', 'running', 'save-vm', 'shutdown', 'suspended', 'watchdog', - 'guest-panicked', 'colo', 'preconfig' ] } + 'guest-panicked', 'colo' ] } ## # @ShutdownCause: @@ -329,6 +326,46 @@ 'inject-nmi' ] } ## +# @RebootAction: +# +# Possible QEMU actions upon guest reboot +# +# @none: Reset the VM +# +# @shutdown: Shutdown the VM and exit +# +# Since: 6.0 +## +{ 'enum': 'RebootAction', + 'data': [ 'none', 'shutdown' ] } + +## +# @ShutdownAction: +# +# Possible QEMU actions upon guest shutdown +# +# @poweroff: Shutdown the VM and exit +# +# @pause: pause the VM# +# +# Since: 6.0 +## +{ 'enum': 'ShutdownAction', + 'data': [ 'poweroff', 'pause' ] } + +## +# @PanicAction: +# +# @none: Continue VM execution +# +# @pause: Pause the VM +# +# Since: 6.0 +## +{ 'enum': 'PanicAction', + 'data': [ 'poweroff', 'pause', 'none' ] } + +## # @watchdog-set-action: # # Set watchdog action @@ -338,6 +375,40 @@ { 'command': 'watchdog-set-action', 'data' : {'action': 'WatchdogAction'} } ## +# @set-action: +# +# Set the actions that will be taken by the emulator in response to guest +# events. +# +# @reboot: @RebootAction action taken on guest reboot. +# +# @shutdown: @ShutdownAction action taken on guest shutdown. +# +# @panic: @PanicAction action taken on guest panic. +# +# @watchdog: @WatchdogAction action taken when watchdog timer expires . +# +# Returns: Nothing on success. +# +# Since: 6.0 +# +# Example: +# +# -> { "execute": "set-action", +# "arguments": { "reboot": "shutdown", +# "shutdown" : "pause", +# "panic": "pause", +# "watchdog": "inject-nmi" } } +# <- { "return": {} } +## +{ 'command': 'set-action', + 'data': { '*reboot': 'RebootAction', + '*shutdown': 'ShutdownAction', + '*panic': 'PanicAction', + '*watchdog': 'WatchdogAction' }, + 'allow-preconfig': true } + +## # @GUEST_PANICKED: # # Emitted when guest OS panic is detected |