Skip to content

[24.04_linux-nvidia-6.17]: Backport PCI/MSI: Enable memory decoding before restoring MSI-X messages#472

Closed
nvmochs wants to merge 1 commit into
NVIDIA:24.04_linux-nvidia-6.17-nextfrom
nvmochs:enable_memory_decode_vfio_617
Closed

[24.04_linux-nvidia-6.17]: Backport PCI/MSI: Enable memory decoding before restoring MSI-X messages#472
nvmochs wants to merge 1 commit into
NVIDIA:24.04_linux-nvidia-6.17-nextfrom
nvmochs:enable_memory_decode_vfio_617

Conversation

@nvmochs

@nvmochs nvmochs commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

During VFIO/FLR recovery, the saved PCI Command register state may have Memory Space disabled. Restoring MSI-X messages in that state can issue MMIO writes to the MSI-X table while memory decoding is off, causing Unsupported Request completions and DPC containment on the root port.

The patch enables PCI_COMMAND_MEMORY before MSI-X restore and restores the original Command register value afterward.

The patch is currently under review on LKML and is therefore taking as SAUCE: https://lore.kernel.org/all/c8abc1c8-71e0-443f-820f-182c0ff931e9@linux.ibm.com/

Note that the patch applied cleanly.

As of now, this issue only impacts VR systems as GB is currently configured to treat UR as ANF.

Validation

  • Verified backport is patch-id identical to the referenced LKML v20 patch.
  • scripts/checkpatch.pl --strict --git HEAD
  • git diff --check HEAD~1 HEAD

Nvbug: 6375598
LP: https://bugs.launchpad.net/ubuntu/+source/linux-nvidia-bos/+bug/2158328

… messages

The current MSI-X restoration path assumes the Command register Memory bit
is enabled when writing MSI-X messages. But its possible the last saved and
restored state of device may not have the Memory bit enabled, even if a
device driver later enables Memory bit and MSI-X. Attempting to access
Memory space without Memory bit enabled can lead to Unsupported Request
(UR) from the device. Fix this by enabling Memory bit and restore
it afterwards.

Signed-off-by: Farhan Ali <alifm@linux.ibm.com>
Reviewed-by: Niklas Schnelle <schnelle@linux.ibm.com>
Reviewed-by: Thomas Gleixner <tglx@kernel.org>
(cherry picked from https://lore.kernel.org/all/20260622171840.1618-5-alifm@linux.ibm.com/)
Signed-off-by: Matthew R. Ochs <mochs@nvidia.com>
@nvmochs nvmochs requested review from clsotog and nirmoy June 25, 2026 19:33
@nirmoy nirmoy added the help wanted Extra attention is needed label Jun 25, 2026
@nirmoy

nirmoy commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

BaseOS Kernel Review

Summary

No significant issues found; the only finding is minor grammatical errors in the commit message body of d3b5b98, which have no functional impact.

Findings: Critical: 0, High: 0, Medium: 0, Low: 1

Latest watcher review: open review

Kernel deb build: failed (failure log, build artifacts)

Head: d3b5b98154e2

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

@github-actions

Copy link
Copy Markdown
Contributor

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                 │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ d3b5b98154e2 │ [SAUCE] pci/msi: enable memory decoding before restoring msi-x m │ N/A        │ N/A     │ alifm, mochs              │
└──────────────┴──────────────────────────────────────────────────────────────────┴────────────┴─────────┴───────────────────────────┘

Lint: all checks passed.

@clsotog clsotog left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acked-by: Carol L Soto <csoto@nvidia.com>

@sforshee sforshee left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acked-by: Seth Forshee <sforshee@nvidia.com>

@nirmoy nirmoy added has_2_acks and removed help wanted Extra attention is needed has_1_ack labels Jun 25, 2026
@nvmochs

nvmochs commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator Author

Merged, closing PR.

362b68daf984 (nnoble/nvidia-6.17-next) NVIDIA: SAUCE: PCI/MSI: Enable memory decoding before restoring MSI-X messages

@nvmochs nvmochs closed this Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants