[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251023-ari_no_bus_dev-v4-0-8482e2ed10bd@linux.ibm.com>
Date: Thu, 23 Oct 2025 17:20:40 +0200
From: Niklas Schnelle <schnelle@...ux.ibm.com>
To: Bjorn Helgaas <bhelgaas@...gle.com>
Cc: Jan Kiszka <jan.kiszka@...mens.com>, Huacai Chen <chenhuacai@...nel.org>,
linux-s390 <linux-s390@...r.kernel.org>, loongarch@...ts.linux.dev,
Farhan Ali <alifm@...ux.ibm.com>,
Matthew Rosato <mjrosato@...ux.ibm.com>,
Tianrui Zhao <zhaotianrui@...ngson.cn>,
Gerald Schaefer <gerald.schaefer@...ux.ibm.com>,
Heiko Carstens <hca@...ux.ibm.com>, Vasily Gorbik <gor@...ux.ibm.com>,
Alexander Gordeev <agordeev@...ux.ibm.com>,
Sven Schnelle <svens@...ux.ibm.com>,
Christian Borntraeger <borntraeger@...ux.ibm.com>,
Gerd Bayer <gbayer@...ux.ibm.com>, linux-s390@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org,
jailhouse-dev@...glegroups.com,
Niklas Schnelle <schnelle@...ux.ibm.com>
Subject: [PATCH v4 0/2] PCI: Fix isolated function probing and enable ARI
for s390
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@...ux.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 | 21 +++++++++++++--------
include/linux/pci.h | 4 ++--
5 files changed, 34 insertions(+), 12 deletions(-)
---
base-commit: 211ddde0823f1442e4ad052a2f30f050145ccada
change-id: 20240724-ari_no_bus_dev-52b2a27f3466
Best regards,
--
Niklas Schnelle
Powered by blists - more mailing lists