Received: from eggs.gnu.org ([140.186.70.92]:46367) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RyMIy-0004DZ-9H for qemu-devel@nongnu.org; Fri, 17 Feb 2012 06:48:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RyMIs-0001vG-Mr for qemu-devel@nongnu.org; Fri, 17 Feb 2012 06:48:48 -0500 Received: from mx1.redhat.com ([209.132.183.28]:27783) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RyMIs-0001v1-4c for qemu-devel@nongnu.org; Fri, 17 Feb 2012 06:48:42 -0500 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 q1HBmfVd000589 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 17 Feb 2012 06:48:41 -0500 From: Markus Armbruster References: <1329331347-11232-1-git-send-email-lcapitulino@redhat.com> <1329331347-11232-5-git-send-email-lcapitulino@redhat.com> <20120216111447.2160fa63@doriath.home> <4F3D054C.9020603@redhat.com> <20120216121015.7ccaa462@doriath.home> <4F3E2CD0.50506@redhat.com> <4F3E340A.5050602@redhat.com> Date: Fri, 17 Feb 2012 12:48:39 +0100 In-Reply-To: <4F3E340A.5050602@redhat.com> (Kevin Wolf's message of "Fri, 17 Feb 2012 12:03:38 +0100") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] [PATCH 4/4] qmp: add BLOCK_MEDIUM_EJECT event List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Paolo Bonzini , eblake@redhat.com, qemu-devel@nongnu.org, Luiz Capitulino Kevin Wolf writes: > Am 17.02.2012 11:32, schrieb Paolo Bonzini: >> On 02/16/2012 03:10 PM, Luiz Capitulino wrote: >>> We have two external entities: the guest and the mngt app. It seems to me that >>> the guest is seeing each step at a time. >> >> The guest is seeing each step separately, but that is managed by the >> device model (which sends two separate error codes: a NOT READY for >> opening the tray, and a UNIT ATTENTION for closing the tray and changing >> medium) rather than by the monitor. > > But this separation isn't set in stone. Maybe it would make sense to > move the logic into the block layer. Of course, then it would have to > meet the needs of floppies as well. And whatever other device with removable media comes up. We should not move device-specific stuff from device models into the block layer. The block layer is fat enough as it is. And it's not meant for sharing code among device models. There are better ways to do that.