IOMMU_UNMAP_IDENTITY_RANGE IommuUnmapIdentityRange; NTSTATUS IommuUnmapIdentityRange( [_In_] PIOMMU_DMA_DOMAIN Domain, [_In_] PMDL Mdl ) {...} Parámetros [_In_] Domain Puntero al identificador del dominio. [_In_] Mdl Puntero al MDL que se va a desasignación. Valor devuelto Devuelve...
有四种domain,init_dmars中用到了IOMMU_DOMAIN_IDENTITY,这个类型的domain只能有一个,kvm和dpdk会用到IOMMU_DOMAIN_UNMANAGED,一个qemu或者一个dpdk进程一个domain。IOMMU_DOMAIN_BLOCKED和IOMMU_DOMAIN_DMA是内核用到,它和iommu group有关系,一个group对应一个domain,一个group有可能有多个dev,这个和pci硬件结构有关系...
配置了iommu=pt就identity mappingifhw_pass_through==0hardware identity mappingelsesoftware identity mapping 说明配置了iommu=pt上面的函数iommu_no_mapping返回1,那么i40e驱动就直接return paddr,并不会真正调用到domain_pfn_mapping,直接用了物理地址少了一次映射性能当然会高一些。
IOMMU_UNMAP_IDENTITY_RANGE IommuUnmapIdentityRange; NTSTATUS IommuUnmapIdentityRange( [_In_] PIOMMU_DMA_DOMAIN Domain, [_In_] PMDL Mdl ) {...} Parameters [_In_] Domain A pointer to the handle to the domain. [_In_] Mdl A pointer to the MDL to unmap. Return value Return STATUS_SUC...
为IOMMU group 分配默认的 domain,这主要通过probe_alloc_default_domain()函数完成; 为IOMMU group 分配默认的 domain 失败,则检查下一个struct iommu_group,否则继续执行; 创建设备直接映射,这主要通过iommu_group_create_direct_mappings()函数完成; 连接设备和 IOMMU domain,这主要通过__iommu_group_dma_attach(...
/* Domain feature flags */ #define __IOMMU_DOMAIN_PAGING (1U << 0) /* Support for iommu_map/unmap */ #define __IOMMU_DOMAIN_DMA_API (1U << 1) /* Domain for use in DMA-API implementation */ #define __IOMMU_DOMAIN_PT (1U << 2) /* Domain is identity mapped */ ...
IOMMU_MAP_IDENTITY_RANGE IommuMapIdentityRange; NTSTATUS IommuMapIdentityRange( [_In_] PIOMMU_DMA_DOMAIN Domain, [_In_] ULONG Permissions, [_In_] PMDL Mdl ) {...} 参数 [_In_] Domain 指向域句柄的指针。 [_In_] Permissions 一个ULONG 变量,指定映射的权限。 [_In_] Mdl 指向要映射的 ...
of memory domains. In the first type of domain, the I/O Virtual Addresses (IOVAs) used by the peripheral and configured by the driver are different than the physical ones (IOPAs), translated by the IOMMU. The second type defines IOVAs as identical as IOPAs and is called identity ...
return ret; iommu_def_domain_type = pt ? IOMMU_DOMAIN_IDENTITY : IOMMU_DOMAIN_DMA;//为0则uses IOMMU return 0; } early_param("iommu.passthrough", iommu_set_def_domain_type);//caq:是否设定iommu.default_domain的是否bypass---注意,并不一定指arm64 ``` 2、在iommu 内核参数的解析的 intel ...
若支持则通过硬件实现PT,即context entry或pasid entry中的TT设置为10b(直通);(intel_pasid_setup_pass_through;BTW, 只有sm mode的才支持PT);2.若硬件不支持,则通过iommu_domain_identity_map中建立的si_domian(即一致性映射domain)作为domain来实现passthrough。