From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:40668) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Swwjl-0005oh-C2 for qemu-devel@nongnu.org; Thu, 02 Aug 2012 10:50:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Swwjb-0002cN-TC for qemu-devel@nongnu.org; Thu, 02 Aug 2012 10:50:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:13734) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Swwjb-0002c8-Gx for qemu-devel@nongnu.org; Thu, 02 Aug 2012 10:50:43 -0400 Date: Thu, 2 Aug 2012 11:51:17 -0300 From: Luiz Capitulino Message-ID: <20120802115117.50a61125@doriath.home> In-Reply-To: <501A84C8.4060508@redhat.com> References: <1343869374-23417-1-git-send-email-lcapitulino@redhat.com> <1343869374-23417-14-git-send-email-lcapitulino@redhat.com> <87y5lx5sqi.fsf@blackfin.pond.sub.org> <501A84C8.4060508@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 13/34] hmp: hmp_change(): don't rely on QERR_DEVICE_ENCRYPTED List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: kwolf@redhat.com, aliguori@us.ibm.com, qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com, Markus Armbruster , eblake@redhat.com On Thu, 02 Aug 2012 15:46:48 +0200 Paolo Bonzini wrote: > Il 02/08/2012 15:27, Markus Armbruster ha scritto: > >> > + bdev_list = qmp_query_block(NULL); > >> > + for (bdev = bdev_list; bdev; bdev = bdev->next) { > >> > + if (!strcmp(bdev->value->device, device) && > >> > + blockinfo_is_encrypted(bdev->value) && > >> > + !blockinfo_key_is_set(bdev->value)) { > >> > + hmp_change_ask_user_key(mon, bdev->value); > >> > + break; > >> > + } > >> > + } > > Is this anything that an external application can reproduce? Yes, that should be possible. But thinking a bit more about this, the real question is whether we want them to do it. I guess not, as the fact that qmp_bdrv_open_encrypted() doesn't close the bs on error is probably a bug. > Perhaps we need to keep QERR_DEVICE_ENCRYPTED even if libvirt does not > use it, or at least provide an alternative mechanism (e.g. an event) to > realize its effect. Yes, maybe that's better. hmp_cont() wouldn't change much though, as it still needs to figure out which device needs a key.