qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v4 4/5] vhost: send SET_PROTOCOL_FEATURES at start


From: Yuanhan Liu
Subject: [Qemu-devel] [PATCH v4 4/5] vhost: send SET_PROTOCOL_FEATURES at start
Date: Wed, 11 Nov 2015 21:24:40 +0800

So that the backend can restore the protocol features after a reset.

Signed-off-by: Yuanhan Liu <address@hidden>
---
 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]