From patchwork Fri Jan 15 20:12:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shesha Sreenivasamurthy X-Patchwork-Id: 8044821 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6FB219F96D for ; Fri, 15 Jan 2016 22:32:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D2B9F20381 for ; Fri, 15 Jan 2016 22:32:07 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 383E82037F for ; Fri, 15 Jan 2016 22:32:07 +0000 (UTC) Received: from localhost ([::1]:49183 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aKCuc-0006xw-Jy for patchwork-qemu-devel@patchwork.kernel.org; Fri, 15 Jan 2016 17:32:06 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56100) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aKAju-0000ep-D2 for qemu-devel@nongnu.org; Fri, 15 Jan 2016 15:12:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aKAjr-000822-6O for qemu-devel@nongnu.org; Fri, 15 Jan 2016 15:12:54 -0500 Received: from rcdn-iport-5.cisco.com ([173.37.86.76]:60142) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aKAjr-00081s-0m for qemu-devel@nongnu.org; Fri, 15 Jan 2016 15:12:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=757; q=dns/txt; s=iport; t=1452888771; x=1454098371; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=bRvG6iyBev0naIlavW8JUCk1R3rVuNPBCV4l1IWKvQ0=; b=CMQElrrSTUEna6by7uG4fV2UUl8dGSyILX4cxC/b5+tr8Gtw/094sEoy CjmnQ3JIBETwENzGDQa1Tm/K20VeruPYJzdqTeUEd2/AK1U4SvgYx3DZ4 l1dWUdWxgEYv4BUrJKiFg4rPKV4tJbKcFNlkT7u/flAG9YHHee+k/20Jt k=; X-IronPort-AV: E=Sophos;i="5.22,301,1449532800"; d="scan'208";a="63963195" Received: from alln-core-11.cisco.com ([173.36.13.133]) by rcdn-iport-5.cisco.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 15 Jan 2016 20:12:49 +0000 Received: from SHESHA-M-J04B.cisco.com ([10.24.108.123]) by alln-core-11.cisco.com (8.14.5/8.14.5) with ESMTP id u0FKCkes021150; Fri, 15 Jan 2016 20:12:49 GMT From: Shesha Sreenivasamurthy To: qemu-devel@nongnu.org Date: Fri, 15 Jan 2016 12:12:44 -0800 Message-Id: <1452888764-60880-2-git-send-email-shesha@cisco.com> X-Mailer: git-send-email 1.9.5 (Apple Git-50.3) In-Reply-To: <1452888764-60880-1-git-send-email-shesha@cisco.com> References: <1452888764-60880-1-git-send-email-shesha@cisco.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 173.37.86.76 X-Mailman-Approved-At: Fri, 15 Jan 2016 17:30:33 -0500 Cc: shesha@cisco.com, mst@redhat.com Subject: [Qemu-devel] [PATCH] vhost-user: Slave crashes as Master unmaps vrings during guest reboot X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Send VHOST_USER_RESET_OWNER when the device is stopped. Signed-off-by: Shesha Sreenivasamurthy --- hw/virtio/vhost.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index de29968..808184f 100644 --- a/hw/virtio/vhost.c +++ b/hw/virtio/vhost.c @@ -1256,6 +1256,11 @@ void vhost_dev_stop(struct vhost_dev *hdev, VirtIODevice *vdev) hdev->vq_index + i); } + if (hdev->vhost_ops->vhost_reset_device(hdev) < 0) { + fprintf(stderr, "vhost reset device %s failed\n", vdev->name); + fflush(stderr); + } + vhost_log_put(hdev, true); hdev->started = false; hdev->log = NULL;