Il 13/03/2014 16:00, Markus Armbruster ha scritto:
Paolo Bonzini <pbonz...@redhat.com> writes:

Il 13/03/2014 14:18, Markus Armbruster ha scritto:
Paolo Bonzini <pbonz...@redhat.com> writes:

Il 12/03/2014 18:00, Markus Armbruster ha scritto:
+    } else if (!runstate_check(RUN_STATE_PRELAUNCH)
+            && !runstate_check(RUN_STATE_PAUSED)) { /* HACK */

Why not "if (runstate_is_running())"?

The predicate actually wanted here is "monitor command 'cont' required
to get the guest running", because 'cont' is where the protection is.
My run state test is a crude approximation.


Got it.  Then you need to add at least a check for
"runstate_check(RUN_STATE_INMIGRATE)", otherwise you break incoming
migration.

You're right: main() goes from RUN_STATE_PRELAUNCH to
RUN_STATE_INMIGRATE right when it sees -incoming.

            Actually, I think only SAVE_VM/RESTORE_VM/DEBUG are
problematic, but I understand why you preferred a conservative
test (sufficient condition, not necessary).

Exactly.

You are singling out prelaunch and inmigrate because drive_init
will reset autostart to 0 for an encrypted image, right?

Yes.

Then with the check modified,

Reviewed-by: Paolo Bonzini <pbonz...@redhat.com>

Paolo

Reply via email to