Skip to content

Commit 6ff858c

Browse files
alyssarosenzweigmarcan
authored andcommitted
iommu/dart: Require DMA domain for locked DARTs
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
1 parent 3ee165b commit 6ff858c

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/iommu/apple-dart.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -658,6 +658,8 @@ static int apple_dart_attach_dev(struct iommu_domain *domain,
658658
return -EINVAL;
659659
if (!dart0->supports_bypass && domain->type == IOMMU_DOMAIN_IDENTITY)
660660
return -EINVAL;
661+
if (dart0->locked && domain->type != IOMMU_DOMAIN_DMA)
662+
return -EINVAL;
661663

662664
ret = apple_dart_finalize_domain(domain, cfg);
663665
if (ret)

0 commit comments

Comments
 (0)