All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolin Chen <nicolinc@nvidia.com>
To: Vidya Sagar <vidyas@nvidia.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	Dan Williams <djbw@kernel.org>,
	"Dave Jiang" <dave.jiang@intel.com>,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	Joerg Roedel <joerg.roedel@amd.com>,
	Jason Gunthorpe <jgg@ziepe.ca>,
	"Kevin Tian" <kevin.tian@intel.com>, <vsethi@nvidia.com>,
	<kthota@nvidia.com>, <mmaddireddy@nvidia.com>,
	<kumarahul@nvidia.com>, <sagar.tv@gmail.com>,
	<linux-pci@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH V1 2/4] PCI: Don't run IOMMU reset hooks when only probing reset methods
Date: Thu, 19 Nov 2026 08:39:13 -0800	[thread overview]
Message-ID: <av8mMSeRUyobKMgJ@nvidia.com> (raw)
In-Reply-To: <20261119100628.1948990-3-vidyas@nvidia.com>

On Thu, Nov 19, 2026 at 03:36:26PM +0530, Vidya Sagar wrote:
> pci_reset_bus_function() and __pci_dev_specific_reset() call
> pci_dev_reset_iommu_prepare() and pci_dev_reset_iommu_done() even when
> "probe" is set and no reset follows.  The other reset methods that use
> these hooks, pcie_flr(), pci_af_flr(), pci_pm_reset() and
> pci_dev_acpi_reset(), only call them when actually resetting.
> 
> Reset methods are probed at enumeration, before the IOMMU is set up, but
> also whenever "reset_method" is written in sysfs.  For an ATS-capable
> device behind an IOMMU, each such probe of "bus" or of a device-specific
> reset attaches the blocking domain and then re-attaches the device's
> domains.  That blocks any DMA in the window and, on arm-smmu-v3, sends
> ATC invalidations, even while a driver is bound and using the device.
> 
> Return before the IOMMU hooks when probing, as the other reset methods
> do.
> 
> Fixes: f5b16b802174 ("PCI: Suspend iommu function prior to resetting a device")

We already have a similar fix here that Bjorn acked:
https://lore.kernel.org/linux-iommu/c66d5221a8e4356316d4f614c8584a80dc9d71b6.1793729707.git.nicolinc@nvidia.com/

I am waiting for Joerg to take the series.

Nicolin

  parent reply	other threads:[~2026-11-19 16:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19 10:06 [PATCH V1 0/4] PCI: Don't list reset methods that can't reset the device Vidya Sagar
2026-11-19 10:06 ` [PATCH V1 1/4] PCI/CXL: Don't offer 'cxl_bus' reset where a bus reset can't work Vidya Sagar
2026-11-19 10:20   ` sashiko-bot
2026-11-19 10:06 ` [PATCH V1 2/4] PCI: Don't run IOMMU reset hooks when only probing reset methods Vidya Sagar
2026-11-19 10:14   ` sashiko-bot
2026-11-19 16:39   ` Nicolin Chen [this message]
2026-11-19 10:06 ` [PATCH V1 3/4] PCI/sysfs: Take the device lock when setting " Vidya Sagar
2026-11-19 10:20   ` sashiko-bot
2026-11-19 10:06 ` [PATCH V1 4/4] PCI: Re-check function 0 reset methods after scanning its slot Vidya Sagar
2026-11-19 10:32   ` sashiko-bot

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=av8mMSeRUyobKMgJ@nvidia.com \
    --to=nicolinc@nvidia.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=bhelgaas@google.com \
    --cc=dave.jiang@intel.com \
    --cc=djbw@kernel.org \
    --cc=jgg@ziepe.ca \
    --cc=joerg.roedel@amd.com \
    --cc=kevin.tian@intel.com \
    --cc=kthota@nvidia.com \
    --cc=kumarahul@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mmaddireddy@nvidia.com \
    --cc=sagar.tv@gmail.com \
    --cc=vidyas@nvidia.com \
    --cc=vsethi@nvidia.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 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.