From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55965) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIahn-00018w-HP for qemu-devel@nongnu.org; Thu, 30 Jun 2016 08:04:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bIahj-0001Ik-Ca for qemu-devel@nongnu.org; Thu, 30 Jun 2016 08:04:26 -0400 Received: from mx-v6.kamp.de ([2a02:248:0:51::16]:36372 helo=mx01.kamp.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIahj-0001IL-2m for qemu-devel@nongnu.org; Thu, 30 Jun 2016 08:04:23 -0400 References: <1467287567-2632-1-git-send-email-cornelia.huck@de.ibm.com> From: Peter Lieven Message-ID: <57750ABD.50102@kamp.de> Date: Thu, 30 Jun 2016 14:04:13 +0200 MIME-Version: 1.0 In-Reply-To: <1467287567-2632-1-git-send-email-cornelia.huck@de.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2] virtio: Fix setting up host notifiers for vhost List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cornelia Huck , qemu-devel@nongnu.org Cc: mst@redhat.com, famz@redhat.com, stefanha@redhat.com, jasowang@redhat.com, marcandre.lureau@gmail.com, pbonzini@redhat.com Am 30.06.2016 um 13:52 schrieb Cornelia Huck: > When setting up host notifiers, virtio_bus_set_host_notifier() > simply switches the handler. This will only work, however, if > the ioeventfd has already been setup; this is true for dataplane, > but not for vhost, and will completely break things if the > ioeventfd is disabled for the device. > > Fix this by starting the ioeventfd on assign if that has not > happened before, and only switch the handler if the ioeventfd > has really been started. > > While we're at it, also fixup the unsetting path of > set_host_notifier_internal(). This fixes also iSCSI + dataplane. Peter.