[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 38/48] qmp: emit the WAKEUP event when the guest is
From: |
Luiz Capitulino |
Subject: |
[Qemu-devel] [PATCH 38/48] qmp: emit the WAKEUP event when the guest is put to run |
Date: |
Mon, 13 Aug 2012 16:48:59 -0300 |
Today, the WAKEUP event is emitted when a wakeup _request_ is made.
This could be the system_wakeup command, for example.
A better semantic would be to emit the event when the guest is
already running, as that's what matters in the end. This commit does
that change.
In theory, this could break compatibility. In practice, it shouldn't
happen though, as clients shouldn't rely on timing characteristics of
the events. That is, a client relying that the guest is not running
when the event arrives may break if the event arrives after the guest
is already running.
This commit also adds the missing documentation for the WAKEUP event.
Signed-off-by: Luiz Capitulino <address@hidden>
Acked-by: Gerd Hoffmann <address@hidden>
---
QMP/qmp-events.txt | 13 +++++++++++++
vl.c | 2 +-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/QMP/qmp-events.txt b/QMP/qmp-events.txt
index 9ba7079..10f69d1 100644
--- a/QMP/qmp-events.txt
+++ b/QMP/qmp-events.txt
@@ -264,6 +264,19 @@ Example:
}}
+WAKEUP
+------
+
+Emitted when the guest has woken up from S3 and is running.
+
+Data: None.
+
+Example:
+
+{ "event": "WATCHDOG",
+ "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
+
+
WATCHDOG
--------
diff --git a/vl.c b/vl.c
index 68fa0a0..97ab39f 100644
--- a/vl.c
+++ b/vl.c
@@ -1465,7 +1465,6 @@ void qemu_system_wakeup_request(WakeupReason reason)
return;
}
runstate_set(RUN_STATE_RUNNING);
- monitor_protocol_event(QEVENT_WAKEUP, NULL);
notifier_list_notify(&wakeup_notifiers, &reason);
wakeup_requested = 1;
qemu_notify_event();
@@ -1552,6 +1551,7 @@ static bool main_loop_should_exit(void)
cpu_synchronize_all_states();
qemu_system_reset(VMRESET_SILENT);
resume_all_vcpus();
+ monitor_protocol_event(QEVENT_WAKEUP, NULL);
}
if (qemu_powerdown_requested()) {
monitor_protocol_event(QEVENT_POWERDOWN, NULL);
--
1.7.11.2.249.g31c7954.dirty
- [Qemu-devel] [PATCH 17/48] block: block_int: include qerror.h, (continued)
- [Qemu-devel] [PATCH 17/48] block: block_int: include qerror.h, Luiz Capitulino, 2012/08/13
- [Qemu-devel] [PATCH 20/48] qapi: generate correct enum names for camel case enums, Luiz Capitulino, 2012/08/13
- [Qemu-devel] [PATCH 19/48] qapi: qapi-types.h: don't include qapi/qapi-types-core.h, Luiz Capitulino, 2012/08/13
- [Qemu-devel] [PATCH 18/48] hmp: hmp.h: include qdict.h, Luiz Capitulino, 2012/08/13
- [Qemu-devel] [PATCH 22/48] qapi-schema: add ErrorClass enum, Luiz Capitulino, 2012/08/13
- [Qemu-devel] [PATCH 28/48] error: drop unused functions, Luiz Capitulino, 2012/08/13
- [Qemu-devel] [PATCH 33/48] qerror: drop qerror_table and qerror_format(), Luiz Capitulino, 2012/08/13
- [Qemu-devel] [PATCH 34/48] error, qerror: drop QDict member, Luiz Capitulino, 2012/08/13
- [Qemu-devel] [PATCH 35/48] docs: writing-qmp-commands.txt: update error section, Luiz Capitulino, 2012/08/13
- [Qemu-devel] [PATCH 36/48] scripts: qapi-commands.py: qmp-commands.h: include qdict.h, Luiz Capitulino, 2012/08/13
- [Qemu-devel] [PATCH 38/48] qmp: emit the WAKEUP event when the guest is put to run,
Luiz Capitulino <=
- [Qemu-devel] [PATCH 37/48] qmp: don't emit the RESET event on wakeup from S3, Luiz Capitulino, 2012/08/13
- [Qemu-devel] [PATCH 42/48] qmp: introduce device-list-properties command, Luiz Capitulino, 2012/08/13
- [Qemu-devel] [PATCH 43/48] qapi: mark QOM commands stable, Luiz Capitulino, 2012/08/13
- [Qemu-devel] [PATCH 26/48] error: add error_get_class(), Luiz Capitulino, 2012/08/13
- [Qemu-devel] [PATCH 29/48] qmp: switch to the new error format on the wire, Luiz Capitulino, 2012/08/13
- [Qemu-devel] [PATCH 21/48] qapi: don't convert enum strings to lowercase, Luiz Capitulino, 2012/08/13
- [Qemu-devel] [PATCH 25/48] qerror: add proper ErrorClass value for QERR_ macros, Luiz Capitulino, 2012/08/13
- [Qemu-devel] [PATCH 48/48] target-ppc: add implementation of query-cpu-definitions (v2), Luiz Capitulino, 2012/08/13
- [Qemu-devel] [PATCH 24/48] error, qerror: add ErrorClass argument to error functions, Luiz Capitulino, 2012/08/13
- [Qemu-devel] [PATCH 47/48] target-i386: add implementation of query-cpu-definitions (v2), Luiz Capitulino, 2012/08/13