diff mbox

[3/3] replay: disable default snapshot for record/replay

Message ID 20170131115745.5244.36762.stgit@PASHA-ISP (mailing list archive)
State New, archived
Headers show

Commit Message

Pavel Dovgalyuk Jan. 31, 2017, 11:57 a.m. UTC
This patch disables setting '-snapshot' option on by default
in record/replay mode. This is needed for creating vmstates in record
and replay modes.

Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
---
 vl.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Comments

Kevin Wolf Feb. 22, 2017, 10:28 a.m. UTC | #1
Am 31.01.2017 um 12:57 hat Pavel Dovgalyuk geschrieben:
> This patch disables setting '-snapshot' option on by default
> in record/replay mode. This is needed for creating vmstates in record
> and replay modes.
> 
> Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>

Looks good the me. (Though obviously, record/replay mode really comes
with a lot more restrictions for block devices that aren't checked yet.
But it's a start.)

Kevin
diff mbox

Patch

diff --git a/vl.c b/vl.c
index c6fc5c9..671fc04 100644
--- a/vl.c
+++ b/vl.c
@@ -3129,7 +3129,13 @@  int main(int argc, char **argv, char **envp)
                 drive_add(IF_PFLASH, -1, optarg, PFLASH_OPTS);
                 break;
             case QEMU_OPTION_snapshot:
-                snapshot = 1;
+                {
+                    Error *blocker = NULL;
+                    snapshot = 1;
+                    error_setg(&blocker, QERR_REPLAY_NOT_SUPPORTED,
+                               "-snapshot");
+                    replay_add_blocker(blocker);
+                }
                 break;
             case QEMU_OPTION_hdachs:
                 {