From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mt3Xs-0003Xr-Na for qemu-devel@nongnu.org; Wed, 30 Sep 2009 14:04:56 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mt3Xo-0003Ua-7Z for qemu-devel@nongnu.org; Wed, 30 Sep 2009 14:04:56 -0400 Received: from [199.232.76.173] (port=51012 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mt3Xn-0003UO-Tz for qemu-devel@nongnu.org; Wed, 30 Sep 2009 14:04:52 -0400 Received: from mail2.shareable.org ([80.68.89.115]:40423) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Mt3Xn-00024g-EQ for qemu-devel@nongnu.org; Wed, 30 Sep 2009 14:04:51 -0400 Date: Wed, 30 Sep 2009 19:04:43 +0100 From: Jamie Lokier Subject: Re: [Qemu-devel] Re: [PATCH 0/2] fix virtio_blk serial pci config breakage Message-ID: <20090930180443.GB2515@shareable.org> References: <4AB7A01A.3000206@redhat.com> <200909301049.08434.rusty@rustcorp.com.au> <4AC2BF9C.9050403@codemonkey.ws> <200909302130.33454.rusty@rustcorp.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200909302130.33454.rusty@rustcorp.com.au> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Rusty Russell Cc: john cooper , "Michael S. Tsirkin" , john cooper , qemu-devel@nongnu.org, Avi Kivity , jens.axboe@oracle.com, Vadim Rozenfeld Rusty Russell wrote: > On Wed, 30 Sep 2009 11:47:00 am Anthony Liguori wrote: > > Rusty Russell wrote: > > > On Wed, 30 Sep 2009 06:25:39 am Anthony Liguori wrote: > > > > > >> virtio-blk isn't an ATA device so why pretend like it is? > ... > > That's an argument to implement the HDIO_GET_IDENTITY ioctl in the Linux > > virtio-blk driver. That's a totally reasonable thing to do. > > Your second sentence contradicts your first here. If it's reasonable to > imitate ATA in Linux, it's reasonable to imitate ATA in virtio. > > Using an existing standard should always be the default; one should need a > compelling reason *not* to do so. In practice, (1) that code already exists > in kvm, and (2) it makes the Linux implementation trivial. > > So, what are the real arguments? > (1) Some fields are redundant (eg. geometry) with existing fields already. > (2) Future fields will have to decide whether to use ATA IDENTIFY or normal > features, > (3) We don't know enough about ATA IDENTIFY to do a decent job of filling > it in. > > I can buy (1), but I still have to deal with (2) and (3) if they're inside > the virtio_blk driver anyway. > > Anything else? (4) Putting it into the virtio_blk driver means another duplicate implementation, and it might have to be duplicated another time in the Windows virtio_blk driver too, if there's a Windows generic equivalent to HDIO_GET_IDENTITY (I don't know if there is though). (5) When the host's backing driver is itself a disk implementing the ATA command, would you ever want the guest to see all details of the identity page as close as possible to the host device sometimes? I.e. is virtio_blk a way to accelerate block I/O to a host device, or a way to abstract it to the bare minimum? (6) Why don't we use the SCSI identity page instead? Presumably that's already in qemu/kvm too, for SCSI and USB disks :-) -- Jamie