Re: [PATCH 0/2] iommu/io-pgfault: reject partial faults after device removal
From: Vasant Hegde
Date: Thu Nov 26 2026 - 23:16:07 EST
On 11/25/2026 1:33 PM, Qihang wrote:
> Thanks, Vasant. Patches 11 and 12 cover the teardown paths I was
> missing.
>
> One question on patch 12: when the completion wait in dev_update_dte()
> returns, can a PPR accepted under the old DTE still appear in the log
> after the drain has observed it empty?
I am calling the drain after dte update happens. So if anything in pending in
buffer , it will be cleared. I will post v2 soon. Please take a look.
If anything is pending, I can sort it out in the followup series that I am
preparing.
-Vasant
>
> Happy to pick this up when you post the follow-up series.
>
> On Tue, Nov 24, 2026 at 4:53 PM Vasant Hegde <vasant.hegde@xxxxxxx> wrote:
>>
>> On 11/22/2026 1:09 PM, Baolu Lu wrote:
>>> On 11/21/2026 10:13 AM, Qihang wrote:
>>>> Hi Baolu,
>>>>
>>>> Thanks for confirming the VT-d ordering bug. I'll keep this series
>>>> withdrawn and won't resend it.
>>>>
>>>> I still have one question about AMD. detach_device() calls
>>>> iopf_queue_flush_dev() just before amd_iommu_iopf_remove_device().
>>>> That flush only waits on the iopf workqueue, while the PPR IRQ thread
>>>> runs amd_iommu_poll_ppr_log() and reports the fault through
>>>> iommu_report_device_fault() directly. What ensures that the thread has
>>>> finished reporting faults for this device, and cannot report another
>>>> one, before the device is removed from the IOPF queue?
>>>
>>> + Vasant
>>
>> Yes. Its a bug in AMD driver. In fact we have bunch of issues in AMD driver.
>>
>> Below series fixes some of them.
>>
>> https://lore.kernel.org/linux-iommu/20261105044801.399466-1-vasant.hegde@xxxxxxx/
>>
>> I have another series which handles draining. I will post it once above series
>> settles.
>>
>> -Vasant
>>