aboutsummaryrefslogtreecommitdiff
path: root/hw/misc/pvpanic.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/misc/pvpanic.c')
-rw-r--r--hw/misc/pvpanic.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/hw/misc/pvpanic.c b/hw/misc/pvpanic.c
index 80289ec..c83247c 100644
--- a/hw/misc/pvpanic.c
+++ b/hw/misc/pvpanic.c
@@ -15,7 +15,7 @@
#include "qemu/osdep.h"
#include "qemu/log.h"
#include "qemu/module.h"
-#include "sysemu/runstate.h"
+#include "system/runstate.h"
#include "hw/nvram/fw_cfg.h"
#include "hw/qdev-properties.h"
@@ -27,7 +27,7 @@ static void handle_event(int event)
{
static bool logged;
- if (event & ~(PVPANIC_PANICKED | PVPANIC_CRASH_LOADED) && !logged) {
+ if (event & ~PVPANIC_EVENTS && !logged) {
qemu_log_mask(LOG_GUEST_ERROR, "pvpanic: unknown event %#x.\n", event);
logged = true;
}
@@ -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 */