linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 0/2] PCI: Fix isolated function probing and enable ARI for s390
@ 2025-10-29  9:41 Niklas Schnelle
  2025-10-29  9:41 ` [PATCH v5 1/2] PCI: Fix isolated PCI function probing with ARI and SR-IOV Niklas Schnelle
  2025-10-29  9:41 ` [PATCH v5 2/2] PCI: s390: Handle ARI on bus without associated struct pci_dev Niklas Schnelle
  0 siblings, 2 replies; 8+ messages in thread
From: Niklas Schnelle @ 2025-10-29  9:41 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Jan Kiszka, Huacai Chen, Bibo Mao, linux-s390, loongarch,
	Farhan Ali, Matthew Rosato, Tianrui Zhao, Gerald Schaefer,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev, Sven Schnelle,
	Christian Borntraeger, Gerd Bayer, linux-s390, linux-kernel,
	linux-pci, Niklas Schnelle

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-11-07  7:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-29  9:41 [PATCH v5 0/2] PCI: Fix isolated function probing and enable ARI for s390 Niklas Schnelle
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-11-07  7:19           ` Huacai Chen
2025-10-29  9:41 ` [PATCH v5 2/2] PCI: s390: Handle ARI on bus without associated struct pci_dev Niklas Schnelle

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).