From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36621) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLHXn-0007iW-AQ for qemu-devel@nongnu.org; Mon, 18 Jan 2016 16:41:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aLHXk-0003jK-1n for qemu-devel@nongnu.org; Mon, 18 Jan 2016 16:40:59 -0500 Received: from alln-iport-1.cisco.com ([173.37.142.88]:37573) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLHXj-0003iz-Os for qemu-devel@nongnu.org; Mon, 18 Jan 2016 16:40:55 -0500 From: "shesha Sreenivasamurthy (shesha)" Date: Mon, 18 Jan 2016 21:40:52 +0000 Message-ID: References: <1452888764-60880-1-git-send-email-shesha@cisco.com> <20160117132238-mutt-send-email-mst@redhat.com> In-Reply-To: <20160117132238-mutt-send-email-mst@redhat.com> Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_D2C29BA328FBDsheshaciscocom_" MIME-Version: 1.0 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: "Michael S. Tsirkin" Cc: "qemu-devel@nongnu.org" --_000_D2C29BA328FBDsheshaciscocom_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Got it. Thanks, I missed that line while reading the spec. Is docs/specs/vh= ost-user.txt the official spec ? -- - Thanks char * (*shesha) (uint64_t cache, uint8_t F00D) { return 0x0000C0DE; } From: "Michael S. Tsirkin" > Date: Sunday, January 17, 2016 at 3:23 AM To: Cisco Employee > Cc: "qemu-devel@nongnu.org" > Subject: Re: [PATCH] vhost-user: Slave crashes as Master unmaps vrings duri= ng guest reboot 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) --_000_D2C29BA328FBDsheshaciscocom_ Content-Type: text/html; charset="us-ascii" Content-ID: <91BF22B444C12546A99A48E775684F3C@emea.cisco.com> Content-Transfer-Encoding: quoted-printable
Got it. Thanks, I missed that line while reading the spec. Is doc= s/specs/vhost-user.txt the official spec ?

--
- Thanks
char * (*shesha) (uint64_t cache, = uint8_t F00D)
{ return 0x0000C0DE; } 

From: "Michael S. Tsirkin"= ; <mst@redhat.com>
Date: Sunday, January 17, 2016 at 3= :23 AM
To: Cisco Employee <shesha@cisco.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [PATCH] vhost-user: Sl= ave crashes as Master unmaps vrings during guest reboot

On Fri, Jan 15, 2016 at 12:12:43PM -0800, Shesha Sreenivasamurthy wrot= e:
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 gi= ve
any indication to the underlying DPDK slave application about it.
Therefore, a pollmode DPDK driver tries to read the ring to check for<= /div>
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)

--_000_D2C29BA328FBDsheshaciscocom_--