All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolin Chen <nicolinc@nvidia.com>
To: "Tian, Kevin" <kevin.tian@intel.com>
Cc: "bhelgaas@google.com" <bhelgaas@google.com>,
	"joerg.roedel@amd.com" <joerg.roedel@amd.com>,
	"jgg@nvidia.com" <jgg@nvidia.com>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"xueshuai@linux.alibaba.com" <xueshuai@linux.alibaba.com>
Subject: Re: [PATCH rc] PCI: Fix nested pci_dev_reset_iommu_prepare/done()
Date: Wed, 18 Mar 2026 20:06:38 -0700	[thread overview]
Message-ID: <abtoPiYKGzJ1a8MX@Asurada-Nvidia> (raw)
In-Reply-To: <BN9PR11MB527654AC35FD1EE8CDF7E1828C4FA@BN9PR11MB5276.namprd11.prod.outlook.com>

On Thu, Mar 19, 2026 at 03:00:58AM +0000, Tian, Kevin wrote:
> Looking at handlers like reset_intel_82599_sfp_virtfn(), the return value of
> pcie_flr() is not checked:
> static int reset_intel_82599_sfp_virtfn(struct pci_dev *dev, bool probe)
> {
> 	if (!probe)
> 		pcie_flr(dev);
> 	return 0;
> }
> Similarly, delay_250ms_after_flr() ignores the return value when actually
> performing the reset:
> static int delay_250ms_after_flr(struct pci_dev *dev, bool probe)
> {
> 	if (probe)
> 		return pcie_reset_flr(dev, PCI_RESET_PROBE);
> 	pcie_reset_flr(dev, PCI_RESET_DO_RESET);
> 	msleep(250);
> 	return 0;
> }
> If pci_dev_reset_iommu_prepare() fails inside pcie_flr(), the function aborts
> the FLR and returns an error. However, since the quirk handlers swallow this
> error, the PCI subsystem is falsely told that the device reset succeeded. 
> Could this falsely reported success leave sensitive device state uncleared
> between host and guest environments? Can we ensure the return value from the
> inner reset functions is properly propagated to prevent this?

Yea, looks like we need a preparatory patch for the other series.

Thanks
Nicolin

      reply	other threads:[~2026-03-19  3:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-18 22:00 [PATCH rc] PCI: Fix nested pci_dev_reset_iommu_prepare/done() Nicolin Chen
2026-03-18 22:57 ` Bjorn Helgaas
2026-03-18 23:35   ` Nicolin Chen
2026-03-19  2:22 ` Tian, Kevin
2026-03-19  2:42   ` Nicolin Chen
2026-03-19  3:00     ` Tian, Kevin
2026-03-19  3:06       ` Nicolin Chen [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=abtoPiYKGzJ1a8MX@Asurada-Nvidia \
    --to=nicolinc@nvidia.com \
    --cc=bhelgaas@google.com \
    --cc=jgg@nvidia.com \
    --cc=joerg.roedel@amd.com \
    --cc=kevin.tian@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=xueshuai@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 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.