qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/2] pvpanic: implement crashloaded event handling


From: Eric Blake
Subject: Re: [PATCH 2/2] pvpanic: implement crashloaded event handling
Date: Mon, 20 Jan 2020 13:12:31 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1

On 1/13/20 8:31 PM, zhenwei pi wrote:
Handle bit 1 write, then post event to monitor.

Suggested by Paolo, declear a new event, using GUEST_PANICKED could
cause upper layers to react by shutting down or rebooting the guest.

In advance for extention, add GuestPanicInformation in event message.

Signed-off-by: zhenwei pi <address@hidden>
---

+++ b/qapi/run-state.json
@@ -357,6 +357,26 @@
    'data': { 'action': 'GuestPanicAction', '*info': 'GuestPanicInformation' } }
##
+# @GUEST_CRASHLOADED:
+#
+# Emitted when guest OS crash loaded is detected
+#
+# @action: action that has been taken, currently always "run"
+#
+# @info: information about a panic (since 2.9)
+#
+# Since: 5.0

Paolo already caught that the 'since 2.9' makes no sense if the interface itself is since 5.0.

+#
+# Example:
+#
+# <- { "event": "GUEST_CRASHLOADED",
+#      "data": { "action": "run" } }
+#
+##
+{ 'event': 'GUEST_CRASHLOADED',
+  'data': { 'action': 'GuestPanicAction', '*info': 'GuestPanicInformation' } }
+
+##
  # @GuestPanicAction:
  #
  # An enumeration of the actions taken when guest OS panic is detected
@@ -366,7 +386,7 @@
  # Since: 2.1 (poweroff since 2.8)
  ##
  { 'enum': 'GuestPanicAction',
-  'data': [ 'pause', 'poweroff' ] }
+  'data': [ 'pause', 'poweroff', 'run' ] }

But the comment here could be updated to mention 'run' since 5.0, alongside poweroff since 2.8. Not the end of the world if we don't annotate it, though, since instrospection still shows the difference.


--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org




reply via email to

[Prev in Thread] Current Thread [Next in Thread]