[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
- [Qemu-devel] [PATCH v4 0/5] handle vhost reset/start/stop correctly, Yuanhan Liu, 2015/11/11
- [Qemu-devel] [PATCH v4 3/5] vhost: introduce vhost_set/get_protocol_features callbacks, Yuanhan Liu, 2015/11/11
- [Qemu-devel] [PATCH v4 2/5] vhost: reset vhost net when virtio_net_reset happens, Yuanhan Liu, 2015/11/11
- [Qemu-devel] [PATCH v4 1/5] vhost: rename RESET_DEVICE backto RESET_OWNER, Yuanhan Liu, 2015/11/11
- [Qemu-devel] [PATCH v4 4/5] vhost: send SET_PROTOCOL_FEATURES at start,
Yuanhan Liu <=
- [Qemu-devel] [PATCH v4 5/5] vhost: send SET_VRING_ENABLE at start/stop, Yuanhan Liu, 2015/11/11
- Re: [Qemu-devel] [PATCH v4 0/5] handle vhost reset/start/stop correctly, Michael S. Tsirkin, 2015/11/12