[UBUNTU 22.04] PCHID per Port Toleration - IBM z17 Enablement
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu on IBM z Systems |
Fix Committed
|
High
|
Skipper Bug Screeners | ||
linux (Ubuntu) |
Fix Committed
|
Medium
|
Unassigned | ||
Jammy |
Won't Fix
|
Undecided
|
Massimiliano Pellizzer | ||
Noble |
Fix Released
|
Undecided
|
Unassigned | ||
Plucky |
Fix Released
|
Undecided
|
Unassigned | ||
Questing |
Fix Committed
|
Medium
|
Unassigned |
Bug Description
[ Impact ]
Improve how s390 kernel discovers and organizes PCI devices, making it more robust, predictable, and compatible with modern hardware and virtualization scenarios.
Previously, PCI functions were grouped based on firmware-provided order and physical channel IDs (PCHIDs), leading to unstable device numbering and incorrect grouping in complex setups.
The new implementation explicitly sorts PCI functions by Requester ID (RID) and uses Topology IDs (TIDs) to group multi-function devices, ensuring deterministic and future-proof bus/domain creation. It fixes SR-IOV behavior by properly grouping Physical Functions (PFs) and Virtual Functions (VFs), allowing PFs initially in standby to form shared domains and treating isolated VFs without a parent PF as standalone devices.
Parent PF detection has been refactored for consistency, and error handling has been improved to prevent leaks and crashes when adding devices dynamically.
[ Fix ]
Backport to Jammy the following commits:
52c79e636a58da s390/pci: make better use of zpci_dbg() levels
0467cdde8c4320 s390/pci: Sort PCI functions prior to creating virtual busses
126034faaac5f3 s390/pci: Use topology ID for multi-function devices
fd1ae23b495b3a PCI: Prefer 'unsigned int' over bare 'unsigned'
c3df83e01a96ca PCI: Clean up pci_scan_slot()
fbed59ed8781d7 PCI: Split out next_ari_fn() from next_fn()
db360b1ea7faef PCI: Move jailhouse's isolated function handling to pci_scan_slot()
189c6c33ff421d PCI: Extend isolated function probing to s390
960ac362648780 s390/pci: allow zPCI zbus without a function zero
45e5f0c017e0d0 s390/pci: clean up left over special treatment for function zero
25f39d3dcb48bb s390/pci: Ignore RID for isolated VFs
48796104c864cf s390/pci: Fix leak of struct zpci_dev when zpci_add_device() fails
dc287e4c9149ab s390/pci: Fix SR-IOV for PFs initially in standby
05793884a1f305 s390/pci: Pull search for parent PF out of zpci_iov_
2844ddbd540fc8 s390/pci: Fix handling of isolated VFs
8691abd3afaadd s390/pci: Fix zpci_bus_
42420c50c68f3e s390/pci: Fix missing check for zpci_create_
[ Test Case ]
Testing must be performed on an IBM z17 with Network Express adapters in direct mode.
Begin by attaching at least one adapter with two PFs, each mapped to a separate port, and confirm that the kernel groups them correctly into distinct domains without relying on PCHID ordering.
Next, enable SR-IOV on each PF and verify that child VFs are discovered, grouped with the correct PFs, and functional. Test with PFs initially in standby to ensure that shared domains are created dynamically. Introduce isolated VFs without a visible PF and confirm they enumerate as standalone devices.
Finally, perform hotplug and removal of both PFs and VFs, checking that zpci_dev structures are cleaned up correctly without leaks or crashes.
[ Regression Potential ]
The patchset affects s390 PCI subsystem, in particular:
- device enumeration
- function grouping
- SR-IOV handling
An issue in this code may introduce problems such as incorrect grouping of PFs and VFs, unstable bus numbering, or failure to associate VFs with their parent PFs.
[ Other Info ]
The patchset has already been tested by IBM using the following PPA:
- https:/
---
Description:
PCHID per port toleration is required by the new IBM z17 machine.
This has already been included in Ubuntu 25.04
(see LP#2095480 : PCHID per Port Toleration).
This toleration item is also needed in Noble and Jammy in order to support new hardware in both LTS releases.
tags: | added: architecture-s39064 bugnameltc-214652 severity-high targetmilestone-inin--- |
Changed in ubuntu: | |
assignee: | nobody → Skipper Bug Screeners (skipper-screen-team) |
affects: | ubuntu → linux (Ubuntu) |
Changed in ubuntu-z-systems: | |
assignee: | nobody → Skipper Bug Screeners (skipper-screen-team) |
Changed in linux (Ubuntu): | |
assignee: | Skipper Bug Screeners (skipper-screen-team) → nobody |
importance: | Undecided → Medium |
Changed in ubuntu-z-systems: | |
importance: | Undecided → High |
tags: | added: kernel-daily-bug |
Changed in ubuntu-z-systems: | |
status: | New → In Progress |
description: | updated |
Changed in linux (Ubuntu Jammy): | |
status: | Triaged → In Progress |
Changed in linux (Ubuntu Jammy): | |
status: | Deferred → Won't Fix |
Changed in ubuntu-z-systems: | |
status: | In Progress → Fix Committed |
------- Comment From <email address hidden> 2025-08-06 10:01 EDT-------
This item consists of two parts:
Part 1 (commits in order of application):
0467cdde8c4320b bfdb31a8cff1277 b202f677fc s390/pci: Sort PCI functions prior to creating virtual busses 6822c4a9bebfa75 664da11056 s390/pci: Use topology ID for multi-function devices 824a77d16b3d977 f0f3713cfe s390/pci: Ignore RID for isolated VFs dafa80bd8c2ce88 f9c92a65ea s390/pci: Fix leak of struct zpci_dev when zpci_add_device() fails
126034faaac5f35
25f39d3dcb48bbc
48796104c864cf4
Part 2 (fixing two issues with the PCHID per port multi-function detection):
dc287e4c9149ab5 4a5003b4d4da007 818b5fda3d s390/pci: Fix SR-IOV for PFs initially in standby 9e477de9da233ab 73584b1c8c s390/pci: Pull search for parent PF out of zpci_iov_ setup_virtfn( ) d7571cca65d6c43 088e4d6952 s390/pci: Fix handling of isolated VFs
05793884a1f3050
2844ddbd540fc84