Skip to content

[26.04_linux-nvidia-bos] PCI: mirror PI7C9X3G606GPC Port 4 BAR0#443

Open
nirmoy wants to merge 1 commit into
NVIDIA:26.04_linux-nvidia-bosfrom
nirmoy:codex/pericom-msix-bar-war-bos
Open

[26.04_linux-nvidia-bos] PCI: mirror PI7C9X3G606GPC Port 4 BAR0#443
nirmoy wants to merge 1 commit into
NVIDIA:26.04_linux-nvidia-bosfrom
nirmoy:codex/pericom-msix-bar-war-bos

Conversation

@nirmoy
Copy link
Copy Markdown
Collaborator

@nirmoy nirmoy commented May 27, 2026

Summary

  • Backport the PI7C9X3G606GPC Port 4 BAR0 workaround from the 6.17 PR.
  • Add a PCI final/resume quirk to mirror the upstream BAR0 value into downstream Port 4 BAR0.
  • Scope the WAR to the Diodes-confirmed OS-visible Tile0/P4 mapping: upstream bus + 1, device 04, function 0.
  • Port 4 BAR0 may read back as zero through normal PCI config space even after a successful write, so the quirk rewrites BAR0 whenever it runs.

Validation

  • Built and installed 7.0.0-2007-nvidia-bos-64k packages from the PR code on nvl4-ts2-70.
  • Tested on the Quark DUT: OS 172.17.33.143 via jumper 10.22.18.250; BMC 172.17.33.144.
  • The current PR head f171d75fa16f00e54a955c581688f1a556fdd701 is a message-only respin from the tested package commit b8360680d0aa3ae8f5e517c080867831d6f26a73; git diff b8360680d0aa3ae8f5e517c080867831d6f26a73..f171d75fa16f00e54a955c581688f1a556fdd701 --stat is empty.
  • Booted the DUT into the PR kernel:
Linux localhost-right 7.0.0-2007-nvidia-bos-64k #7 SMP PREEMPT_DYNAMIC Thu May 28 19:54:58 UTC 2026 aarch64
  • Quirk/topology evidence from the booted BOS kernel:
pci 0002:a1:00.0: BAR 0 [mem 0x10300000-0x1037ffff]
pci 0002:a2:04.0: [12d8:c008] type 01 class 0x060400 PCIe Switch Downstream Port
pci 0002:a3:00.0: [1344:51c3] type 00 class 0x010802 PCIe Endpoint
pci 0002:a1:00.0: BAR 0 [mem 0x10300000-0x1037ffff]: assigned
pci 0002:a2:04.0: wrote upstream BAR 0 0x10300000 to Port 4 BAR 0 for PI7C9X3G606GPC BAR0 mirror workaround
  • Rootfs stayed read-write on the NVMe/BTRFS device:
/dev/nvme0n1p2[/@root/versions/v-diagos-snapshot-20260421] btrfs rw,relatime,ssd,discard=async,space_cache=v2,subvolid=264,subvol=/@root/versions/v-diagos-snapshot-20260421
  • Ran a 300s fio randrw smoke on the NVMe-backed rootfs:
fio --name=pr443-rootfs-smoke --filename=/home/nvidia/pericom-pr443/fio/testfile --size=4G --rw=randrw --rwmixread=70 --bs=128k --iodepth=32 --direct=1 --runtime=300 --time_based --group_reporting
pr443-rootfs-smoke: err= 0
READ: bw=252MiB/s, io=74.0GiB, run=300001msec
WRITE: bw=108MiB/s, io=31.8GiB, run=300001msec
  • Post-fio journalctl -b -k scan for BTRFS error, I/O error, nvme.*timeout, device inaccessible, read-only, blk_update_request, and Buffer I/O error returned no matches.
  • Did not use the BMC/I2C BAR0 readback helper for this validation. The Quark platform owner said that helper uses special CPED/CDEP access that is not supported as routine validation on this platform and can put the PCIe switch into a bad state.

Notes:

  • The 24.04 DUT needed a temporary run-parts compatibility wrapper to run the 26.04 BOS kernel maintscripts, which pass multiple hook directories. The wrapper was removed after package configuration.
  • OFED 26.01 DKMS modules iser, isert, mlnx-ofed-kernel, and srp report kernel package linux-headers-7.0.0-2007-nvidia-bos-64k is not supported on this 24.04 DUT. The DKMS hooks were temporarily bypassed only to finish package configuration/initramfs/grub; hooks were restored afterward.

References

Launchpad: https://bugs.launchpad.net/ubuntu/+source/linux-nvidia-6.17/+bug/2154457

6.17 PR: #442
NVBug: https://nvbugspro.nvidia.com/bug/6205517
NVBug: https://nvbugspro.nvidia.com/bug/6134331

@nirmoy nirmoy added the help wanted Extra attention is needed label May 27, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 27, 2026

PR Validation Report

Patchscan ✅ No Missing Fixes

All cherry-picked commits checked — no missing upstream fixes found.

PR Lint ✅ All checks passed

Details
Checking 1 commits...

Cherry-pick digest:
┌──────────────┬──────────────────────────────────────────────────────────────────┬────────────┬─────────┬───────────────────────────┐
│ Local        │ Referenced upstream / Patch subject                              │ Patch-ID   │ Subject │ SoB chain                 │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ f171d75fa16f │ [SAUCE] pci: quirks: mirror pi7c9x3g606gpc port 4 bar0           │ N/A        │ N/A     │ nirmoyd                   │
└──────────────┴──────────────────────────────────────────────────────────────────┴────────────┴─────────┴───────────────────────────┘

Lint: all checks passed.

@nirmoy
Copy link
Copy Markdown
Collaborator Author

nirmoy commented May 27, 2026

Boro review

Latest watcher review: open review

Head: b8360680d0aa

This comment is maintained by nv-pr-bot. It is updated when the GitHub watcher publishes a newer review.

@nirmoy nirmoy force-pushed the codex/pericom-msix-bar-war-bos branch from ed7f4ba to 5f3ea04 Compare May 28, 2026 13:22
@nirmoy nirmoy marked this pull request as ready for review May 28, 2026 14:17
@nirmoy nirmoy marked this pull request as draft May 28, 2026 15:00
@nirmoy nirmoy removed the help wanted Extra attention is needed label May 28, 2026
@nirmoy nirmoy force-pushed the codex/pericom-msix-bar-war-bos branch from 5f3ea04 to b836068 Compare May 28, 2026 19:33
Some Pericom/Diodes PI7C9X3G606GPC switches require downstream Port 4
BAR0 to mirror BAR0 of the immediate upstream port. Firmware may apply
this during boot, but Linux PCI resource assignment can move the
upstream BAR0 and leave Port 4 without the required mirror.

Diodes confirmed that Tile0/P4 is OS-visible as device 04, function 0
on the bus below the upstream port. Add a final and resume quirk for
that downstream function. The quirk verifies that the immediate upstream
bridge is the same switch, then writes Port 4 BAR0 from the upstream
BAR0 after resource assignment and after resume. Port 4 BAR0 may read
back as zero even after a successful write, so the write must be
validated by platform-specific means.

Change-Id: I139ffad14467cabd4cc8491823f36e34bc876ea1
Signed-off-by: Nirmoy Das <nirmoyd@nvidia.com>
@nirmoy nirmoy force-pushed the codex/pericom-msix-bar-war-bos branch from b836068 to f171d75 Compare May 28, 2026 20:42
@nirmoy nirmoy marked this pull request as ready for review May 28, 2026 21:01
@nirmoy nirmoy added the help wanted Extra attention is needed label May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

help wanted Extra attention is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant