From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45781) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZwVKV-0003UO-H2 for qemu-devel@nongnu.org; Wed, 11 Nov 2015 08:20:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZwVKT-0007xe-Ek for qemu-devel@nongnu.org; Wed, 11 Nov 2015 08:20:51 -0500 Received: from mga11.intel.com ([192.55.52.93]:52749) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZwVKT-0007wg-8S for qemu-devel@nongnu.org; Wed, 11 Nov 2015 08:20:49 -0500 From: Yuanhan Liu Date: Wed, 11 Nov 2015 21:24:40 +0800 Message-Id: <1447248281-15227-5-git-send-email-yuanhan.liu@linux.intel.com> In-Reply-To: <1447248281-15227-1-git-send-email-yuanhan.liu@linux.intel.com> References: <1447248281-15227-1-git-send-email-yuanhan.liu@linux.intel.com> Subject: [Qemu-devel] [PATCH v4 4/5] vhost: send SET_PROTOCOL_FEATURES at start List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Yuanhan Liu , mst@redhat.com So that the backend can restore the protocol features after a reset. Signed-off-by: Yuanhan Liu --- hw/virtio/vhost.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index de29968..be48511 100644 --- a/hw/virtio/vhost.c +++ b/hw/virtio/vhost.c @@ -1195,6 +1195,14 @@ int vhost_dev_start(struct vhost_dev *hdev, VirtIODevice *vdev) if (r < 0) { goto fail_features; } + if (hdev->vhost_ops->vhost_set_protocol_features) { + r = hdev->vhost_ops->vhost_set_protocol_features(hdev, + hdev->protocol_features); + if (r < 0) { + goto fail_features; + } + } + r = hdev->vhost_ops->vhost_set_mem_table(hdev, hdev->mem); if (r < 0) { r = -errno; -- 1.9.0