@@ -2674,6 +2674,24 @@ static struct iommu_domain arm_smmu_identity_domain = {
2674
2674
.ops = & arm_smmu_identity_ops ,
2675
2675
};
2676
2676
2677
+ static int arm_smmu_attach_dev_blocked (struct iommu_domain * domain ,
2678
+ struct device * dev )
2679
+ {
2680
+ struct arm_smmu_ste ste ;
2681
+
2682
+ arm_smmu_make_abort_ste (& ste );
2683
+ return arm_smmu_attach_dev_ste (dev , & ste );
2684
+ }
2685
+
2686
+ static const struct iommu_domain_ops arm_smmu_blocked_ops = {
2687
+ .attach_dev = arm_smmu_attach_dev_blocked ,
2688
+ };
2689
+
2690
+ static struct iommu_domain arm_smmu_blocked_domain = {
2691
+ .type = IOMMU_DOMAIN_BLOCKED ,
2692
+ .ops = & arm_smmu_blocked_ops ,
2693
+ };
2694
+
2677
2695
static int arm_smmu_map_pages (struct iommu_domain * domain , unsigned long iova ,
2678
2696
phys_addr_t paddr , size_t pgsize , size_t pgcount ,
2679
2697
int prot , gfp_t gfp , size_t * mapped )
@@ -3064,6 +3082,7 @@ static void arm_smmu_remove_dev_pasid(struct device *dev, ioasid_t pasid)
3064
3082
3065
3083
static struct iommu_ops arm_smmu_ops = {
3066
3084
.identity_domain = & arm_smmu_identity_domain ,
3085
+ .blocked_domain = & arm_smmu_blocked_domain ,
3067
3086
.capable = arm_smmu_capable ,
3068
3087
.domain_alloc = arm_smmu_domain_alloc ,
3069
3088
.probe_device = arm_smmu_probe_device ,
0 commit comments