pvpanic: Emit GUEST_PVSHUTDOWN QMP event on pvpanic shutdown signal
authorAlejandro Jimenez <alejandro.j.jimenez@oracle.com>
Mon, 27 May 2024 06:27:52 +0000 (08:27 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 1 Jul 2024 21:16:04 +0000 (17:16 -0400)
commit8db1f7be788b23f8eca189fe4546298ed387e9cb
treef6d33bad23cadad45c1fd2668f0c483f3ff241c0
parent6269086b0179e3d70750672174ed7fbd29ac7eaa
pvpanic: Emit GUEST_PVSHUTDOWN QMP event on pvpanic shutdown signal

Emit a QMP event on receiving a PVPANIC_SHUTDOWN event. Even though a typical
SHUTDOWN event will be sent, it will be indistinguishable from a shutdown
originating from other cases (e.g. KVM exit due to KVM_SYSTEM_EVENT_SHUTDOWN)
that also issue the guest-shutdown cause.
A management layer application can detect the new GUEST_PVSHUTDOWN event to
determine if the guest is using the pvpanic interface to request shutdowns.

Signed-off-by: Alejandro Jimenez <alejandro.j.jimenez@oracle.com>
Message-Id: <20240527-pvpanic-shutdown-v8-6-5a28ec02558b@t-8ch.de>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
qapi/run-state.json
system/runstate.c