RE: [PATCH v4 10/17] iommu: Do iommu_group_create_direct_mappings() before attach

Tian, Kevin
2023-04-20T07:30:52Z

> From: Jason Gunthorpe <jgg@nvidia.com>
> Sent: Wednesday, April 12, 2023 9:52 PM
>
> The iommu_probe_device() path calls
> iommu_create_device_direct_mappings()
> after attaching the device.
>
> IOMMU_RESV_DIRECT maps need to be continually in place, so if a
> hotplugged
> device has new ranges the should have been mapped into the default
> domain
> before it is attached.
>
> Move the iommu_create_device_direct_mappings() call up.
>
> Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>

Reviewed-by: Kevin Tian <kevin.tian@intel.com>