From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57523) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZFJ6q-0002Xn-47 for qemu-devel@nongnu.org; Wed, 15 Jul 2015 05:36:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZFJ6p-0001D9-7L for qemu-devel@nongnu.org; Wed, 15 Jul 2015 05:36:12 -0400 Message-ID: <55A61A70.4090109@redhat.com> Date: Wed, 15 Jul 2015 16:31:44 +0800 From: Jason Wang MIME-Version: 1.0 References: <1436938201-16766-1-git-send-email-jasowang@redhat.com> <1436938201-16766-3-git-send-email-jasowang@redhat.com> <55A61261.7010401@redhat.com> In-Reply-To: <55A61261.7010401@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH V2 2/5] virtio-blk: advertise scsi only when scsi is set List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , qemu-devel@nongnu.org Cc: kwolf@redhat.com, cornelia.huck@de.ibm.com, qemu-block@nongnu.org, stefanha@redhat.com, mst@redhat.com On 07/15/2015 03:57 PM, Paolo Bonzini wrote: > > On 15/07/2015 07:29, Jason Wang wrote: >> Cc: Stefan Hajnoczi >> Cc: Kevin Wolf >> Cc: qemu-block@nongnu.org >> Signed-off-by: Jason Wang >> --- >> hw/block/virtio-blk.c | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >> >> diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c >> index 4c27974..761d763 100644 >> --- a/hw/block/virtio-blk.c >> +++ b/hw/block/virtio-blk.c >> @@ -731,7 +731,9 @@ static uint64_t virtio_blk_get_features(VirtIODevice *vdev, uint64_t features, >> virtio_add_feature(&features, VIRTIO_BLK_F_GEOMETRY); >> virtio_add_feature(&features, VIRTIO_BLK_F_TOPOLOGY); >> virtio_add_feature(&features, VIRTIO_BLK_F_BLK_SIZE); >> - virtio_add_feature(&features, VIRTIO_BLK_F_SCSI); >> + if (s->conf.scsi) { >> + virtio_add_feature(&features, VIRTIO_BLK_F_SCSI); >> + } > This must only be done for newer machine types only, or you change guest > ABI for scsi=off. Effectively you have to split it in two properties, > "scsi" and "always_set_f_scsi". > > Paolo And always_set_f_scsi is true only for legacy machine types?