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>
This commit is contained in:
Thomas Weißschuh 2024-05-27 08:27:51 +02:00 committed by Michael S. Tsirkin
parent 462dc749c1
commit 6269086b01
4 changed files with 14 additions and 1 deletions

View file

@ -41,6 +41,11 @@ static void handle_event(int event)
qemu_system_guest_crashloaded(NULL);
return;
}
if (event & PVPANIC_SHUTDOWN) {
qemu_system_guest_pvshutdown();
return;
}
}
/* return supported events on read */