Received: from eggs.gnu.org ([2001:4830:134:3::10]:49095) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIXyK-0002cS-NT for qemu-devel@nongnu.org; Thu, 30 Jun 2016 05:09:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bIXyF-0003ZL-A3 for qemu-devel@nongnu.org; Thu, 30 Jun 2016 05:09:20 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:14227) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIXyF-0003ZH-0J for qemu-devel@nongnu.org; Thu, 30 Jun 2016 05:09:15 -0400 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id u5U98it6087427 for ; Thu, 30 Jun 2016 05:09:14 -0400 Received: from e06smtp09.uk.ibm.com (e06smtp09.uk.ibm.com [195.75.94.105]) by mx0a-001b2d01.pphosted.com with ESMTP id 23uwt8k7th-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 30 Jun 2016 05:09:13 -0400 Received: from localhost by e06smtp09.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 30 Jun 2016 10:09:11 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 5B6BE1B08070 for ; Thu, 30 Jun 2016 10:10:17 +0100 (BST) Received: from d06av04.portsmouth.uk.ibm.com (d06av04.portsmouth.uk.ibm.com [9.149.37.216]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u5U992Od262594 for ; Thu, 30 Jun 2016 09:09:02 GMT Received: from d06av04.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av04.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u5U990mY016873 for ; Thu, 30 Jun 2016 03:09:01 -0600 Date: Thu, 30 Jun 2016 11:08:57 +0200 From: Cornelia Huck In-Reply-To: References: <1467202624-72941-1-git-send-email-cornelia.huck@de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Message-Id: <20160630110857.39dd1c11.cornelia.huck@de.ibm.com> Subject: Re: [Qemu-devel] [PATCH] virtio: Fix setting up host notifiers for vhost List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?TWFyYy1BbmRyw6k=?= Lureau Cc: QEMU , "Michael S. Tsirkin" , Fam Zheng , Stefan Hajnoczi , Jason Wang , pl@kamp.de On Wed, 29 Jun 2016 14:23:42 +0200 Marc-Andr=C3=A9 Lureau wrote: > Hi >=20 > On Wed, Jun 29, 2016 at 2:17 PM, Cornelia Huck = wrote: > > 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. > > > > Fix this by starting the ioeventfd if that has not happened > > before. > > > > While we're at it, also fixup the unsetting path of > > set_host_notifier_internal(). > > > > Fixes: 6798e245a3 ("virtio-bus: common ioeventfd infrastructure") > > Reported-by: Jason Wang > > Reported-by: Marc-Andr=C3=A9 Lureau > > Signed-off-by: Cornelia Huck > > --- > > > > This fixes the vhost regression for me, while dataplane continues > > to work. > > >=20 > That doesn't work here, > QTEST_QEMU_BINARY=3Dx86_64-softmmu/qemu-system-x86_64 tests/vhost-user-t= est >=20 > hangs in /x86_64/vhost-user/migrate All of this is related to the event notifier not being ready when switching the handler. We'll try to read with EventNotifier not being setup (which results in the hang). Doing an exit on deassign if ioeventfd is not started makes the test pass. I'll give the requirements for starting the ioeventfd and switching the handler some more thought. But at least I now know where to poke.