From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K8NHQ-00086M-E1 for qemu-devel@nongnu.org; Mon, 16 Jun 2008 18:34:28 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K8NHO-00083k-0F for qemu-devel@nongnu.org; Mon, 16 Jun 2008 18:34:27 -0400 Received: from [199.232.76.173] (port=40309 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K8NHN-00083e-SN for qemu-devel@nongnu.org; Mon, 16 Jun 2008 18:34:25 -0400 Received: from mail2.shareable.org ([80.68.89.115]:38053) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1K8NHN-0001MY-G6 for qemu-devel@nongnu.org; Mon, 16 Jun 2008 18:34:25 -0400 Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from ) id 1K8NHL-0007rS-L7 for qemu-devel@nongnu.org; Mon, 16 Jun 2008 23:34:23 +0100 Date: Mon, 16 Jun 2008 23:34:23 +0100 From: Jamie Lokier Subject: Re: [Qemu-devel][PATCH] Send unit_attention on cd-rom not_ready to ready transition Message-ID: <20080616223423.GB29899@shareable.org> References: <482AF0D3.4010508@novell.com> <18518.40135.80334.281645@mariner.uk.xensource.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <18518.40135.80334.281645@mariner.uk.xensource.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org > > Patch sends a UNIT_ATTENTION(6), MEDIUM_MAY_HAVE_CHANGED(0x28) sense > > when cdrom transitions from not ready to ready. > ... > > Patch applies to SVN revision 4456. > > I have checked that this code compiles, and it seems to make sense > (although I haven't double-checked the SCSI specification to check > whether this is the right place to send that UNIT ATTENTION message). Is this expected to fix the following? Running Windows XP guest, in the QEMU monitor I do "change ide1-cd0 none", then a little while later, "change ide1-cd0 newfile.iso". Interestingly, Windows XP _does_ show the CD (drive D:) change from having contents to being not present (after the first change command). But after the second change command, Windows XP shows it changes to having contents again - but the _old_ contents of the drive! Using the "eject" QEMU monitor command doesn't help. However, using the eject menu option from within Windows XP itself, then changing the CD image QEMU's monitor - that does work and it shows the new contents. I'm thinking perhaps XP caches the disk contents, and even though it sees the CD transition from present to not-present and back, it does not flush it's cache for some (bizarre) reason. Is this patch expected to fix this, so issuing the "change" command in QEMU's monitor will cause XP to show the new contents? Does that imply _all_ CD drives issue the error shown in this patch? Thanks, -- Jamie