intel_pasid_alloc_table //(4) 给device分配pasid directory table并存入info->table,不论device是否支持PASID cap, //当IOMMU支持SM时必须分配pasid direcotry,不支持则对应PASID为0的情况,且pasid table在 //dmar_domain_attach_device()分配优先处理(PASID_RID2PASID==0)时分配。 iommu_group_get_for_dev ...
* @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 ...
*/kfree(device->name);device->name=kasprintf(GFP_KERNEL,"%s.%d",kobject_name(&dev->kobj),i++);goto rename;}goto err_free_name;}kobject_get(group->devices_kobj);dev->iommu_group=group;mutex_lock(&group->mutex);list_add_tail(&device->list,&group->devices);if(group->domain&&!iom...
为IOMMU group 分配默认的 domain,这主要通过probe_alloc_default_domain()函数完成; 为IOMMU group 分配默认的 domain 失败,则检查下一个struct iommu_group,否则继续执行; 创建设备直接映射,这主要通过iommu_group_create_direct_mappings()函数完成; 连接设备和 IOMMU domain,这主要通过__iommu_group_dma_attach()...
Describes the configuration types that are used upon IOMMU_DMA_DEVICE creation depending on the device type and the system.
* @dev_feat_enabled: check enabled feature * @aux_attach/detach_dev: aux-domain specific attach/detach entries. * @aux_get_pasid: get the pasid given an aux-domain * @sva_bind: Bind process address space to device * @sva_unbind: Unbind process address space from device ...
//gitee.com/src-openeuler/kernel/blob/master/Module.kabi_aarch64 the following IOMMU symbols are in the list: iommu_dev_disable_feature iommu_dev_enable_feature iommu_get_domain_for_dev iommu_get_group_resv_regions iommu_iova_to_phys iommu_present So reserve fields in relevant data ...
为了支持这样的应用模式,ARM的Jean Philipse做了一套补丁,为domain增加pasid支持。他的方法是domain上可以bind多个pasid,bind的时候给你分配一个io_mm,然后你用iommu_sva_map()带上这个io_mm来做mapping。 这种情况下,你不再需要和dma api隔离了,因为他会自动用pasid=0(实际硬件不一定是这样的接口,这只是比喻)...
root=/dev/mapper/pve-root ro quiet vfio-pci.ids=8086:9a49 intel_iommu=on [ 0.040467] DMAR: IOMMU enabled [ 0.685431] pci 0000:00:02.0: DMAR: Skip IOMMU disabling for graphics [ 0.723207] iommu: Default domain type: Translated [ 0.723207] iommu: DMA domain TLB invalidation policy: lazy ...
#include <power-domain.h> @@ -543,6 +544,13 @@ int device_probe(struct udevice *dev) goto fail; } if (CONFIG_IS_ENABLED(IOMMU) && dev->parent && (device_get_uclass_id(dev) != UCLASS_IOMMU)) { ret = dev_iommu_enable(dev); if (ret) goto fail; } ret = device_get_dma_...