Lines Matching refs:gaw
61 #define __DOMAIN_MAX_PFN(gaw) ((((uint64_t)1) << (gaw-VTD_PAGE_SHIFT)) - 1) argument
62 #define __DOMAIN_MAX_ADDR(gaw) ((((uint64_t)1) << gaw) - 1) argument
66 #define DOMAIN_MAX_PFN(gaw) ((unsigned long) min_t(uint64_t, \ argument
67 __DOMAIN_MAX_PFN(gaw), (unsigned long)-1))
68 #define DOMAIN_MAX_ADDR(gaw) (((uint64_t)__DOMAIN_MAX_PFN(gaw)) << VTD_PAGE_SHIFT) argument
330 int gaw; /* max guest address width */ member
837 if (start_pfn == 0 && last_pfn == DOMAIN_MAX_PFN(domain->gaw)) { in dma_pte_free_pagetable()
1346 static inline int guestwidth_to_adjustwidth(int gaw) in guestwidth_to_adjustwidth() argument
1349 int r = (gaw - 12) % 9; in guestwidth_to_adjustwidth()
1352 agaw = gaw; in guestwidth_to_adjustwidth()
1354 agaw = gaw + 9 - r; in guestwidth_to_adjustwidth()
1375 domain->gaw = guest_width; in domain_init()
1424 dma_pte_clear_range(domain, 0, DOMAIN_MAX_PFN(domain->gaw)); in domain_exit()
1427 dma_pte_free_pagetable(domain, 0, DOMAIN_MAX_PFN(domain->gaw)); in domain_exit()
1784 static struct dmar_domain *get_domain_for_dev(struct pci_dev *pdev, int gaw) in get_domain_for_dev() argument
1846 if (domain_init(domain, gaw)) { in get_domain_for_dev()
2450 dma_mask = min_t(uint64_t, DOMAIN_MAX_ADDR(domain->gaw), dma_mask); in intel_alloc_iova()
3498 domain->gaw = guest_width; in md_domain_init()
3555 dma_pte_clear_range(domain, 0, DOMAIN_MAX_PFN(domain->gaw)); in vm_domain_exit()
3558 dma_pte_free_pagetable(domain, 0, DOMAIN_MAX_PFN(domain->gaw)); in vm_domain_exit()
3631 dmar_domain->gaw = addr_width; in intel_iommu_attach_device()
3683 end = __DOMAIN_MAX_ADDR(dmar_domain->gaw) + 1; in intel_iommu_map()
3687 __func__, dmar_domain->gaw, max_addr); in intel_iommu_map()