From: Baolu Lu <baolu.lu@linux.intel.com>
To: Ethan MILON <ethan.milon@eviden.com>,
"iommu@lists.linux.dev" <iommu@lists.linux.dev>
Cc: David Woodhouse <dwmw2@infradead.org>,
CLEMENT MATHIEU--DRIF <clement.mathieu--drif@eviden.com>
Subject: Re: [PATCH 1/2] iommu/vt-d: Fix missing PASID in dev TLB flush with cache_tag_flush_all
Date: Mon, 14 Jul 2025 13:05:23 +0800 [thread overview]
Message-ID: <032b5b3d-74c7-490f-bbe2-4da4d8966f0b@linux.intel.com> (raw)
In-Reply-To: <394f73e6-227e-4874-8b1f-9d4f2a5984a4@linux.intel.com>
On 7/12/25 12:09, Baolu Lu wrote:
> On 7/11/2025 4:21 PM, Ethan MILON wrote:
>> Hi Baolu,
>>
>> Thanks for the review.
>>
>> On 7/10/25 10:59, Baolu Lu wrote:
>>> Caution: External email. Do not open attachments or click links,
>>> unless this email comes from a known sender and you know the content
>>> is safe.
>>>
>>>
>>> On 7/9/2025 5:48 AM, Ethan MILON wrote:
>>>> The function cache_tag_flush_all() was originally implemented with
>>>> incorrect device TLB invalidation logic that does not handle PASID, in
>>>> commit c4d27ffaa8eb ("iommu/vt-d: Add cache tag invalidation helpers")
>>>>
>>>> This causes regressions where full address space TLB invalidations
>>>> occur
>>>> with a PASID attached, such as during transparent hugepage unmapping in
>>>> SVA configurations or when calling iommu_flush_iotlb_all(). In these
>>>> cases, the device receives a TLB invalidation that lacks PASID.
>>>>
>>>> This incorrect logic was later extracted into
>>>> cache_tag_flush_devtlb_all(), in commit 3297d047cd7f ("iommu/vt-d:
>>>> Refactor IOTLB and Dev-IOTLB flush for batching")
>>>>
>>>> The fix replaces the call to cache_tag_flush_devtlb_all() with
>>>> cache_tag_flush_devtlb_psi(), which properly handles PASID.
>>>>
>>>> Fixes: 4f609dbff51b ("iommu/vt-d: Use cache helpers in
>>>> arch_invalidate_secondary_tlbs")
>>>> Fixes: 4e589a53685c ("iommu/vt-d: Use cache_tag_flush_all() in
>>>> flush_iotlb_all")
>>>>
>>> Remove above blank line.
>> Noted.
>>
>>>> Signed-off-by: Ethan Milon<ethan.milon@eviden.com>
>>> checkpatch.pl complains:
>>>
>>> WARNING: From:/Signed-off-by: email name mismatch: 'From: Ethan MILON
>>> <ethan.milon@eviden.com>' != 'Signed-off-by: Ethan Milon
>>> <ethan.milon@eviden.com>'
>> Understood. Our email server seems to overwrite our last names. I’ll
>> look into correcting that.
>>
>>>> ---
>>>> drivers/iommu/intel/cache.c | 18 +-----------------
>>>> 1 file changed, 1 insertion(+), 17 deletions(-)
>>> Other looks good to me.
>> Should I send a v2 with the fixes?
>
> No. I can change it manually if you have no objection.
Queued these two patches for linux-next with above nits addressed. Thank
you!
--
baolu
prev parent reply other threads:[~2025-07-14 5:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-08 21:48 [PATCH 1/2] iommu/vt-d: Fix missing PASID in dev TLB flush with cache_tag_flush_all Ethan MILON
2025-07-08 21:48 ` [PATCH 2/2] iommu/vt-d: Deduplicate cache_tag_flush_all by reusing flush_range Ethan MILON
2025-07-10 9:02 ` Baolu Lu
2025-07-10 8:59 ` [PATCH 1/2] iommu/vt-d: Fix missing PASID in dev TLB flush with cache_tag_flush_all Baolu Lu
2025-07-11 8:21 ` Ethan MILON
2025-07-12 4:09 ` Baolu Lu
2025-07-14 5:05 ` Baolu Lu [this message]
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=032b5b3d-74c7-490f-bbe2-4da4d8966f0b@linux.intel.com \
--to=baolu.lu@linux.intel.com \
--cc=clement.mathieu--drif@eviden.com \
--cc=dwmw2@infradead.org \
--cc=ethan.milon@eviden.com \
--cc=iommu@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.