From: Keith Busch <kbusch@kernel.org>
To: Matthew Wood <thepacketgeek@gmail.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
Alex Williamson <alex@shazbot.org>,
kvm@vger.kernel.org,
Nikita Vetoshkin <nikita.vetoshkin@gmail.com>
Subject: Re: [PATCH v2 1/5] PCI: Add disconnected device checks to user config reads
Date: Tue, 3 Nov 2026 11:25:29 -0700 [thread overview]
Message-ID: <auonGbUxnZKA1A34@kbusch-mbp> (raw)
In-Reply-To: <20261029192032.1325629-2-thepacketgeek@gmail.com>
On Thu, Oct 29, 2026 at 12:20:25PM -0700, Matthew Wood wrote:
> Since commit 4b1038834739 ("PCI: Don't attempt config access to
> disconnected devices") the kernel config read accessors skip devices
> marked disconnected, returning PCIBIOS_DEVICE_NOT_FOUND and ~0 data.
> The user config read accessors still issue the read, and if the host
> bridge completes it with ~0 data and no error, they report success.
>
> Check pci_dev_is_disconnected() in pci_user_read_config_*() as well,
> failing with -ENODEV and ~0 data. Do the check after waiting for any
> pci_cfg_access_lock() holder so a reader blocked behind a reset also
> sees a device that was disconnected while it waited.
Looks good.
Reviewed-by: Keith Busch <kbusch@kernel.org>
next prev parent reply other threads:[~2026-11-03 18:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-29 19:20 [PATCH v2 0/5] PCI/sysfs: Wait for config access lock in sysfs attributes Matthew Wood
2026-10-29 19:20 ` [PATCH v2 1/5] PCI: Add disconnected device checks to user config reads Matthew Wood
2026-11-03 18:25 ` Keith Busch [this message]
2026-10-29 19:20 ` [PATCH v2 2/5] PCI/sysfs: Use user config accessors for bus number attributes Matthew Wood
2026-10-29 19:20 ` [PATCH v2 3/5] PCI: Add pcie_capability_user_read_{word,dword}() Matthew Wood
2026-10-29 19:20 ` [PATCH v2 4/5] PCI/sysfs: Use user config accessors for link attributes Matthew Wood
2026-10-29 19:20 ` [PATCH v2 5/5] PCI/sysfs: Use user config accessors for serial_number Matthew Wood
2026-11-03 18:25 ` Keith Busch
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=auonGbUxnZKA1A34@kbusch-mbp \
--to=kbusch@kernel.org \
--cc=alex@shazbot.org \
--cc=bhelgaas@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=nikita.vetoshkin@gmail.com \
--cc=thepacketgeek@gmail.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®