From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:43227) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RLs3X-0007Z1-9p for qemu-devel@nongnu.org; Thu, 03 Nov 2011 03:49:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RLs3V-0002Uk-9a for qemu-devel@nongnu.org; Thu, 03 Nov 2011 03:49:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:25165) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RLs3U-0002UO-U1 for qemu-devel@nongnu.org; Thu, 03 Nov 2011 03:49:45 -0400 Message-ID: <4EB24790.7000102@redhat.com> Date: Thu, 03 Nov 2011 08:49:36 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <9744301311355@192.168.2.69> In-Reply-To: <9744301311355@192.168.2.69> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Do you have a use for a tester of virtio-scsi with CD drives ? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Thomas Schmitt Cc: kwolf@redhat.com, stefanha@gmail.com, qemu-devel@nongnu.org On 11/02/2011 10:22 PM, Thomas Schmitt wrote: > Hi, > > i wrote: >>> So how is this altered to 0x12 in the further course of processing ? > > Paolo Bonzini wrote: >> Because you're using an *IDE* (ATAPI) CD-ROM, not SCSI. See hw/ide/atapi.c. > > You convinced me. > But this does not explain yet the difference in behavior of > both groups of IDE DVD-ROMs. Why are those of -drive if=scsi empty ? They are not "of -drive if=scsi". They are "of -cdrom", and unlike the SCSI ones they are always present, even if no -cdrom is given (you can use -nodefaults to remove all default devices, including the IDE CD-ROM). So if you specified "-drive if=scsi" *and* "-cdrom", you'd get two non-empty drives. >> Ok, in your counting I should have written 20 for IDE (0x12 + page number + >> page size) and 22 for SCSI (0x14 + page number + page size). > > Why the distinction by transport bus ? Mode page 2Ah is a matter > of the drive alone. MMC is independent of the bus. It's just an artefact of having two separate implementations for ATAPI and SCSI. > I did not yet find out, why the IDE drive emulation emits a Mode Data > Length of 0x22. With Page Length 0x12 it should have been 0x1a. > 8 too many. Yeah, looks like all the case MODE_PAGE_R_W_ERROR: /* error recovery */ cpu_to_ube16(&buf[0], 16 + 6); should have "- 2" instead of "+ 6". Paolo