Received: from [140.186.70.92] (port=54031 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q4sIg-0001l4-CE for qemu-devel@nongnu.org; Wed, 30 Mar 2011 06:06:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q4sId-0001NS-Kt for qemu-devel@nongnu.org; Wed, 30 Mar 2011 06:06:54 -0400 Received: from mail-vx0-f173.google.com ([209.85.220.173]:47796) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q4sId-0001NI-Fg for qemu-devel@nongnu.org; Wed, 30 Mar 2011 06:06:51 -0400 Received: by vxb41 with SMTP id 41so988374vxb.4 for ; Wed, 30 Mar 2011 03:06:51 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <1301425482-8722-1-git-send-email-stefanha@linux.vnet.ibm.com> Date: Wed, 30 Mar 2011 11:06:50 +0100 Message-ID: Subject: Re: [Qemu-devel] [PATCH v2 0/3] block: Correct size across CD-ROM media change From: Stefan Hajnoczi Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: Kevin Wolf , Anthony Liguori , Stefan Hajnoczi , Juan Quintela , qemu-devel@nongnu.org, Ryan Harper , Amit Shah On Wed, Mar 30, 2011 at 9:33 AM, Markus Armbruster wrot= e: > Stefan Hajnoczi writes: > >> This patch series fixes two Linux host CD-ROM pass-through bugs in QEMU. >> >> After applying these patches it is possible to pass-through a Linux host= CD-ROM >> completely. =A0The guest can eject from software or the physical eject b= utton can >> be pressed on the drive. =A0The guest can detect this and newly inserted= media >> are noticed. =A0There is no need to issue any QEMU monitor 'eject' or 'c= hange' >> commands because the host CD-ROM is completely "passed through". > > Things can get confusing here, as "eject" is an overloaded term :) > > Let me try to preempt such confusion. =A0We have three separate actions t= o > consider: OS opening and closing the tray, and QEMU monitor commands > "eject" and "change", and the user inserting/removing media from a > physical tray. > > On bare metal, OS open/close tray affects the physical tray the obvious > way. =A0The user can insert/remove media while the tray is open. > > A virtual CD-ROM is backed by a QEMU block device (the things "info > block" shows). =A0The block device can be empty (seen by the gues OS as > "no media"), or it can be connected to a file. =A0Monitor commands "eject= " > and "change" manipulate that connection. > > Guest OS open/close tray affects the virtual tray the obvious way. =A0In > particular, if the OS opens, then closes the tray, it gets the same > media back, unless the user changed it[*]. > > Normally, a block device's file is an image file. =A0Monitor commands > "eject" and "change" are seen by the guest OS as media change. > > Besides image files, we can also use host block devices. =A0This adds > another way to change media: The user can insert/remove physical media > while the physical tray is open. > > Regardless, monitor commands "eject" and "change" still work, and are > still seen by the guest OS as media change. I agree with your description. These patches improve Linux host CD-ROM pass-through. They do not help ISO CD-ROM weirdness but I'm interested in seeing what CD-ROM issues you're investigating. Stefan