On Tue, 4 Oct 2011 14:04:45 +0200 Paolo Bonzini <pbonz...@redhat.com> wrote:
> Trying to migrate a paused machine fails. The reason is that > the RSTATE_PRE_MIGRATE is reached with vm_stop, and this > transition is eaten when the vm is already paused. This patch > fixes the problem by always going through runstate_set and > always notifying the new state. > > Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> As the discussion on this subject is taking too long, I'll apply this one. The only problem is that it doesn't fully fix the problem: we need a transition from paused to finish-migrate (yes, I've clarified the name in another series). Could you fix that and resend please? > --- > cpus.c | 2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-) > > diff --git a/cpus.c b/cpus.c > index 8978779..eab8ff6 100644 > --- a/cpus.c > +++ b/cpus.c > @@ -128,6 +128,8 @@ static void do_vm_stop(RunState state) > qemu_aio_flush(); > bdrv_flush_all(); > monitor_protocol_event(QEVENT_STOP, NULL); > + } else { > + runstate_set(state); > } > } >