aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorThomas Weißschuh <thomas@t-8ch.de>2024-05-27 08:27:51 +0200
committerMichael S. Tsirkin <mst@redhat.com>2024-07-01 17:16:04 -0400
commit6269086b0179e3d70750672174ed7fbd29ac7eaa (patch)
treead1438aa0e574c63ae30e525f1c3b133de6b70cc /system
parent462dc749c110fe8e41ae0fb554b9bc2f2671e973 (diff)
downloadqemu-6269086b0179e3d70750672174ed7fbd29ac7eaa.zip
qemu-6269086b0179e3d70750672174ed7fbd29ac7eaa.tar.gz
qemu-6269086b0179e3d70750672174ed7fbd29ac7eaa.tar.bz2
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.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/system/runstate.c b/system/runstate.c
index ec32e27..fc49fd3 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 &&