diff options
| author | Daniil Tatianin <d-tatianin@yandex-team.ru> | 2025-06-10 00:25:45 +0300 |
|---|---|---|
| committer | Michael S. Tsirkin <mst@redhat.com> | 2025-07-14 09:16:40 -0400 |
| commit | 260f826cf8f2fe54f3cf4de541d761cf616e15ea (patch) | |
| tree | e416379aa52267bf5bc7ac48a69e23e41725c913 /include/system/runstate.h | |
| parent | 9f749129e2629b19f424df106c92c5a5647e396c (diff) | |
| download | focaccia-qemu-260f826cf8f2fe54f3cf4de541d761cf616e15ea.tar.gz focaccia-qemu-260f826cf8f2fe54f3cf4de541d761cf616e15ea.zip | |
softmmu/runstate: add a way to detect force shutdowns
This can be useful for devices that might take too long to shut down gracefully, but may have a way to shutdown quickly otherwise if needed or explicitly requested by a force shutdown. For now we only consider SIGTERM or the QMP quit() command a force shutdown, since those bypass the guest entirely and are equivalent to pulling the power plug. Signed-off-by: Daniil Tatianin <d-tatianin@yandex-team.ru> Message-Id: <20250609212547.2859224-2-d-tatianin@yandex-team.ru> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/system/runstate.h')
| -rw-r--r-- | include/system/runstate.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/system/runstate.h b/include/system/runstate.h index fdd5c4a517..b406a3960e 100644 --- a/include/system/runstate.h +++ b/include/system/runstate.h @@ -107,6 +107,7 @@ void qemu_system_vmstop_request(RunState reason); void qemu_system_vmstop_request_prepare(void); bool qemu_vmstop_requested(RunState *r); ShutdownCause qemu_shutdown_requested_get(void); +bool qemu_force_shutdown_requested(void); ShutdownCause qemu_reset_requested_get(void); void qemu_system_killed(int signal, pid_t pid); void qemu_system_reset(ShutdownCause reason); |