diff options
| author | Will Deacon <will@kernel.org> | 2024-07-12 16:57:47 +0100 |
|---|---|---|
| committer | Will Deacon <will@kernel.org> | 2024-07-12 16:57:47 +0100 |
| commit | 8b6c32e831ef4496b51a68ddc5be9bb9e8d2337d (patch) | |
| tree | 656475449959689a0244b4fb5a6d0d50a3a1249d /drivers/vfio | |
| parent | 74e54d532b59c7a4375205d498c68634e0cf43b2 (diff) | |
| parent | 3b10f25704beefd0534f89db8323398c89b720e1 (diff) | |
| download | linux-8b6c32e831ef4496b51a68ddc5be9bb9e8d2337d.tar.gz linux-8b6c32e831ef4496b51a68ddc5be9bb9e8d2337d.tar.bz2 linux-8b6c32e831ef4496b51a68ddc5be9bb9e8d2337d.zip | |
Merge branch 'iommu/iommufd/paging-domain-alloc' into iommu/next
* iommu/iommufd/paging-domain-alloc:
RDMA/usnic: Use iommu_paging_domain_alloc()
wifi: ath11k: Use iommu_paging_domain_alloc()
wifi: ath10k: Use iommu_paging_domain_alloc()
drm/msm: Use iommu_paging_domain_alloc()
vhost-vdpa: Use iommu_paging_domain_alloc()
vfio/type1: Use iommu_paging_domain_alloc()
iommufd: Use iommu_paging_domain_alloc()
iommu: Add iommu_paging_domain_alloc() interface
Diffstat (limited to 'drivers/vfio')
| -rw-r--r-- | drivers/vfio/vfio_iommu_type1.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/vfio/vfio_iommu_type1.c b/drivers/vfio/vfio_iommu_type1.c index 3a0218171cfa..0960699e7554 100644 --- a/drivers/vfio/vfio_iommu_type1.c +++ b/drivers/vfio/vfio_iommu_type1.c @@ -2135,7 +2135,7 @@ static int vfio_iommu_domain_alloc(struct device *dev, void *data) { struct iommu_domain **domain = data; - *domain = iommu_domain_alloc(dev->bus); + *domain = iommu_paging_domain_alloc(dev); return 1; /* Don't iterate */ } @@ -2192,11 +2192,12 @@ static int vfio_iommu_type1_attach_group(void *iommu_data, * us a representative device for the IOMMU API call. We don't actually * want to iterate beyond the first device (if any). */ - ret = -EIO; iommu_group_for_each_dev(iommu_group, &domain->domain, vfio_iommu_domain_alloc); - if (!domain->domain) + if (IS_ERR(domain->domain)) { + ret = PTR_ERR(domain->domain); goto out_free_domain; + } if (iommu->nesting) { ret = iommu_enable_nesting(domain->domain); |
