Re: [RFC PATCH v9 5/5] iommu/vt-d: don't loop for timeout ATS Invalidation request forever

Ethan Zhao
2023-12-29T09:24:37Z

On 12/29/2023 4:17 PM, Tian, Kevin wrote:
>> From: Ethan Zhao <haifeng.zhao@linux.intel.com>
>> Sent: Thursday, December 28, 2023 9:10 PM
>>
>> On 12/28/2023 4:38 PM, Tian, Kevin wrote:
>>>> From: Ethan Zhao <haifeng.zhao@linux.intel.com>
>>>> Sent: Thursday, December 28, 2023 8:17 AM
>>>>
>>>>
>>>> - if (rc == -EAGAIN)
>>>> + if (rc == -EAGAIN && type !=QI_DIOTLB_TYPE && type !=
>>>> QI_DEIOTLB_TYPE)
>>>> goto restart;
>>>>
>>> this change is moot.
>>>
>>> -EAGAIN is set only when hardware detects a ATS invalidation completion
>>> timeout in qi_check_fault(). so above just essentially kills the restart logic.
>> This change is intended to break the restar login when device-TLB
>>
>> invalidation timeout happens, we don't know how long the ITE took
>>
>> if the device is just no reponse.
> if in the end the agreement is to remove the restart logic, then do it.
>
> it's not good to introduce a change which essentially kills the restart
> logic but still keeps the related code.

Here, the device-TLB invalidation, depends on devcies response,

no one could make sure the what the third party adapters will act.

but for those invalidation issued to iommu itself, should be more

likely to survive ?

Anyway, would like to see more comments.

Thanks,

Ethan