RE: [PATCH v2 4/6] iommu/vt-d: Remove 1:1 mappings from identity domain

Tian, Kevin
2023-12-13T02:21:39Z

> From: Baolu Lu <baolu.lu@linux.intel.com>
> Sent: Tuesday, December 12, 2023 2:21 PM
> >
> > For GFX it's a workaround added since day one. there is even still
> > an option CONFIG_INTEL_IOMMU_BROKEN_GFX_WA available. But
> > now its meaning is really disabling IOMMU instead of using identity.
> >
> > sounds like IDENTMAP_GFX can be fully removed now:
> >
> > #ifdef CONFIG_INTEL_IOMMU_BROKEN_GFX_WA
> > dmar_map_gfx = 0;
> > #endif
>
> We should already remove the workaround for the 2.6 kernel. :-)

I don't know what happened to ignore that temporary option.

>
> It's default "n". Therefore, if any gfx driver still needs this
> workaround, there should already be a bug report.

It depends on how it is set in distros.

>
> >
> > if (!dmar_map_gfx)
> > iommu_identity_mapping |= IDENTMAP_GFX;
>
> So with above cleaned up, we have no need to worry about drivers that
> are not capable of handling remapped dma address any more.
>
> Did I miss anything?

I prefer to removing IDENTMAP_GFX in this series and put a comment
explaining why Azalia device has no problem.

Then send a separate patch to remove the GFX workaround option.
If there is any valid usage still relying on that, it's easy to revert.