* [Qemu-devel] [PATCH] savevm: qemu_savevm_state(): Drop stop VM logic
@ 2011-10-13 20:27 Luiz Capitulino
2011-10-14 1:33 ` Michael Roth
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Luiz Capitulino @ 2011-10-13 20:27 UTC (permalink / raw)
To: Kevin Wolf; +Cc: Paolo Bonzini, qemu-devel
qemu_savevm_state() has some logic to stop the VM and to (or not to)
resume it. But this seems to be a big noop, as qemu_savevm_state()
is only called by do_savevm() when the VM is already stopped.
So, let's drop qemu_savevm_state()'s stop VM logic.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
savevm.c | 7 -------
1 files changed, 0 insertions(+), 7 deletions(-)
diff --git a/savevm.c b/savevm.c
index bf4d0e7..abb4a60 100644
--- a/savevm.c
+++ b/savevm.c
@@ -1599,12 +1599,8 @@ void qemu_savevm_state_cancel(Monitor *mon, QEMUFile *f)
static int qemu_savevm_state(Monitor *mon, QEMUFile *f)
{
- int saved_vm_running;
int ret;
- saved_vm_running = runstate_is_running();
- vm_stop(RUN_STATE_SAVE_VM);
-
if (qemu_savevm_state_blocked(mon)) {
ret = -EINVAL;
goto out;
@@ -1626,9 +1622,6 @@ out:
if (qemu_file_has_error(f))
ret = -EIO;
- if (!ret && saved_vm_running)
- vm_start();
-
return ret;
}
--
1.7.7.rc3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] savevm: qemu_savevm_state(): Drop stop VM logic
2011-10-13 20:27 [Qemu-devel] [PATCH] savevm: qemu_savevm_state(): Drop stop VM logic Luiz Capitulino
@ 2011-10-14 1:33 ` Michael Roth
2011-10-14 8:49 ` Kevin Wolf
2011-10-14 11:27 ` Juan Quintela
2 siblings, 0 replies; 4+ messages in thread
From: Michael Roth @ 2011-10-14 1:33 UTC (permalink / raw)
To: Luiz Capitulino, Kevin Wolf; +Cc: Paolo Bonzini, qemu-devel
Heh, Anthony and I were puzzling over this just before your patch hit the list.
Looks good :)
Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>
On Thu, 13 Oct 2011 17:27:53 -0300, Luiz Capitulino <lcapitulino@redhat.com> wrote:
> qemu_savevm_state() has some logic to stop the VM and to (or not to)
> resume it. But this seems to be a big noop, as qemu_savevm_state()
> is only called by do_savevm() when the VM is already stopped.
>
> So, let's drop qemu_savevm_state()'s stop VM logic.
>
> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
> ---
> savevm.c | 7 -------
> 1 files changed, 0 insertions(+), 7 deletions(-)
>
> diff --git a/savevm.c b/savevm.c
> index bf4d0e7..abb4a60 100644
> --- a/savevm.c
> +++ b/savevm.c
> @@ -1599,12 +1599,8 @@ void qemu_savevm_state_cancel(Monitor *mon, QEMUFile *f)
>
> static int qemu_savevm_state(Monitor *mon, QEMUFile *f)
> {
> - int saved_vm_running;
> int ret;
>
> - saved_vm_running = runstate_is_running();
> - vm_stop(RUN_STATE_SAVE_VM);
> -
> if (qemu_savevm_state_blocked(mon)) {
> ret = -EINVAL;
> goto out;
> @@ -1626,9 +1622,6 @@ out:
> if (qemu_file_has_error(f))
> ret = -EIO;
>
> - if (!ret && saved_vm_running)
> - vm_start();
> -
> return ret;
> }
>
> --
> 1.7.7.rc3
>
>
--
Sincerely,
Mike Roth
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] savevm: qemu_savevm_state(): Drop stop VM logic
2011-10-13 20:27 [Qemu-devel] [PATCH] savevm: qemu_savevm_state(): Drop stop VM logic Luiz Capitulino
2011-10-14 1:33 ` Michael Roth
@ 2011-10-14 8:49 ` Kevin Wolf
2011-10-14 11:27 ` Juan Quintela
2 siblings, 0 replies; 4+ messages in thread
From: Kevin Wolf @ 2011-10-14 8:49 UTC (permalink / raw)
To: Luiz Capitulino; +Cc: Paolo Bonzini, qemu-devel
Am 13.10.2011 22:27, schrieb Luiz Capitulino:
> qemu_savevm_state() has some logic to stop the VM and to (or not to)
> resume it. But this seems to be a big noop, as qemu_savevm_state()
> is only called by do_savevm() when the VM is already stopped.
>
> So, let's drop qemu_savevm_state()'s stop VM logic.
>
> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] savevm: qemu_savevm_state(): Drop stop VM logic
2011-10-13 20:27 [Qemu-devel] [PATCH] savevm: qemu_savevm_state(): Drop stop VM logic Luiz Capitulino
2011-10-14 1:33 ` Michael Roth
2011-10-14 8:49 ` Kevin Wolf
@ 2011-10-14 11:27 ` Juan Quintela
2 siblings, 0 replies; 4+ messages in thread
From: Juan Quintela @ 2011-10-14 11:27 UTC (permalink / raw)
To: Luiz Capitulino; +Cc: Kevin Wolf, Paolo Bonzini, qemu-devel
Luiz Capitulino <lcapitulino@redhat.com> wrote:
> qemu_savevm_state() has some logic to stop the VM and to (or not to)
> resume it. But this seems to be a big noop, as qemu_savevm_state()
> is only called by do_savevm() when the VM is already stopped.
>
> So, let's drop qemu_savevm_state()'s stop VM logic.
>
> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-10-14 11:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-13 20:27 [Qemu-devel] [PATCH] savevm: qemu_savevm_state(): Drop stop VM logic Luiz Capitulino
2011-10-14 1:33 ` Michael Roth
2011-10-14 8:49 ` Kevin Wolf
2011-10-14 11:27 ` Juan Quintela
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).