Lines Matching refs:agaw
69 static inline int agaw_to_level(int agaw) in agaw_to_level() argument
71 return agaw + 2; in agaw_to_level()
74 static inline int agaw_to_width(int agaw) in agaw_to_width() argument
76 return min_t(int, 30 + agaw * LEVEL_STRIDE, MAX_AGAW_WIDTH); in agaw_to_width()
389 int addr_width = agaw_to_width(domain->agaw) - VTD_PAGE_SHIFT; in domain_pfn_supported()
420 int agaw; in __iommu_calculate_agaw() local
423 for (agaw = width_to_agaw(max_gaw); agaw >= 0; agaw--) { in __iommu_calculate_agaw()
424 if (test_bit(agaw, &sagaw)) in __iommu_calculate_agaw()
428 return agaw; in __iommu_calculate_agaw()
915 int level = agaw_to_level(domain->agaw); in pfn_to_dma_pte()
974 int total = agaw_to_level(domain->agaw); in dma_pfn_level_pte()
1083 dma_pte_free_level(domain, agaw_to_level(domain->agaw), retain_level, in dma_pte_free_pagetable()
1174 dma_pte_clear_level(domain, agaw_to_level(domain->agaw), in domain_unmap()
1837 int agaw; in guestwidth_to_adjustwidth() local
1841 agaw = gaw; in guestwidth_to_adjustwidth()
1843 agaw = gaw + 9 - r; in guestwidth_to_adjustwidth()
1844 if (agaw > 64) in guestwidth_to_adjustwidth()
1845 agaw = 64; in guestwidth_to_adjustwidth()
1846 return agaw; in guestwidth_to_adjustwidth()
1996 int agaw; in domain_context_mapping_one() local
2005 for (agaw = domain->agaw; agaw > iommu->agaw; agaw--) { in domain_context_mapping_one()
2018 context_set_address_width(context, agaw); in domain_context_mapping_one()
2327 int agaw, level; in domain_setup_first_level() local
2334 for (agaw = domain->agaw; agaw > iommu->agaw; agaw--) { in domain_setup_first_level()
2340 level = agaw_to_level(agaw); in domain_setup_first_level()
2423 end >> agaw_to_width(si_domain->agaw))) in si_domain_init()
4139 domain->agaw = width_to_agaw(adjust_width); in md_domain_init()
4228 addr_width = agaw_to_width(iommu->agaw); in prepare_domain_attach_device()
4239 while (iommu->agaw < dmar_domain->agaw) { in prepare_domain_attach_device()
4247 dmar_domain->agaw--; in prepare_domain_attach_device()