Received: from eggs.gnu.org ([2001:4830:134:3::10]:51124) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WO5XO-0002Hs-CN for qemu-devel@nongnu.org; Thu, 13 Mar 2014 09:19:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WO5XI-0004QP-ED for qemu-devel@nongnu.org; Thu, 13 Mar 2014 09:19:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51509) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WO5XI-0004QH-5Z for qemu-devel@nongnu.org; Thu, 13 Mar 2014 09:19:00 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s2DDIwjE008904 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 13 Mar 2014 09:18:59 -0400 From: Markus Armbruster References: <1394643643-27122-1-git-send-email-armbru@redhat.com> <53218BBC.8030108@redhat.com> Date: Thu, 13 Mar 2014 14:18:56 +0100 In-Reply-To: <53218BBC.8030108@redhat.com> (Paolo Bonzini's message of "Thu, 13 Mar 2014 11:43:08 +0100") Message-ID: <87a9cuw81r.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH] blockdev: Refuse to open encrypted image unless paused List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: kwolf@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com Paolo Bonzini 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.