summaryrefslogtreecommitdiff
path: root/drivers/iommu/virtio-iommu.c
diff options
context:
space:
mode:
authorJoerg Roedel <jroedel@suse.de>2022-09-09 10:27:09 +0300
committerJoerg Roedel <jroedel@suse.de>2022-09-09 10:27:09 +0300
commit7f34891b151187c95511f2830a3994c8a54cabc1 (patch)
tree2b1d5fb4f1b1f7d272c48558a6363d053a803b91 /drivers/iommu/virtio-iommu.c
parent189cb8fec14acf4dee59eb2011519e86d389cd3e (diff)
parent91c98fe7941499e4127cdc359c30841b873dd43a (diff)
downloadlinux-7f34891b151187c95511f2830a3994c8a54cabc1.tar.xz
Merge branch 'iommu/fixes' into core
Diffstat (limited to 'drivers/iommu/virtio-iommu.c')
-rw-r--r--drivers/iommu/virtio-iommu.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/iommu/virtio-iommu.c b/drivers/iommu/virtio-iommu.c
index 5ee24dc6f5ae..da463db9f12a 100644
--- a/drivers/iommu/virtio-iommu.c
+++ b/drivers/iommu/virtio-iommu.c
@@ -1005,7 +1005,18 @@ static int viommu_of_xlate(struct device *dev, struct of_phandle_args *args)
return iommu_fwspec_add_ids(dev, args->args, 1);
}
+static bool viommu_capable(enum iommu_cap cap)
+{
+ switch (cap) {
+ case IOMMU_CAP_CACHE_COHERENCY:
+ return true;
+ default:
+ return false;
+ }
+}
+
static struct iommu_ops viommu_ops = {
+ .capable = viommu_capable,
.domain_alloc = viommu_domain_alloc,
.probe_device = viommu_probe_device,
.probe_finalize = viommu_probe_finalize,