summaryrefslogtreecommitdiff
path: root/include/sysemu
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2017-05-15 16:41:12 -0500
committerMarkus Armbruster <armbru@redhat.com>2017-05-23 13:28:17 +0200
commit802f045a5f61b781df55e4492d896b4d20503ba7 (patch)
tree69a69ba0835eb19dfa9d4f06944ed09def8d2e20 /include/sysemu
parentaedbe19297907143f17b733a7ff0e0534377bed1 (diff)
downloadqemu-802f045a5f61b781df55e4492d896b4d20503ba7.tar.gz
shutdown: Preserve shutdown cause through replay
With the recent addition of ShutdownCause, we want to be able to pass a cause through any shutdown request, and then faithfully replay that cause when later replaying the same sequence. The easiest way is to expand the reply event mechanism to track a series of values for EVENT_SHUTDOWN, one corresponding to each value of ShutdownCause. We are free to change the replay stream as needed, since there are already no guarantees about being able to use a replay stream by any other version of qemu than the one that generated it. The cause is not actually fed back until the next patch changes the signature for requesting a shutdown; a TODO marks that upcoming change. Yes, this uses the gcc/clang extension of a ranged case label, but this is not the first time we've used non-C99 constructs. Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Message-Id: <20170515214114.15442-4-eblake@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'include/sysemu')
-rw-r--r--include/sysemu/replay.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/sysemu/replay.h b/include/sysemu/replay.h
index f1c0712795..fa14d0ec0b 100644
--- a/include/sysemu/replay.h
+++ b/include/sysemu/replay.h
@@ -13,6 +13,7 @@
*/
#include "qapi-types.h"
+#include "sysemu.h"
/* replay clock kinds */
enum ReplayClockKind {
@@ -98,7 +99,7 @@ int64_t replay_read_clock(ReplayClockKind kind);
/* Events */
/*! Called when qemu shutdown is requested. */
-void replay_shutdown_request(void);
+void replay_shutdown_request(ShutdownCause cause);
/*! Should be called at check points in the execution.
These check points are skipped, if they were not met.
Saves checkpoint in the SAVE mode and validates in the PLAY mode.