From: Niklas Schnelle <schnelle@linux.ibm.com>
To: Bjorn Helgaas <bhelgaas@google.com>
Cc: Jan Kiszka <jan.kiszka@siemens.com>,
Huacai Chen <chenhuacai@kernel.org>,
Bibo Mao <maobibo@loongson.cn>,
linux-s390 <linux-s390@vger.kernel.org>,
loongarch@lists.linux.dev, Farhan Ali <alifm@linux.ibm.com>,
Matthew Rosato <mjrosato@linux.ibm.com>,
Tianrui Zhao <zhaotianrui@loongson.cn>,
Gerald Schaefer <gerald.schaefer@linux.ibm.com>,
Heiko Carstens <hca@linux.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>,
Alexander Gordeev <agordeev@linux.ibm.com>,
Sven Schnelle <svens@linux.ibm.com>,
Christian Borntraeger <borntraeger@linux.ibm.com>,
Gerd Bayer <gbayer@linux.ibm.com>,
linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-pci@vger.kernel.org,
Niklas Schnelle <schnelle@linux.ibm.com>
Subject: [PATCH v5 0/2] PCI: Fix isolated function probing and enable ARI for s390
Date: Wed, 29 Oct 2025 10:41:30 +0100 [thread overview]
Message-ID: <20251029-ari_no_bus_dev-v5-0-d9a5eab67ed0@linux.ibm.com> (raw)
Hi Bjorn,
This series originally aimed to correctly detect ARI as being used on
s390. I had missed however that this, in a pretty obious manner, breaks
the isolated function probing resulting devices not getting probed. For
example if a partition/system only has a PF with devfn 1 passed-through.
Additionally the fix may (TBD) help with an issue that LoongArch has
encountered when using isolated function probing and tried to fix by
limiting it to bus 0 ([0]). If it does fix this it may make sense to
apply this separately from the second patch.
Besides the effect on s390 the second patch should also ensure that VFs
on a virtual bus created via virtfn_add_bus() correctly present ARI as
enabled. Sadly I don't have access to any device to test this.
Speaking of testing. For the first patch I can reproduce the AER
scenario described by only applying the second patch. The SR-IOV
scenario I encountered in the past before commit 25f39d3dcb48 ("s390/pci:
Ignore RID for isolated VFs") and tested the fix now with a partial
revert hack of that commit.
I also tested the series on x86_64 both on a Ryzen AI 340 based laptop
and a Xeon Sapphire Rapids based system (including with SR-IOV on
a ConnectX-6 DX).
Thanks,
Niklas
[0] https://lore.kernel.org/linux-pci/20251014074100.2149737-1-chenhuacai@loongson.cn/
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
---
Changes in v5:
- Rename variables to match "fn" abbreviation
- Add Cc stable
- Rebase on v6.18-rc3
- Link to v4: https://lore.kernel.org/r/20251023-ari_no_bus_dev-v4-0-8482e2ed10bd@linux.ibm.com
Changes in v4:
- Add fix of isolated function probing with ARI enabled and in certain
cases with SR-IOV devices.
- Link to v3: https://lore.kernel.org/r/20250417-ari_no_bus_dev-v3-1-ba48f349aa47@linux.ibm.com
Changes in v3:
- Move setting of ari_enabled on s390 to bus creation and clear it in
pcibios_add_device() if the capability is not available.
- Rebase on v6.15-rc2
- Link to v2: https://lore.kernel.org/r/20240918-ari_no_bus_dev-v2-1-83cfa991082f@linux.ibm.com
Changes in v2:
- Rebased on v6.11
- Link to v1: https://lore.kernel.org/r/20240730-ari_no_bus_dev-v1-1-7de17676f9fe@linux.ibm.com
---
Niklas Schnelle (2):
PCI: Fix isolated PCI function probing with ARI and SR-IOV
PCI: s390: Handle ARI on bus without associated struct pci_dev
arch/s390/pci/pci.c | 7 +++++++
arch/s390/pci/pci_bus.c | 10 ++++++++++
drivers/pci/pci.c | 4 ++--
drivers/pci/probe.c | 22 ++++++++++++++--------
include/linux/pci.h | 4 ++--
5 files changed, 35 insertions(+), 12 deletions(-)
---
base-commit: dcb6fa37fd7bc9c3d2b066329b0d27dedf8becaa
change-id: 20240724-ari_no_bus_dev-52b2a27f3466
Best regards,
--
Niklas Schnelle
next reply other threads:[~2025-10-29 9:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-29 9:41 Niklas Schnelle [this message]
2025-10-29 9:41 ` [PATCH v5 1/2] PCI: Fix isolated PCI function probing with ARI and SR-IOV Niklas Schnelle
2025-11-03 9:50 ` Huacai Chen
2025-11-03 11:23 ` Niklas Schnelle
2025-11-05 1:01 ` Huacai Chen
2025-11-05 9:46 ` Niklas Schnelle
2025-10-29 9:41 ` [PATCH v5 2/2] PCI: s390: Handle ARI on bus without associated struct pci_dev Niklas Schnelle
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=20251029-ari_no_bus_dev-v5-0-d9a5eab67ed0@linux.ibm.com \
--to=schnelle@linux.ibm.com \
--cc=agordeev@linux.ibm.com \
--cc=alifm@linux.ibm.com \
--cc=bhelgaas@google.com \
--cc=borntraeger@linux.ibm.com \
--cc=chenhuacai@kernel.org \
--cc=gbayer@linux.ibm.com \
--cc=gerald.schaefer@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=jan.kiszka@siemens.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=loongarch@lists.linux.dev \
--cc=maobibo@loongson.cn \
--cc=mjrosato@linux.ibm.com \
--cc=svens@linux.ibm.com \
--cc=zhaotianrui@loongson.cn \
/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;
as well as URLs for NNTP newsgroup(s).