.unmap_page = intel_unmap_page, .mapping_error = intel_mapping_error, ifdef CONFIG_X86 .dma_supported = dma_direct_supported, endif }//caq:所有的iommu硬件,对外需要提供给驱动 一个dma_map_ops 的实现,对内需要按照 iommu 的抽象,来实例化 iommu_ops 这个dma_map_ops的实例, intel 下会赋值给 d...
staticconststructdma_map_ops iommu_dma_ops ={ .alloc=iommu_dma_alloc,.free=iommu_dma_free,.mmap=iommu_dma_mmap,.get_sgtable=iommu_dma_get_sgtable, .map_page=iommu_dma_map_page, .unmap_page=iommu_dma_unmap_page, .map_sg=iommu_dma_map_sg, .unmap_sg=iommu_dma_unmap_sg, .sync_si...
static struct dma_map_ops swiotlb_dma_ops = { .alloc = __dma_alloc, //dma_alloc_attrs .free = __dma_free, .mmap = __swiotlb_mmap, .get_sgtable= __swiotlb_get_sgtable, .map_page = __swiotlb_map_page, //dma_map_single .unmap_page = __swiotlb_unmap_page, .map_sg = __s...
.map_page = __swiotlb_map_page, //dma_map_single .unmap_page = __swiotlb_unmap_page, .map_sg = __swiotlb_map_sg_attrs, //dma_map_sg .unmap_sg = __swiotlb_unmap_sg_attrs, .sync_single_for_cpu = __swiotlb_sync_single_for_cpu, .sync_single_for_device = __swiotlb_sync_singl...
.map_page = intel_map_page,//caq:映射page.unmap_page = intel_unmap_page, .mapping_error = intel_mapping_error,#ifdefCONFIG_X86.dma_supported = dma_direct_supported,#endif};//caq:所有的iommu硬件,对外需要提供给驱动 一个dma_map_ops 的实现,对内需要按照 iommu 的抽象,来实例化 iommu_ops ...
└─dma_map_page └─intel_map_page └─__intel_map_single ├─if(iommu_no_mapping) return paddr; ├─intel_alloc_iova └─domain_pfn_mapping 发现kvm/vfio/i40e都调用到了函数domain_pfn_mapping,相比于kvm和vfio,i40e多了一个if判断,条件是函数iommu_no_mapping的返回值。
└─vfio_dma_do_map └─vfio_pin_map_dma └─vfio_iommu_map └─iommu_map└─intel_iommu_map(domain->ops->map)└─domain_pfn_mapping 我们再看内核i40e的代码,它也调用到了domain_pfn_mapping。 代码语言:javascript 复制 i40e_alloc_mapped_page ...
4. iommu unmap iommu_unmap -> rk_iommu_unmap 解除虚拟地址和物理地址的映射关系,释放虚 拟地址...
IOMMU_DMA_LOGICAL_ADDRESS_TOKENIOMMU_MAP_RESERVED_LOGICAL_RANGEIOMMU_UNMAP_RESERVED_LOGICAL_RANGECommentaires Cette page a-t-elle été utile ? Yes No Indiquer des commentaires sur le produit | Obtenir de l’aide sur Microsoft Q&A Français Vos choix de confidentialité Thème Gér...
Describes the domain types that can be created and interacted with via the DMA_IOMMU_INTERFACE_EX.