diff options
author | Cindy Lu <lulu@redhat.com> | 2023-05-10 13:46:28 +0800 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2023-05-19 10:30:46 -0400 |
commit | 74b5d2b56c85515f1559ee0dfa8289bbb9832d51 (patch) | |
tree | 1c7428183cef381fb9c15559df7cd1129453d625 | |
parent | 3e69908907f8d3dd20d5753b0777a6e3824ba824 (diff) | |
download | qemu-74b5d2b56c85515f1559ee0dfa8289bbb9832d51.zip qemu-74b5d2b56c85515f1559ee0dfa8289bbb9832d51.tar.gz qemu-74b5d2b56c85515f1559ee0dfa8289bbb9832d51.tar.bz2 |
vhost: expose function vhost_dev_has_iommu()
To support vIOMMU in vdpa, need to exposed the function
vhost_dev_has_iommu, vdpa will use this function to check
if vIOMMU enable.
Signed-off-by: Cindy Lu <lulu@redhat.com>
Message-Id: <20230510054631.2951812-2-lulu@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-rw-r--r-- | hw/virtio/vhost.c | 2 | ||||
-rw-r--r-- | include/hw/virtio/vhost.h | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index 746d130..23da579 100644 --- a/hw/virtio/vhost.c +++ b/hw/virtio/vhost.c @@ -107,7 +107,7 @@ static void vhost_dev_sync_region(struct vhost_dev *dev, } } -static bool vhost_dev_has_iommu(struct vhost_dev *dev) +bool vhost_dev_has_iommu(struct vhost_dev *dev) { VirtIODevice *vdev = dev->vdev; diff --git a/include/hw/virtio/vhost.h b/include/hw/virtio/vhost.h index a52f273..f7f10c8 100644 --- a/include/hw/virtio/vhost.h +++ b/include/hw/virtio/vhost.h @@ -336,4 +336,5 @@ int vhost_dev_set_inflight(struct vhost_dev *dev, struct vhost_inflight *inflight); int vhost_dev_get_inflight(struct vhost_dev *dev, uint16_t queue_size, struct vhost_inflight *inflight); +bool vhost_dev_has_iommu(struct vhost_dev *dev); #endif |