From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=34198 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q7Nlv-0007g9-Hf for qemu-devel@nongnu.org; Wed, 06 Apr 2011 04:07:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q7Nlt-0000wI-CN for qemu-devel@nongnu.org; Wed, 06 Apr 2011 04:07:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:11066) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q7Nlt-0000v1-0r for qemu-devel@nongnu.org; Wed, 06 Apr 2011 04:07:25 -0400 Date: Wed, 6 Apr 2011 13:37:12 +0530 From: Amit Shah Subject: Re: [Qemu-devel] [PATCH v2 3/3] raw-posix: Re-open host CD-ROM after media change Message-ID: <20110406080712.GD20671@amit-x200.redhat.com> References: <4D99C61E.3080600@redhat.com> <4D99C9ED.3020602@codemonkey.ws> <4D99CC74.9070703@redhat.com> <20110405064120.GB2872@amit-x200.redhat.com> <4D9AC940.5000502@redhat.com> <20110405080900.GE2872@amit-x200.redhat.com> <4D9ADA36.8040306@redhat.com> <20110405091203.GC27661@amit-x200.redhat.com> <4D9ADE2A.2020201@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4D9ADE2A.2020201@redhat.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: Kevin Wolf , Stefan Hajnoczi , Juan Quintela , libvir-list@redhat.com, Stefan Hajnoczi , qemu-devel@nongnu.org, Ryan Harper On (Tue) 05 Apr 2011 [12:17:30], Avi Kivity wrote: > >Guest kernel bug: CDROM change event missed, so the the revalidate > >call isn't made, which causes stale data (like disc size) to be used > >on newer media. > > > >qemu bug: We don't handle the GET_EVENT_STATUS_NOTIFICATION command > >from guests (which is a mandatory command acc. to scsi spec) which the > >guest uses to detect CDROM changes. Once this command is implemented, > >QEMU sends the required info the guest needs to detect CDROM changes. > >I have this implemented locally (also sent as RFC PATCH 2/3 in the > >'cdrom bug roundup' thread. > > > >So: even if qemu is updated to handle this command, the guest won't > >work correctly since it misses the event. > > Okay. We aren't responsible for guest kernel bugs, especially those > which apply to real hardware (we should make more effort for virtio > bugs). It's enough that we fix qemu here. Actually I forgot about this already: it is possible for a workaround in qemu: inject the event twice instead of once. ie, if the spec says 'SENSE_UNIT_ATTENTION' needs to be reset if some cmd is successful, don't reset it the first time. That's how I confirmed the kernel bug last week. It is such a horrible hack that I didn't want to keep it around at all :-) Amit