[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC V1 1/6] Revert "vhost-backend: remove vhost_kernel_reset_device()"
From: |
Steve Sistare |
Subject: |
[RFC V1 1/6] Revert "vhost-backend: remove vhost_kernel_reset_device()" |
Date: |
Fri, 30 Aug 2024 04:56:32 -0700 |
This reverts commit e6383293eb01928692047e617665a742cca87e23.
The reset function is needed for CPR.
Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
---
hw/virtio/vhost-backend.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/hw/virtio/vhost-backend.c b/hw/virtio/vhost-backend.c
index 833804d..9b75141 100644
--- a/hw/virtio/vhost-backend.c
+++ b/hw/virtio/vhost-backend.c
@@ -221,6 +221,11 @@ static int vhost_kernel_set_owner(struct vhost_dev *dev)
return vhost_kernel_call(dev, VHOST_SET_OWNER, NULL);
}
+static int vhost_kernel_reset_device(struct vhost_dev *dev)
+{
+ return vhost_kernel_call(dev, VHOST_RESET_OWNER, NULL);
+}
+
static int vhost_kernel_get_vq_index(struct vhost_dev *dev, int idx)
{
assert(idx >= dev->vq_index && idx < dev->vq_index + dev->nvqs);
@@ -345,6 +350,7 @@ const VhostOps kernel_ops = {
.vhost_get_features = vhost_kernel_get_features,
.vhost_set_backend_cap = vhost_kernel_set_backend_cap,
.vhost_set_owner = vhost_kernel_set_owner,
+ .vhost_reset_device = vhost_kernel_reset_device,
.vhost_get_vq_index = vhost_kernel_get_vq_index,
.vhost_vsock_set_guest_cid = vhost_kernel_vsock_set_guest_cid,
.vhost_vsock_set_running = vhost_kernel_vsock_set_running,
--
1.8.3.1
- [RFC V1 0/6] Live Update: tap and vhost, Steve Sistare, 2024/08/30
- [RFC V1 3/6] tap: fix net_init_tap() return code, Steve Sistare, 2024/08/30
- [RFC V1 2/6] tap: common return label, Steve Sistare, 2024/08/30
- [RFC V1 5/6] tap: cpr support, Steve Sistare, 2024/08/30
- [RFC V1 6/6] tap: postload fix for cpr, Steve Sistare, 2024/08/30
- [RFC V1 4/6] migration: cpr_get_fd_param helper, Steve Sistare, 2024/08/30
- [RFC V1 1/6] Revert "vhost-backend: remove vhost_kernel_reset_device()",
Steve Sistare <=