Hi,

On 12/10/19 11:47 AM, Jerry Snitselaar wrote:

So the domain type is dma after 01:00.0 gets added, and when
intel_iommu_add_device is called for 01:00.2 it will go into the if
section. Since the device default domain type for 01:00.2 is dma
nothing happens in there, and it goes on to 01:00.4. Is the "private
identity domain" message really accurate since everyone will use
si_domain? Adding some more debugging.

The facts that we have seen:

1) 01.00.2 uses the default domain in group 25. The domain type of this
  default domain is DMA.

2) iommu_group_create_direct_mappings() *should* be called when adding
  01.00.2 into group 25. As the result, RMRR for this device *should*
  be identity mapped.

3) By checking DMAR table, RMRR (0x000000bdf6f000 ~ 0x000000bdf7efff) is
  reported for device 01.00.2.

The problem is that RMRR (0x000000bdf6f000 ~ 0x000000bdf7efff) hasn't
actually been mapped, as the result IOMMU faults generated when device
try to access this range.

So I guess you could add more debug message to check why
iommu_group_create_direct_mappings() doesn't do the right thing?

Best regards,
baolu


A call to iommu_map is failing.

[   36.686881] pci 0000:01:00.2: iommu_group_add_device: calling iommu_group_create_direct_mappings [   36.689843] pci 0000:01:00.2: iommu_group_create_direct_mappings: iterating through mappings [   36.692757] pci 0000:01:00.2: iommu_group_create_direct_mappings: calling apply_resv_region
[   36.695526] pci 0000:01:00.2: e_direct_mappings: entry type is direct
[   37.198053] iommu: iommu_map: ops->map failed iova 0xbddde000 pa 0x00000000bddde000 pgsize 0x1000

So can you further check why intel_iomm_map() fails here?

Best regards,
baolu

[   37.201357] pci 0000:01:00.2: iommu_group_create_direct_mappings: iommu_map failed
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Reply via email to