aboutsummaryrefslogtreecommitdiff
path: root/hw/misc
diff options
context:
space:
mode:
Diffstat (limited to 'hw/misc')
-rw-r--r--hw/misc/pvpanic.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/hw/misc/pvpanic.c b/hw/misc/pvpanic.c
index d65ac86478..4ebda7872a 100644
--- a/hw/misc/pvpanic.c
+++ b/hw/misc/pvpanic.c
@@ -21,11 +21,13 @@
#include "hw/qdev-properties.h"
#include "hw/misc/pvpanic.h"
-/* The bit of supported pv event */
+/* The bit of supported pv event, TODO: include uapi header and remove this */
#define PVPANIC_F_PANICKED 0
+#define PVPANIC_F_CRASHLOADED 1
/* The pv event value */
#define PVPANIC_PANICKED (1 << PVPANIC_F_PANICKED)
+#define PVPANIC_CRASHLOADED (1 << PVPANIC_F_CRASHLOADED)
#define ISA_PVPANIC_DEVICE(obj) \
OBJECT_CHECK(PVPanicState, (obj), TYPE_PVPANIC)
@@ -34,7 +36,7 @@ static void handle_event(int event)
{
static bool logged;
- if (event & ~PVPANIC_PANICKED && !logged) {
+ if (event & ~(PVPANIC_PANICKED | PVPANIC_CRASHLOADED) && !logged) {
qemu_log_mask(LOG_GUEST_ERROR, "pvpanic: unknown event %#x.\n", event);
logged = true;
}
@@ -43,6 +45,11 @@ static void handle_event(int event)
qemu_system_guest_panicked(NULL);
return;
}
+
+ if (event & PVPANIC_CRASHLOADED) {
+ qemu_system_guest_crashloaded(NULL);
+ return;
+ }
}
#include "hw/isa/isa.h"