[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 04/22] savevm: do_loadvm(): Always resume the VM
From: |
Luiz Capitulino |
Subject: |
[Qemu-devel] [PATCH 04/22] savevm: do_loadvm(): Always resume the VM |
Date: |
Tue, 20 Apr 2010 18:09:34 -0300 |
do_loadvm(), which implements the 'loadvm' Monitor command, pauses
the emulation to load the saved VM, however it will only resume
it if the loading succeeds.
In other words, if the user issues 'loadvm' and it fails, the
end result will be an error message and a paused VM.
This seems an undesirable side effect to me because, most of the
time, if a Monitor command fails the best thing we can do is to
leave the VM as it were before the command was executed.
FIXME: This will try to run a potentially corrupted image, the
solution is to split load_vmstate() in two and only keep
the VM paused if qemu_loadvm_state() fails.
Signed-off-by: Luiz Capitulino <address@hidden>
---
monitor.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/monitor.c b/monitor.c
index 975e77c..542c858 100644
--- a/monitor.c
+++ b/monitor.c
@@ -2472,8 +2472,11 @@ static void do_loadvm(Monitor *mon, const QDict *qdict)
vm_stop(0);
- if (load_vmstate(name) >= 0 && saved_vm_running)
+ load_vmstate(name);
+
+ if (saved_vm_running) {
vm_start();
+ }
}
int monitor_get_fd(Monitor *mon, const char *fdname)
--
1.7.1.rc1.12.ga6018
- [Qemu-devel] [PATCH 07/22] qemu-error: Introduce get_errno_string(), (continued)
- [Qemu-devel] [PATCH 07/22] qemu-error: Introduce get_errno_string(), Luiz Capitulino, 2010/04/20
- Re: [Qemu-devel] [PATCH 07/22] qemu-error: Introduce get_errno_string(), Daniel P. Berrange, 2010/04/21
- Re: [Qemu-devel] [PATCH 07/22] qemu-error: Introduce get_errno_string(), Kevin Wolf, 2010/04/21
- Re: [Qemu-devel] [PATCH 07/22] qemu-error: Introduce get_errno_string(), malc, 2010/04/21
- Re: [Qemu-devel] [PATCH 07/22] qemu-error: Introduce get_errno_string(), Luiz Capitulino, 2010/04/21
- Re: [Qemu-devel] [PATCH 07/22] qemu-error: Introduce get_errno_string(), Daniel P. Berrange, 2010/04/21
- Re: [Qemu-devel] [PATCH 07/22] qemu-error: Introduce get_errno_string(), Luiz Capitulino, 2010/04/21
- Re: [Qemu-devel] [PATCH 07/22] qemu-error: Introduce get_errno_string(), Markus Armbruster, 2010/04/21
- Re: [Qemu-devel] [PATCH 07/22] qemu-error: Introduce get_errno_string(), Luiz Capitulino, 2010/04/22
[Qemu-devel] [PATCH 06/22] savevm: load_vmstate(): Improve error check, Luiz Capitulino, 2010/04/20
[Qemu-devel] [PATCH 04/22] savevm: do_loadvm(): Always resume the VM,
Luiz Capitulino <=
- [Qemu-devel] Re: [PATCH 04/22] savevm: do_loadvm(): Always resume the VM, Juan Quintela, 2010/04/20
- [Qemu-devel] Re: [PATCH 04/22] savevm: do_loadvm(): Always resume the VM, Luiz Capitulino, 2010/04/20
- [Qemu-devel] Re: [PATCH 04/22] savevm: do_loadvm(): Always resume the VM, Juan Quintela, 2010/04/21
- [Qemu-devel] Re: [PATCH 04/22] savevm: do_loadvm(): Always resume the VM, Luiz Capitulino, 2010/04/21
- [Qemu-devel] Re: [PATCH 04/22] savevm: do_loadvm(): Always resume the VM, Juan Quintela, 2010/04/21
- [Qemu-devel] Re: [PATCH 04/22] savevm: do_loadvm(): Always resume the VM, Kevin Wolf, 2010/04/21
- [Qemu-devel] Re: [PATCH 04/22] savevm: do_loadvm(): Always resume the VM, Luiz Capitulino, 2010/04/22
[Qemu-devel] Re: [PATCH 04/22] savevm: do_loadvm(): Always resume the VM, Kevin Wolf, 2010/04/21