Skip to content

Commit f6c99c3

Browse files
lulu-github-namemstsirkin
authored andcommitted
vhost: introduce new VhostOps vhost_force_iommu
This patch introduces new VhostOps vhost_force_iommu callback to force enable features bit VIRTIO_F_IOMMU_PLATFORM. Signed-off-by: Cindy Lu <[email protected]> Message-Id: <[email protected]> Reviewed-by: Michael S. Tsirkin <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]> Acked-by: Jason Wang <[email protected]>
1 parent b4ab225 commit f6c99c3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

include/hw/virtio/vhost-backend.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ typedef int (*vhost_vq_get_addr_op)(struct vhost_dev *dev,
121121

122122
typedef int (*vhost_get_device_id_op)(struct vhost_dev *dev, uint32_t *dev_id);
123123

124+
typedef bool (*vhost_force_iommu_op)(struct vhost_dev *dev);
125+
124126
typedef struct VhostOps {
125127
VhostBackendType backend_type;
126128
vhost_backend_init vhost_backend_init;
@@ -164,6 +166,7 @@ typedef struct VhostOps {
164166
vhost_dev_start_op vhost_dev_start;
165167
vhost_vq_get_addr_op vhost_vq_get_addr;
166168
vhost_get_device_id_op vhost_get_device_id;
169+
vhost_force_iommu_op vhost_force_iommu;
167170
} VhostOps;
168171

169172
extern const VhostOps user_ops;

0 commit comments

Comments
 (0)