diff options
author | Thomas Weißschuh <thomas@t-8ch.de> | 2024-05-27 08:27:51 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2024-07-01 17:16:04 -0400 |
commit | 6269086b0179e3d70750672174ed7fbd29ac7eaa (patch) | |
tree | ad1438aa0e574c63ae30e525f1c3b133de6b70cc /system | |
parent | 462dc749c110fe8e41ae0fb554b9bc2f2671e973 (diff) |
hw/misc/pvpanic: add support for normal shutdowns
Shutdown requests are normally hardware dependent.
By extending pvpanic to also handle shutdown requests, guests can
submit such requests with an easily implementable and cross-platform
mechanism.
Acked-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
Message-Id: <20240527-pvpanic-shutdown-v8-5-5a28ec02558b@t-8ch.de>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'system')
-rw-r--r-- | system/runstate.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/system/runstate.c b/system/runstate.c index ec32e270cb..fc49fd3e61 100644 --- a/system/runstate.c +++ b/system/runstate.c @@ -584,6 +584,11 @@ void qemu_system_guest_crashloaded(GuestPanicInformation *info) qapi_free_GuestPanicInformation(info); } +void qemu_system_guest_pvshutdown(void) +{ + qemu_system_shutdown_request(SHUTDOWN_CAUSE_GUEST_SHUTDOWN); +} + void qemu_system_reset_request(ShutdownCause reason) { if (reboot_action == REBOOT_ACTION_SHUTDOWN && |