aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCindy Lu <lulu@redhat.com>2020-07-01 22:55:34 +0800
committerMichael S. Tsirkin <mst@redhat.com>2020-07-03 07:57:04 -0400
commitf6c99c3438c09706694f7bf1f3057c36d1bd0c21 (patch)
tree9bbc8b2bf5b9479c6903aeced911cc64888a2f08 /include
parentb4ab225c34944658ddff62e4ee8127c3838bcf1d (diff)
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 <lulu@redhat.com> Message-Id: <20200701145538.22333-11-lulu@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/hw/virtio/vhost-backend.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/hw/virtio/vhost-backend.h b/include/hw/virtio/vhost-backend.h
index bfc24207e2..e7cb8d028c 100644
--- a/include/hw/virtio/vhost-backend.h
+++ b/include/hw/virtio/vhost-backend.h
@@ -121,6 +121,8 @@ typedef int (*vhost_vq_get_addr_op)(struct vhost_dev *dev,
typedef int (*vhost_get_device_id_op)(struct vhost_dev *dev, uint32_t *dev_id);
+typedef bool (*vhost_force_iommu_op)(struct vhost_dev *dev);
+
typedef struct VhostOps {
VhostBackendType backend_type;
vhost_backend_init vhost_backend_init;
@@ -164,6 +166,7 @@ typedef struct VhostOps {
vhost_dev_start_op vhost_dev_start;
vhost_vq_get_addr_op vhost_vq_get_addr;
vhost_get_device_id_op vhost_get_device_id;
+ vhost_force_iommu_op vhost_force_iommu;
} VhostOps;
extern const VhostOps user_ops;