From: Baolu Lu <baolu.lu@linux.intel.com>
To: "Tian, Kevin" <kevin.tian@intel.com>,
Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
Jason Gunthorpe <jgg@ziepe.ca>
Cc: baolu.lu@linux.intel.com,
"iommu@lists.linux.dev" <iommu@lists.linux.dev>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 4/6] iommu/vt-d: Remove 1:1 mappings from identity domain
Date: Wed, 13 Dec 2023 11:02:07 +0800 [thread overview]
Message-ID: <7d3a30cd-bd70-47e3-948e-32b0b68da3a3@linux.intel.com> (raw)
In-Reply-To: <DM4PR11MB5278A37E1F30141D3DBF3FBF8C8DA@DM4PR11MB5278.namprd11.prod.outlook.com>
On 12/13/23 11:04 AM, Tian, Kevin wrote:
>> From: Baolu Lu<baolu.lu@linux.intel.com>
>> Sent: Wednesday, December 13, 2023 10:44 AM
>>
>> On 12/13/23 10:20 AM, Tian, Kevin wrote:
>>>>> 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.
>> Agreed. We should be more cautious. Perhaps I will postpone this series
>> to a time when we are sure that graphic drivers are okay with this
>> change. As a first step, perhaps we can make a change to remove the
>> workaround for graphic drivers, so that any hidden bugs in the graphic
>> driver could be reported.
>>
>> The patch looks like,
>>
>> iommu/vt-d: Remove INTEL_IOMMU_BROKEN_GFX_WA
>>
>> Commit 62edf5dc4a524 ("intel-iommu: Restore DMAR_BROKEN_GFX_WA
>> option for
>> broken graphics drivers") was introduced 24 years ago as a temporary
>> workaround for graphics drivers that used physical addresses for DMA and
>> avoided DMA APIs. This workaround was disabled by default.
>>
>> As 24 years have passed, it is expected that graphics driver developers
>> have migrated their drivers to use kernel DMA APIs. Therefore, this
>> workaround is no longer required and could been removed.
> and igfx_off option is still available just in case.
Yeah!
>
>> Suggested-by: Kevin Tian<kevin.tian@intel.com>
>> Signed-off-by: Lu Baolu<baolu.lu@linux.intel.com>
>> ---
>> drivers/iommu/intel/iommu.c | 10 ----------
>> drivers/iommu/intel/Kconfig | 11 -----------
>> 2 files changed, 21 deletions(-)
>>
>> diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
>> index 84b78e42a470..27b8638291f2 100644
>> --- a/drivers/iommu/intel/iommu.c
>> +++ b/drivers/iommu/intel/iommu.c
>> @@ -2357,9 +2357,6 @@ static int device_def_domain_type(struct device
>> *dev)
>>
>> if ((iommu_identity_mapping & IDENTMAP_AZALIA) &&
>> IS_AZALIA(pdev))
>> return IOMMU_DOMAIN_IDENTITY;
>> -
>> - if ((iommu_identity_mapping & IDENTMAP_GFX) &&
>> IS_GFX_DEVICE(pdev))
>> - return IOMMU_DOMAIN_IDENTITY;
>> }
>>
>> return 0;
>> @@ -2660,13 +2657,6 @@ static int __init init_dmars(void)
>> iommu_set_root_entry(iommu);
>> }
>>
>> -#ifdef CONFIG_INTEL_IOMMU_BROKEN_GFX_WA
>> - dmar_map_gfx = 0;
>> -#endif
>> -
>> - if (!dmar_map_gfx)
>> - iommu_identity_mapping |= IDENTMAP_GFX;
>> -
> let's remove IDENTMAP_GFX (and all its references) in a separate patch.
>
> this patch is for removing the workaround option.
>
> another patch removes IDENTMAP_GFX as it's meaningless when
> dmar_map_gfx simply implies disabling the gfx iommu.
Okay, it's fine to me.
Best regards,
baolu
next prev parent reply other threads:[~2023-12-13 3:06 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-05 1:21 [PATCH v2 0/6] iommu/vt-d: Convert to use static identity domain Lu Baolu
2023-12-05 1:21 ` [PATCH v2 1/6] iommu/vt-d: Setup scalable mode context entry in probe path Lu Baolu
2023-12-08 8:50 ` Tian, Kevin
2023-12-09 7:52 ` Baolu Lu
2023-12-11 4:06 ` Tian, Kevin
2023-12-11 17:38 ` Jason Gunthorpe
2023-12-12 5:34 ` Baolu Lu
2023-12-05 1:21 ` [PATCH v2 2/6] iommu/vt-d: Remove scalable mode context entry setup from attach_dev Lu Baolu
2023-12-08 8:56 ` Tian, Kevin
2023-12-09 7:57 ` Baolu Lu
2023-12-05 1:22 ` [PATCH v2 3/6] iommu/vt-d: Refactor domain_context_mapping_one() to be reusable Lu Baolu
2023-12-05 1:22 ` [PATCH v2 4/6] iommu/vt-d: Remove 1:1 mappings from identity domain Lu Baolu
2023-12-08 9:09 ` Tian, Kevin
2023-12-08 12:45 ` Baolu Lu
2023-12-11 3:58 ` Tian, Kevin
2023-12-12 6:20 ` Baolu Lu
2023-12-13 2:20 ` Tian, Kevin
2023-12-13 2:43 ` Baolu Lu
2023-12-13 3:04 ` Tian, Kevin
2023-12-13 3:02 ` Baolu Lu [this message]
2023-12-05 1:22 ` [PATCH v2 5/6] iommu/vt-d: Add support for static " Lu Baolu
2023-12-05 1:22 ` [PATCH v2 6/6] iommu/vt-d: Cleanup si_domain Lu Baolu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7d3a30cd-bd70-47e3-948e-32b0b68da3a3@linux.intel.com \
--to=baolu.lu@linux.intel.com \
--cc=iommu@lists.linux.dev \
--cc=jgg@ziepe.ca \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robin.murphy@arm.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox