diff mbox

QMP: Emit Basic events

Message ID 20100126182508.3c7186b6@doriath (mailing list archive)
State New, archived
Headers show

Commit Message

Luiz Capitulino Jan. 26, 2010, 8:25 p.m. UTC
None
diff mbox

Patch

diff --git a/qemu-kvm.c b/qemu-kvm.c
index 1c34846..06706c9 100644
--- a/qemu-kvm.c
+++ b/qemu-kvm.c
@@ -17,6 +17,7 @@ 
 #include "block.h"
 #include "compatfd.h"
 #include "gdbstub.h"
+#include "monitor.h"
 
 #include "qemu-kvm.h"
 #include "libkvm.h"
@@ -2124,11 +2125,14 @@  int kvm_main_loop(void)
                 vm_stop(0);
             } else
                 break;
-        } else if (qemu_powerdown_requested())
+        } else if (qemu_powerdown_requested()) {
+            monitor_protocol_event(QEVENT_POWERDOWN, NULL);
             qemu_irq_raise(qemu_system_powerdown);
-        else if (qemu_reset_requested())
+        } else if (qemu_reset_requested()) {
+            monitor_protocol_event(QEVENT_RESET, NULL);
             qemu_kvm_system_reset();
-        else if (kvm_debug_cpu_requested) {
+        } else if (kvm_debug_cpu_requested) {
+            monitor_protocol_event(QEVENT_DEBUG, NULL);
             gdb_set_stop_cpu(kvm_debug_cpu_requested);
             vm_stop(EXCP_DEBUG);
             kvm_debug_cpu_requested = NULL;