From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60179) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJv5E-00018q-6V for qemu-devel@nongnu.org; Mon, 27 Jul 2015 22:57:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZJv5B-0006mg-Fs for qemu-devel@nongnu.org; Mon, 27 Jul 2015 22:57:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33745) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJv5B-0006kq-Ab for qemu-devel@nongnu.org; Mon, 27 Jul 2015 22:57:33 -0400 Message-ID: <55B6EF97.8000100@redhat.com> Date: Tue, 28 Jul 2015 10:57:27 +0800 From: Jason Wang MIME-Version: 1.0 References: <1437990561-22134-1-git-send-email-jasowang@redhat.com> <1437990561-22134-3-git-send-email-jasowang@redhat.com> <55B607C7.9070705@redhat.com> <20150727142456-mutt-send-email-mst@redhat.com> In-Reply-To: <20150727142456-mutt-send-email-mst@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH V4 2/3] virtio-blk: fail get_features when both scsi and 1.0 were set List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" , Paolo Bonzini Cc: cornelia.huck@de.ibm.com, qemu-devel@nongnu.org On 07/27/2015 07:26 PM, Michael S. Tsirkin wrote: > On Mon, Jul 27, 2015 at 12:28:23PM +0200, Paolo Bonzini wrote: >> >> On 27/07/2015 11:49, Jason Wang wrote: >>> + if (__virtio_has_feature(features, VIRTIO_F_VERSION_1)) { >> No double underscores in userspace code. Longstanding so it can be >> fixed after 2.4 is out---but please remember to do it. >> >>> + if (s->conf.scsi) { >>> + error_setg(errp, "Virtio 1.0 does not support scsi passthrough!"); >> Unclear error message, as one would expect SCSI passthrough not to work >> anyway for e.g. a disk backed by a file. > Right - so I suggested: > Virtio modern does not support scsi passthrough - please set disable-modern=on or switch to virtio-scsi. > With that change - ACK? I've considered this, but a little problem is 'disable-modern' only works for pci. >> It's not a big deal as long as you will disable VIRTIO_BLK_F_SCSI by >> default in the same release that enables VIRTIO_F_VERSION_1 by default. >> >> Paolo >>> + return 0; >>> + } >>> + virtio_add_feature(&features, VIRTIO_F_ANY_LAYOUT); >>> + } else { >>> + virtio_add_feature(&features, VIRTIO_BLK_F_SCSI); >>> + }