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 /include | |
parent | e85c577158a2e8e252414959da9ef15c12eec63d (diff) | |
parent | ce1a1aec47877a281d69dbc2e65f86bfe8fea231 (diff) |
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 'include')
-rw-r--r-- | include/sysemu/sysemu.h | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h index 8d6095d98b..c8efdeb376 100644 --- a/include/sysemu/sysemu.h +++ b/include/sysemu/sysemu.h @@ -31,26 +31,6 @@ VMChangeStateEntry *qemu_add_vm_change_state_handler(VMChangeStateHandler *cb, void qemu_del_vm_change_state_handler(VMChangeStateEntry *e); void vm_state_notify(int running, RunState state); -/* Enumeration of various causes for shutdown. */ -typedef enum ShutdownCause { - SHUTDOWN_CAUSE_NONE, /* No shutdown request pending */ - SHUTDOWN_CAUSE_HOST_ERROR, /* An error prevents further use of guest */ - SHUTDOWN_CAUSE_HOST_QMP, /* Reaction to a QMP command, like 'quit' */ - SHUTDOWN_CAUSE_HOST_SIGNAL, /* Reaction to a signal, such as SIGINT */ - SHUTDOWN_CAUSE_HOST_UI, /* Reaction to UI event, like window close */ - SHUTDOWN_CAUSE_GUEST_SHUTDOWN,/* Guest shutdown/suspend request, via - ACPI or other hardware-specific means */ - SHUTDOWN_CAUSE_GUEST_RESET, /* Guest reset request, and command line - turns that into a shutdown */ - SHUTDOWN_CAUSE_GUEST_PANIC, /* Guest panicked, and command line turns - that into a shutdown */ - SHUTDOWN_CAUSE_SUBSYSTEM_RESET,/* Partial guest reset that does not trigger - QMP events and ignores --no-reboot. This - is useful for sanitize hypercalls on s390 - that are used during kexec/kdump/boot */ - SHUTDOWN_CAUSE__MAX, -} ShutdownCause; - static inline bool shutdown_caused_by_guest(ShutdownCause cause) { return cause >= SHUTDOWN_CAUSE_GUEST_SHUTDOWN; @@ -74,9 +54,11 @@ void qemu_exit_preconfig_request(void); void qemu_system_reset_request(ShutdownCause reason); void qemu_system_suspend_request(void); void qemu_register_suspend_notifier(Notifier *notifier); -void qemu_system_wakeup_request(WakeupReason reason); +bool qemu_wakeup_suspend_enabled(void); +void qemu_system_wakeup_request(WakeupReason reason, Error **errp); void qemu_system_wakeup_enable(WakeupReason reason, bool enabled); void qemu_register_wakeup_notifier(Notifier *notifier); +void qemu_register_wakeup_support(void); void qemu_system_shutdown_request(ShutdownCause reason); void qemu_system_powerdown_request(void); void qemu_register_powerdown_notifier(Notifier *notifier); |