qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Reset system before loadvm
@ 2011-06-11  9:05 Jan Kiszka
  2011-06-12 17:13 ` Avi Kivity
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Jan Kiszka @ 2011-06-11  9:05 UTC (permalink / raw)
  To: Luiz Capitulino, qemu-devel

From: Jan Kiszka <jan.kiszka@siemens.com>

In case we load the vmstate during incoming migration, we start from a
clean, default machine state as we went through system reset before. But
if we load from a snapshot, the machine can be in any state. That can
cause troubles if loading an older image which does not carry all state
information the executing QEMU requires. Almost no device takes care of
this scenario.

However, fixing this is trivial. We just need to issue a system reset
during loadvm as well.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 savevm.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/savevm.c b/savevm.c
index 98b2422..5db01aa 100644
--- a/savevm.c
+++ b/savevm.c
@@ -2074,6 +2074,7 @@ int load_vmstate(const char *name)
         return -EINVAL;
     }
 
+    qemu_system_reset();
     ret = qemu_loadvm_state(f);
 
     qemu_fclose(f);
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-06-15 14:32 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-11  9:05 [Qemu-devel] [PATCH] Reset system before loadvm Jan Kiszka
2011-06-12 17:13 ` Avi Kivity
2011-06-14  6:19   ` Jan Kiszka
2011-06-14 10:50     ` Avi Kivity
2011-06-14 10:56       ` Jan Kiszka
2011-06-14 11:14         ` Avi Kivity
2011-06-14 15:45           ` Luiz Capitulino
2011-06-12 17:42 ` Peter Maydell
2011-06-14  6:16   ` Jan Kiszka
2011-06-14 16:29 ` [Qemu-devel] [PATCH 1/2] Allow silent system resets Jan Kiszka
2011-06-15 14:32   ` Luiz Capitulino
2011-06-14 16:29 ` [Qemu-devel] [PATCH v2 2/2] Reset system before loadvm Jan Kiszka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).