Re: [PATCH v2 2/5] iommu/amd: Fix DTE clearing and rename iommu_ignore_device()
Vasant Hegde <[email protected]>
| Newsgroups | dev.linux.lists.iommu,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pci |
|---|---|
| Message-ID | <[email protected]> |
On 8/24/2026 3:39 PM, Pranjal Shrivastava wrote:
> On Sat, Aug 22, 2026 at 07:28:20PM +0530, Vasant Hegde wrote:
>>
>>
>
> [...]
>
.../...
>>>
>>> /****************************************************************************
>>> @@ -2233,6 +2217,41 @@ static void dev_update_dte(struct iommu_dev_data *dev_data, bool set)
>>> clear_dte_entry(iommu, dev_data);
>>> }
>>>
>>> +/*
>>> + * Invalidate a DTE by clearing the Valid bit first.
>>> + * Note: Not to be used on a fully probed device with
>>> + * live dev_data.
>>> + */
>>> +static void amd_iommu_disable_dte(struct dev_table_entry *ptr)
>>> +{
>>> + struct dev_table_entry new = {};
>>> +
>>> + write_dte_lower128(ptr, &new);
>>> + write_dte_upper128(ptr, &new);
>>> +}
>>> +
>>> +static void iommu_disable_device_dma(struct amd_iommu *iommu, struct device *dev)
>>
>> This will disable interrupt remapping support as well. May be we should rename
>> this function.
>>
>
> Ack, Sure. How about iommu_disable_device() ?
Sure. Makes sense.
-Vasant