Received: from eggs.gnu.org ([2001:4830:134:3::10]:36379) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aKlQz-0006gi-No for qemu-devel@nongnu.org; Sun, 17 Jan 2016 06:23:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aKlQw-0004rY-Eb for qemu-devel@nongnu.org; Sun, 17 Jan 2016 06:23:49 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40422) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aKlQw-0004rS-9k for qemu-devel@nongnu.org; Sun, 17 Jan 2016 06:23:46 -0500 Date: Sun, 17 Jan 2016 13:23:42 +0200 From: "Michael S. Tsirkin" Message-ID: <20160117132238-mutt-send-email-mst@redhat.com> References: <1452888764-60880-1-git-send-email-shesha@cisco.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1452888764-60880-1-git-send-email-shesha@cisco.com> Subject: Re: [Qemu-devel] [PATCH] vhost-user: Slave crashes as Master unmaps vrings during guest reboot List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Shesha Sreenivasamurthy Cc: qemu-devel@nongnu.org On Fri, Jan 15, 2016 at 12:12:43PM -0800, Shesha Sreenivasamurthy wrote: > Problem: > -------- > If a guest has vhost-user enabled, then on reboot vhost_virtqueue_stop > is invoked. This unmaps vring memory mappings. However, it will not give > any indication to the underlying DPDK slave application about it. > Therefore, a pollmode DPDK driver tries to read the ring to check for > packets and segfaults. The spec currently says: Client must start ring upon receiving a kick (that is, detecting that file descriptor is readable) on the descriptor specified by VHOST_USER_SET_VRING_KICK, and stop ring upon receiving VHOST_USER_GET_VRING_BASE. Why isn't this sufficient? > Solution: > ---------- > VHOST_USER_RESET_OWNER API is issued by QEMU so that DPDK slave > application is informed that mappings will be soon gone so that > it can take necessary steps. > > Shesha Sreenivasamurthy (1): > vhost-user: Slave crashes as Master unmaps vrings during guest reboot > > hw/virtio/vhost.c | 5 +++++ > 1 file changed, 5 insertions(+) > > -- > 1.9.5 (Apple Git-50.3)