From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56368) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHa5Q-0004oC-8p for qemu-devel@nongnu.org; Thu, 05 Sep 2013 09:59:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VHa5J-0004PR-DW for qemu-devel@nongnu.org; Thu, 05 Sep 2013 09:59:04 -0400 Received: from mail-ea0-x235.google.com ([2a00:1450:4013:c01::235]:56690) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHa5J-0004PE-7G for qemu-devel@nongnu.org; Thu, 05 Sep 2013 09:58:57 -0400 Received: by mail-ea0-f181.google.com with SMTP id d10so933568eaj.40 for ; Thu, 05 Sep 2013 06:58:56 -0700 (PDT) Date: Thu, 5 Sep 2013 15:58:54 +0200 From: Stefan Hajnoczi Message-ID: <20130905135854.GA5190@stefanha-thinkpad.redhat.com> References: <1378296975-17661-1-git-send-email-cornelia.huck@de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1378296975-17661-1-git-send-email-cornelia.huck@de.ibm.com> Subject: Re: [Qemu-devel] [PATCH RFC] dataplane: Fix startup race. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cornelia Huck Cc: qemu-devel@nongnu.org On Wed, Sep 04, 2013 at 02:16:15PM +0200, Cornelia Huck wrote: > Avoid trying to setup dataplane again if dataplane setup is already in > progress. This may happen if an eventfd is triggered during setup. > > I saw this occasionally with an experimental s390 irqfd implementation: > > virtio_blk_handle_output > -> virtio_blk_data_plane_start > -> virtio_ccw_set_host_notifier > ... > -> virtio_queue_set_host_notifier_fd_handler > -> virtio_queue_host_notifier_read > -> virtio_queue_notify_vq > -> virtio_blk_handle_output > -> virtio_blk_data_plane_start > -> vring_setup > -> hostmem_init > -> memory_listener_register > -> BOOM > > As virtio-ccw tries to follow what virtio-pci does, it might be triggerable > for other platforms as well. > > Signed-off-by: Cornelia Huck > --- > hw/block/dataplane/virtio-blk.c | 9 +++++++++ > 1 file changed, 9 insertions(+) Thanks, applied to my block tree: https://github.com/stefanha/qemu/commits/block Stefan