Lines Matching refs:domain

21 static int intel_nested_attach_dev(struct iommu_domain *domain,  in intel_nested_attach_dev()  argument
25 struct dmar_domain *dmar_domain = to_dmar_domain(domain); in intel_nested_attach_dev()
30 if (info->domain) in intel_nested_attach_dev()
43 ret = prepare_domain_attach_device(&dmar_domain->s2_domain->domain, dev); in intel_nested_attach_dev()
64 info->domain = dmar_domain; in intel_nested_attach_dev()
78 static void intel_nested_domain_free(struct iommu_domain *domain) in intel_nested_domain_free() argument
80 struct dmar_domain *dmar_domain = to_dmar_domain(domain); in intel_nested_domain_free()
90 static int intel_nested_cache_invalidate_user(struct iommu_domain *domain, in intel_nested_cache_invalidate_user() argument
93 struct dmar_domain *dmar_domain = to_dmar_domain(domain); in intel_nested_cache_invalidate_user()
144 struct dmar_domain *domain; in intel_nested_domain_alloc() local
159 domain = kzalloc(sizeof(*domain), GFP_KERNEL_ACCOUNT); in intel_nested_domain_alloc()
160 if (!domain) in intel_nested_domain_alloc()
163 domain->use_first_level = true; in intel_nested_domain_alloc()
164 domain->s2_domain = s2_domain; in intel_nested_domain_alloc()
165 domain->s1_pgtbl = vtd.pgtbl_addr; in intel_nested_domain_alloc()
166 domain->s1_cfg = vtd; in intel_nested_domain_alloc()
167 domain->domain.ops = &intel_nested_domain_ops; in intel_nested_domain_alloc()
168 domain->domain.type = IOMMU_DOMAIN_NESTED; in intel_nested_domain_alloc()
169 INIT_LIST_HEAD(&domain->devices); in intel_nested_domain_alloc()
170 INIT_LIST_HEAD(&domain->dev_pasids); in intel_nested_domain_alloc()
171 INIT_LIST_HEAD(&domain->cache_tags); in intel_nested_domain_alloc()
172 spin_lock_init(&domain->lock); in intel_nested_domain_alloc()
173 spin_lock_init(&domain->cache_lock); in intel_nested_domain_alloc()
174 xa_init(&domain->iommu_array); in intel_nested_domain_alloc()
177 list_add(&domain->s2_link, &s2_domain->s1_domains); in intel_nested_domain_alloc()
180 return &domain->domain; in intel_nested_domain_alloc()