From: Baolu Lu <baolu.lu@linux.intel.com>
To: "guanghuifeng@linux.alibaba.com" <guanghuifeng@linux.alibaba.com>,
dwmw2@infradead.org, joro@8bytes.org, will@kernel.org,
robin.murphy@arm.com, kevin.tian@intel.com, skhawaja@google.com
Cc: iommu@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] iommu/vt-d: fix intel iommu iotlb sync hardlockup and retry
Date: Tue, 10 Mar 2026 14:46:07 +0800 [thread overview]
Message-ID: <2993ad99-d118-4719-81e9-862182648301@linux.intel.com> (raw)
In-Reply-To: <889933b2-a707-4632-a96a-f7e1ccc4c8b9@linux.intel.com>
On 3/10/26 14:02, Baolu Lu wrote:
> On 3/9/26 17:05, guanghuifeng@linux.alibaba.com wrote:
>> There are some concerns:
>>
>> 1. During the invalid request execution process, the IOMMU first
>> fetches requests
>>
>> from the invalid queue to the internal cache.
>>
>>
>> 2. If an ITE timeout occurs during the execution of a request fetched
>> to the cache in step 1,
>>
>> the IOMMU driver clears the ITE status, allowing IOMMU to resume
>> processing requests from the invalid queue.
>>
>>
>> 3. For requests already fetched in step 1 that experience an ITE
>> timeout, after the IOMMU driver clears the ITE,
>>
>> will IOMMU directly discard these timed-out/cached requests? or
>> will it continue to execute these cached requests again?
>>
>>
>> Currently, the IOMMU driver implementation first clears ite to resume
>> IOMMU execution
>>
>> before setting desc_status to QI_ABORT.
>>
>> If IOMMU will re-execute requests from the cache, then the IOMMU
>> driver needs to be modified.
>
> You are right.
>
> The driver logic assumes that once an ITE error is cleared, the IOMMU
> will not resume its previous execution but will instead fetch new
> descriptors from the queue. This behavior was introduced by commit
> 6ba6c3a4cacfd ("VT-d: add device IOTLB invalidation support"), which has
> been part of the driver since 2009.
By the way, section 6.5.2.11 of the spec states:
"
... At the time ITE field is Set, hardware aborts any inv_wait_dsc
commands pending in hardware and does not increment the Invalidation
Queue Head register. When software clears the ITE field in the Fault
Status Register, hardware fetches descriptor pointed by the Invalidation
Queue Head register. ...
"
This implies that the hardware must abort the previous execution and
restart by fetching new requests.
Thanks,
baolu
next prev parent reply other threads:[~2026-03-10 6:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-06 10:15 Guanghui Feng
2026-03-06 19:42 ` Samiullah Khawaja
2026-03-09 9:05 ` guanghuifeng
2026-03-10 6:02 ` Baolu Lu
2026-03-10 6:46 ` Baolu Lu [this message]
2026-03-10 12:59 ` Shuai Xue
2026-03-11 2:18 ` Baolu Lu
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=2993ad99-d118-4719-81e9-862182648301@linux.intel.com \
--to=baolu.lu@linux.intel.com \
--cc=dwmw2@infradead.org \
--cc=guanghuifeng@linux.alibaba.com \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robin.murphy@arm.com \
--cc=skhawaja@google.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
all inboxes | Powered by JetHome®