summaryrefslogtreecommitdiffstats
path: root/drivers/vhost
diff options
context:
space:
mode:
authorRobin Murphy <robin.murphy@arm.com>2022-06-08 13:48:26 +0200
committerMichael S. Tsirkin <mst@redhat.com>2022-08-11 10:06:38 +0200
commit366958a7fd7b541cba478e2866ef08f34e20471b (patch)
tree6a0a8c41fc42d8528f16c4f9efa12c32aada5b6e /drivers/vhost
parentvirtio: VIRTIO_HARDEN_NOTIFICATION is broken (diff)
downloadlinux-366958a7fd7b541cba478e2866ef08f34e20471b.tar.xz
linux-366958a7fd7b541cba478e2866ef08f34e20471b.zip
vdpa: Use device_iommu_capable()
Use the new interface to check the capability for our device specifically. Signed-off-by: Robin Murphy <robin.murphy@arm.com> Message-Id: <548e316fa282ce513fabb991a4c4d92258062eb5.1654688822.git.robin.murphy@arm.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'drivers/vhost')
-rw-r--r--drivers/vhost/vdpa.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c
index 23dcbfdfa13b..250ad4160ccb 100644
--- a/drivers/vhost/vdpa.c
+++ b/drivers/vhost/vdpa.c
@@ -1076,7 +1076,7 @@ static int vhost_vdpa_alloc_domain(struct vhost_vdpa *v)
if (!bus)
return -EFAULT;
- if (!iommu_capable(bus, IOMMU_CAP_CACHE_COHERENCY))
+ if (!device_iommu_capable(dma_dev, IOMMU_CAP_CACHE_COHERENCY))
return -ENOTSUPP;
v->domain = iommu_domain_alloc(bus);