Linux PCI subsystem development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Nicolin Chen" <nicolinc@nvidia.com>
Cc: linux-cxl@vger.kernel.org, linux-pci@vger.kernel.org
Subject: Re: [PATCH v6 15/17] iommu/arm-smmu-v3: Add INV_TYPE_ATS_BROKEN for quarantined masters
Date: Wed, 23 Sep 2026 20:28:43 +0000	[thread overview]
Message-ID: <20260923202843.B17611F000FF@smtp.kernel.org> (raw)
In-Reply-To: <d27ae4b7788ef8582c60fd5865f11c955e277174.1790188511.git.nicolinc@nvidia.com>

> Clearing STE.EATS makes the SMMU reject ATS requests from any quarantined
> master, but does not stop the driver from issuing ATC invalidations for it.
> Those commands would continue to time out.
> 
> Introduce INV_TYPE_ATS_BROKEN, which a subsequent change will assign to the
> master's ATS invalidation entries. Treat it as an ATS type during iteration
> and ordering, but skip it when issuing commands.
> 
> The subsequent quarantine path changes inv->type in place via WRITE_ONCE()
> while readers hold the invalidation array's read lock. Since a u8 load is
> already atomic, arm_smmu_inv_type() uses READ_ONCE() to annotate the race
> for KCSAN. Whole-struct copies in merge and purge cannot use READ_ONCE(),
> so annotate those copies with data_race().
> 
> A stale read at worst issues one more ATC_INV, which times out and causes
> the master to be quarantined again.
> 
> Treat ATS, ATS_FULL, and ATS_BROKEN as one comparator class. This preserves
> the sort position and matching identity when an entry is changed in place.
> 
> No functional change yet; the new type is never set anywhere.
> 
> Suggested-by: Jason Gunthorpe <jgg@nvidia.com>
> Assisted-by: LLM
> Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1790188510.git.nicolinc@nvidia.com?part=15


  reply	other threads:[~2026-09-23 20:28 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-23 20:11 [PATCH v6 00/17] iommu/arm-smmu-v3: Quarantine device upon ATC invalidation timeout Nicolin Chen
2026-09-23 20:11 ` [PATCH v6 01/17] PCI: Don't suspend IOMMU when probing reset capability Nicolin Chen
2026-09-23 20:18   ` sashiko-bot
2026-09-23 20:11 ` [PATCH v6 02/17] PCI/CXL: Probe the underlying bus reset in cxl_reset_bus_function() Nicolin Chen
2026-09-23 20:19   ` sashiko-bot
2026-09-25 23:13   ` Jonathan Cameron
2026-09-23 20:11 ` [PATCH v6 03/17] iommu: Convert gdev->blocked from bool to enum blocked_reason Nicolin Chen
2026-09-23 20:19   ` sashiko-bot
2026-09-23 20:11 ` [PATCH v6 04/17] iommu: Pass in gdev's blocked state to iommu_deinit_device() Nicolin Chen
2026-09-23 20:19   ` sashiko-bot
2026-09-23 20:11 ` [PATCH v6 05/17] iommu: Pass in reset result to pci_dev_reset_iommu_done() Nicolin Chen
2026-09-23 20:20   ` sashiko-bot
2026-09-23 20:11 ` [PATCH v6 06/17] iommu/arm-smmu-v3: Don't rb_erase() a never-inserted stream node Nicolin Chen
2026-09-23 20:19   ` sashiko-bot
2026-09-23 20:30   ` Nicolin Chen
2026-09-24  8:20   ` Mostafa Saleh
2026-09-23 20:11 ` [PATCH v6 07/17] iommu/arm-smmu-v3: Track ATC invalidation timeouts in a bitmap Nicolin Chen
2026-09-23 20:24   ` sashiko-bot
2026-09-23 20:11 ` [PATCH v6 08/17] iommu/arm-smmu-v3: Skip remaining GERROR causes on SFM Nicolin Chen
2026-09-23 20:21   ` sashiko-bot
2026-09-23 20:11 ` [PATCH v6 09/17] iommu/arm-smmu-v3: Introduce per-cmdq cmdq_err_handler callback Nicolin Chen
2026-09-23 20:21   ` sashiko-bot
2026-09-23 20:11 ` [PATCH v6 10/17] iommu/arm-smmu-v3: Recheck CMDQ_ERR in tegra241_vintf0_handle_error() Nicolin Chen
2026-09-23 20:25   ` sashiko-bot
2026-09-23 20:11 ` [PATCH v6 11/17] iommu/arm-smmu-v3: Co-clear pending CMDQ_ERR when CMD_SYNC times out Nicolin Chen
2026-09-23 20:20   ` sashiko-bot
2026-09-23 20:11 ` [PATCH v6 12/17] iommu/arm-smmu-v3: Introduce arm_smmu_cmdq_batch_issue() wrapper Nicolin Chen
2026-09-23 20:20   ` sashiko-bot
2026-09-23 20:11 ` [PATCH v6 13/17] iommu/arm-smmu-v3: Add streams_lock for atomic-context SID->master lookup Nicolin Chen
2026-09-23 20:25   ` sashiko-bot
2026-09-23 20:11 ` [PATCH v6 14/17] iommu/arm-smmu-v3: Add has_ats to struct arm_smmu_cmdq_batch Nicolin Chen
2026-09-23 20:25   ` sashiko-bot
2026-09-23 20:11 ` [PATCH v6 15/17] iommu/arm-smmu-v3: Add INV_TYPE_ATS_BROKEN for quarantined masters Nicolin Chen
2026-09-23 20:28   ` sashiko-bot [this message]
2026-09-23 20:11 ` [PATCH v6 16/17] iommu/arm-smmu-v3: Thread arm_smmu_master_domain on a per-master list Nicolin Chen
2026-09-23 20:26   ` sashiko-bot
2026-09-23 20:11 ` [PATCH v6 17/17] iommu/arm-smmu-v3: Quarantine ATS after an ATC invalidation timeout Nicolin Chen
2026-09-23 20:28   ` sashiko-bot
2026-10-04 16:50 ` [PATCH v6 00/17] iommu/arm-smmu-v3: Quarantine device upon " Will Deacon

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=20260923202843.B17611F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-cxl@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=nicolinc@nvidia.com \
    --cc=sashiko-reviews@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