From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57833) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJfWP-0008PA-NR for qemu-devel@nongnu.org; Mon, 27 Jul 2015 06:20:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZJfWL-00041T-T6 for qemu-devel@nongnu.org; Mon, 27 Jul 2015 06:20:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44016) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJfWL-000412-Em for qemu-devel@nongnu.org; Mon, 27 Jul 2015 06:20:33 -0400 References: <1437978359-17960-1-git-send-email-arei.gonglei@huawei.com> From: Paolo Bonzini Message-ID: <55B605EE.5050502@redhat.com> Date: Mon, 27 Jul 2015 12:20:30 +0200 MIME-Version: 1.0 In-Reply-To: <1437978359-17960-1-git-send-email-arei.gonglei@huawei.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] vhost-scsi: Fix mask index err in vhost_scsi_start List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: arei.gonglei@huawei.com, qemu-devel@nongnu.org Cc: Lu Lina On 27/07/2015 08:25, arei.gonglei@huawei.com wrote: > +++ b/hw/scsi/vhost-scsi.c > @@ -117,7 +117,7 @@ static int vhost_scsi_start(VHostSCSI *s) > * enabling/disabling irqfd. > */ > for (i = 0; i < s->dev.nvqs; i++) { > - vhost_virtqueue_mask(&s->dev, vdev, i, false); > + vhost_virtqueue_mask(&s->dev, vdev, s->dev.vq_index + i, false); > } > > return ret; Is this fixing an actual bug, or just using the API correctly? s->dev.vq_index is always 0, right? Paolo