上面这个函数片断截取自init_dmars这个函数,其核心函数为iommu_prepare_static_identity_mapping,它最终会调到domain_add_dev_info这个函数并最终走到domain_context_mapping_one static int domain_context_mapping_one(struct dmar_domain *domain, struct intel_iommu *iommu, u8 bus, u8 devfn) { ... //设置t...
pci_iommu_initintel_iommu_init[1]dmar_table_init//为DMAR表中的各种类型的表设置回调,并遍历触发回调[2]dmar_dev_scope_init//初始化damr unit的scope (spec 8.3.1.4 Device Scope Example)dmar_register_bus_notifier//为pci bus注册dmar的通知回调dmar_pci_bus_notifierintel_iommu_debugfs_init//生成iommu...
Linux虚拟化之IOMMU引言1IOMMU初始化1.1 初始化函数集1.2 初始化流程2 Intel-IOMMU2.1 技术原理2.2 数据结构2.3 核心流程2.3.1 intel_iommu_init2.3.2iommu_group_get_for_dev2.3.3 intel_iommu_add_device2.3.4iommu_domain_alloc2.3.5iommu_at Fusion 虚拟化 ...
Linux虚拟化之IOMMU引言1IOMMU初始化1.1 初始化函数集1.2 初始化流程2 Intel-IOMMU2.1 技术原理2.2 数据结构2.3 核心流程2.3.1 intel_iommu_init2.3.2iommu_group_get_for_dev2.3.3 intel_iommu_add_device2.3.4iommu_domain_alloc2.3.5iommu_at Fusion 虚拟化 ...
Функция MmAllocatePagesForMdlEx Функция MmBuildMdlForNonPagedPool Функция MmFreeContiguousMemory Функция MmFreeContiguousMemorySpecifyCache Функция MmFreeMappingAddress Функция MmFreePagesFromMdl Макрос MmGetMdlByteCount Макрос MmGet...
* This code-path does not allocate the default domain when * creating the iommu group, so do it after the groups are * created. */ ret = bus_for_each_dev(bus, NULL, &group_list, probe_iommu_group); if(ret) returnret; list_for_each_entry_safe(group, next, &group_list, entry)...
(dev);if(IS_ERR(iommu_dev)){ret=PTR_ERR(iommu_dev);goto out_module_put;}dev->iommu->iommu_dev=iommu_dev;group=iommu_group_get_for_dev(dev);if(IS_ERR(group)){ret=PTR_ERR(group);goto out_release;}iommu_group_put(group);if(group_list&&!group->default_domain&&list_empty(&group-...
*/bytes = io_tlb_nslabs << IO_TLB_SHIFT;/* Get IO TLB memory from the low pages */vstart = memblock_alloc_low(PAGE_ALIGN(bytes), PAGE_SIZE);if(vstart && !swiotlb_init_with_tbl(vstart, io_tlb_nslabs, verbose))return;if(io_tlb_start)memblock_free_early(io_tlb_start,PAGE_ALIGN...
Container:对于虚机,Container 这里可以简单理解为一个VM Domain的物理内存空间。对于用户态驱动,Container可以是多个Group的集合。 上图中PCIe-PCI桥下的两个设备,在发送DMA请求时,PCIe-PCI桥会为下面两个设备生成Source Identifier,其中Bus域为红色总线号bus,device和func域为0。这样的话,PCIe-PCI桥下的两个设备会...
* @set_dirty_tracking: Enable or Disable dirty tracking on the iommu domain * @read_and_clear_dirty: Walk IOMMU page tables for dirtied PTEs marshalled * into a bitmap, with a bit represented as a page.* Reads the dirty PTE bits and clears it from IO ...