Re: [PATCH v3 2/7] iommu/vt-d: Remove identity mappings from si_domain

Baolu Lu
2024-08-07T06:14:15Z

On 2024/8/7 1:05, Jason Gunthorpe wrote:
> On Tue, Aug 06, 2024 at 10:39:36AM +0800, Lu Baolu wrote:
>> As the driver has enforced DMA domains for devices managed by an IOMMU
>> hardware that doesn't support passthrough translation mode, there is no
>> need for static identity mappings in the si_domain. Remove the identity
>> mapping code to avoid dead code.
>>
>> Signed-off-by: Lu Baolu<baolu.lu@linux.intel.com>
>> ---
>> drivers/iommu/intel/iommu.c | 122 ++----------------------------------
>> 1 file changed, 4 insertions(+), 118 deletions(-)
> Reviewed-by: Jason Gunthorpe<jgg@nvidia.com>
>
> I always wondered why this was so fine grained, I would have expected
> it to work on blocks of 512 x 1G, once you allocate a memory for the
> 1G table level you may as well fill it with identity IOPTEs. The only
> optimization point is how many blocks of 512x1G are needed..

I am not sure whether or not those early hardware support super pages.
:-).

Thanks,
baolu