qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] blockdev: Refuse to open encrypted image unless


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH] blockdev: Refuse to open encrypted image unless paused
Date: Thu, 13 Mar 2014 16:08:19 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

Il 13/03/2014 16:00, Markus Armbruster ha scritto:
Paolo Bonzini <address@hidden> writes:

Il 13/03/2014 14:18, Markus Armbruster ha scritto:
Paolo Bonzini <address@hidden> 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 <address@hidden>

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]