aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--qapi/run-state.json14
-rw-r--r--system/runstate.c1
2 files changed, 15 insertions, 0 deletions
diff --git a/qapi/run-state.json b/qapi/run-state.json
index f8773f2..5ac0fec 100644
--- a/qapi/run-state.json
+++ b/qapi/run-state.json
@@ -463,6 +463,20 @@
'data': { 'action': 'GuestPanicAction', '*info': 'GuestPanicInformation' } }
##
+# @GUEST_PVSHUTDOWN:
+#
+# Emitted when guest submits a shutdown request via pvpanic interface
+#
+# Since: 9.1
+#
+# Example:
+#
+# <- { "event": "GUEST_PVSHUTDOWN",
+# "timestamp": { "seconds": 1648245259, "microseconds": 893771 } }
+##
+{ 'event': 'GUEST_PVSHUTDOWN' }
+
+##
# @GuestPanicAction:
#
# An enumeration of the actions taken when guest OS panic is detected
diff --git a/system/runstate.c b/system/runstate.c
index fc49fd3..c833316 100644
--- a/system/runstate.c
+++ b/system/runstate.c
@@ -586,6 +586,7 @@ void qemu_system_guest_crashloaded(GuestPanicInformation *info)
void qemu_system_guest_pvshutdown(void)
{
+ qapi_event_send_guest_pvshutdown();
qemu_system_shutdown_request(SHUTDOWN_CAUSE_GUEST_SHUTDOWN);
}