From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46835) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c3nmi-0006ny-Cs for qemu-devel@nongnu.org; Mon, 07 Nov 2016 12:32:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c3nmf-0002Qe-AY for qemu-devel@nongnu.org; Mon, 07 Nov 2016 12:32:40 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53148) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c3nmf-0002Px-4b for qemu-devel@nongnu.org; Mon, 07 Nov 2016 12:32:37 -0500 References: <1478539385-11249-1-git-send-email-felipe@nutanix.com> <30DD3181-A1B5-4411-BDC8-2DF176782C20@nutanix.com> From: Paolo Bonzini Message-ID: Date: Mon, 7 Nov 2016 18:32:32 +0100 MIME-Version: 1.0 In-Reply-To: <30DD3181-A1B5-4411-BDC8-2DF176782C20@nutanix.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] vhost-scsi: Update 'ioeventfd_started' with host notifiers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Felipe Franciosi , Stefan Hajnoczi , "Michael S. Tsirkin" Cc: "qemu-devel@nongnu.org" On 07/11/2016 18:26, Felipe Franciosi wrote: > > @@ -95,6 +95,7 @@ static int vhost_scsi_start(VHostSCSI *s) > > if (ret < 0) { > > return ret; > > } > > + VIRTIO_BUS(qbus)->ioeventfd_started = true; > > I'm not sure if it's safe to do this from > vhost_dev_disable/enable_notifiers() directly. If you'd rather this > is fixed there, please let me know and I'll send a v2. This e-mail is > basically to flag a problem which I recently came across when working > on vhost-user-scsi. Basically my code stopped working and I didn't > know why, so I rolled back to test a traditional vhost-scsi on master > and found this. > > I have also not tested vhost-sock, but I imagine it might suffer from > the same issue (even if it doesn't manifest itself this easily). Any > other cases you can think of? Hi Felipe, can you try overriding start_ioeventfd and stop_ioeventfd (like ad07cd69ecaffbaa015459a46975ab32e50df805 for regular virtio-scsi), so that they point to vhost_scsi_start and vhost_scsi_stop? You should not even need vhost_scsi_set_status anymore. I'm not sure however why vhost-vsock checks vdev->vm_running, but otherwise the same should apply to vhost-vsock as well. Thanks, Paolo