From: Will Deacon <will@kernel.org>
To: joro@8bytes.org, suravee.suthikulpanit@amd.com,
vasant.hegde@amd.com, robin.murphy@arm.com,
iommu@lists.linux.dev,
Guanghui Feng <guanghuifeng@linux.alibaba.com>
Cc: catalin.marinas@arm.com, kernel-team@android.com,
Will Deacon <will@kernel.org>,
linux-kernel@vger.kernel.org, xlpang@linux.alibaba.com,
oliver.yang@linux.alibaba.com
Subject: Re: [PATCH] iommu/amd: Wait for completion instead of returning early in iommu_completion_wait()
Date: Tue, 21 Jul 2026 13:21:27 +0100 [thread overview]
Message-ID: <178463143320.206840.9481565301808596283.b4-ty@kernel.org> (raw)
In-Reply-To: <20260716141622.325032-1-guanghuifeng@linux.alibaba.com>
On Thu, 16 Jul 2026 22:16:22 +0800, Guanghui Feng wrote:
> need_sync is a per-IOMMU flag shared by all domains and devices behind
> that IOMMU. It is set whenever a command is queued with sync == true and
> cleared when a completion-wait (CWAIT) command is queued. However, a
> cleared need_sync only means that a covering CWAIT has been queued, not
> that all previously queued commands have actually completed in hardware.
>
> iommu_completion_wait() read need_sync locklessly and returned early
> when it was false. This breaks the "block until all previously queued
> commands have completed" contract in a multi-CPU scenario:
>
> [...]
Applied to iommu (fixes), thanks!
[1/1] iommu/amd: Wait for completion instead of returning early in iommu_completion_wait()
https://git.kernel.org/iommu/c/1e75a8255f11
Cheers,
--
Will
https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev
prev parent reply other threads:[~2026-07-21 12:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-16 14:16 Guanghui Feng
2026-07-19 11:43 ` Vasant Hegde
2026-07-21 9:46 ` Vasant Hegde
2026-07-21 12:21 ` Will Deacon [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=178463143320.206840.9481565301808596283.b4-ty@kernel.org \
--to=will@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=guanghuifeng@linux.alibaba.com \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oliver.yang@linux.alibaba.com \
--cc=robin.murphy@arm.com \
--cc=suravee.suthikulpanit@amd.com \
--cc=vasant.hegde@amd.com \
--cc=xlpang@linux.alibaba.com \
/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®