[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 08/16] vhost: add op to enable or disable a single vring
From: |
Kangjie Xu |
Subject: |
[PATCH 08/16] vhost: add op to enable or disable a single vring |
Date: |
Mon, 18 Jul 2022 19:17:05 +0800 |
The interface to set enable status for a single vring is lacked in
VhostOps, since the vhost_set_vring_enable_op will manipulate all
virtqueues in a device.
Resetting a single vq will rely on this interface. It requires a
reply to indicate that the reset operation is finished, so the
parameter, wait_for_reply, is added.
Signed-off-by: Kangjie Xu <kangjie.xu@linux.alibaba.com>
Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
---
include/hw/virtio/vhost-backend.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/hw/virtio/vhost-backend.h
b/include/hw/virtio/vhost-backend.h
index eab46d7f0b..7bddd1e9a0 100644
--- a/include/hw/virtio/vhost-backend.h
+++ b/include/hw/virtio/vhost-backend.h
@@ -81,6 +81,9 @@ typedef int (*vhost_set_backend_cap_op)(struct vhost_dev
*dev);
typedef int (*vhost_set_owner_op)(struct vhost_dev *dev);
typedef int (*vhost_reset_device_op)(struct vhost_dev *dev);
typedef int (*vhost_get_vq_index_op)(struct vhost_dev *dev, int idx);
+typedef int (*vhost_set_single_vring_enable_op)(struct vhost_dev *dev,
+ int index, int enable,
+ bool wait_for_reply);
typedef int (*vhost_set_vring_enable_op)(struct vhost_dev *dev,
int enable);
typedef bool (*vhost_requires_shm_log_op)(struct vhost_dev *dev);
@@ -155,6 +158,7 @@ typedef struct VhostOps {
vhost_set_owner_op vhost_set_owner;
vhost_reset_device_op vhost_reset_device;
vhost_get_vq_index_op vhost_get_vq_index;
+ vhost_set_single_vring_enable_op vhost_set_single_vring_enable;
vhost_set_vring_enable_op vhost_set_vring_enable;
vhost_requires_shm_log_op vhost_requires_shm_log;
vhost_migration_done_op vhost_migration_done;
--
2.32.0
- Re: [PATCH 01/16] virtio-pci: virtio_pci_common_cfg add queue_notify_data, (continued)
[PATCH 13/16] virtio: introduce queue_enable in virtio, Kangjie Xu, 2022/07/18
[PATCH 08/16] vhost: add op to enable or disable a single vring,
Kangjie Xu <=
- Re: [PATCH 08/16] vhost: add op to enable or disable a single vring, Jason Wang, 2022/07/25
- Re: [PATCH 08/16] vhost: add op to enable or disable a single vring, Kangjie Xu, 2022/07/26
- Re: [PATCH 08/16] vhost: add op to enable or disable a single vring, Jason Wang, 2022/07/27
- Re: [PATCH 08/16] vhost: add op to enable or disable a single vring, Kangjie Xu, 2022/07/27
- Re: [PATCH 08/16] vhost: add op to enable or disable a single vring, Jason Wang, 2022/07/27
- Re: [PATCH 08/16] vhost: add op to enable or disable a single vring, Kangjie Xu, 2022/07/28
[PATCH 04/16] virtio: introduce __virtio_queue_reset(), Kangjie Xu, 2022/07/18
[PATCH 15/16] virtio-net: support queue_reset for vhost-user, Kangjie Xu, 2022/07/18
[PATCH 06/16] virtio-pci: support queue reset, Kangjie Xu, 2022/07/18