aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2012-02-23 13:45:26 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2012-02-24 13:36:04 -0600
commit53370b78ecfe3fdff89a8dd7db73a0a95aefc14f (patch)
tree57cfb4774c9903c47b9c3b0a3a129b63ce6dbaa3 /vl.c
parent6595abc04486ef9694b8717b8eea43ccb990bff9 (diff)
suspend: add qmp events
Send qmp events on suspend and wakeup so libvirt has a chance to track the vm state. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/vl.c b/vl.c
index 90baa2a62b..e1a1e89fa6 100644
--- a/vl.c
+++ b/vl.c
@@ -1416,6 +1416,7 @@ static void qemu_system_suspend(void)
{
pause_all_vcpus();
notifier_list_notify(&suspend_notifiers, NULL);
+ monitor_protocol_event(QEVENT_SUSPEND, NULL);
is_suspended = true;
}
@@ -1442,6 +1443,7 @@ void qemu_system_wakeup_request(WakeupReason reason)
if (!(wakeup_reason_mask & (1 << reason))) {
return;
}
+ monitor_protocol_event(QEVENT_WAKEUP, NULL);
notifier_list_notify(&wakeup_notifiers, &reason);
reset_requested = 1;
qemu_notify_event();