From: Ethan MILON <ethan.milon@eviden.com>
To: Baolu Lu <baolu.lu@linux.intel.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: Fri, 11 Jul 2025 08:21:57 +0000 [thread overview]
Message-ID: <2125ee10-7b23-4890-a80c-d561ba06f23d@eviden.com> (raw)
In-Reply-To: <015a0eba-d26d-4565-9cbb-d4c9e700501e@linux.intel.com>
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?
Thanks,
Ethan
>
> Thanks,
> baolu
next prev parent reply other threads:[~2025-07-11 8:27 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 [this message]
2025-07-12 4:09 ` Baolu Lu
2025-07-14 5:05 ` 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=2125ee10-7b23-4890-a80c-d561ba06f23d@eviden.com \
--to=ethan.milon@eviden.com \
--cc=baolu.lu@linux.intel.com \
--cc=clement.mathieu--drif@eviden.com \
--cc=dwmw2@infradead.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox