Skip to content

[for 26.04_linux-nvidia-bos]: NVIDIA: SAUCE: iommu/arm-smmu-v3: Use identity domain for ASPEED BMC devices#392

Closed
kobak2026 wants to merge 1 commit into
NVIDIA:26.04_linux-nvidia-bosfrom
kobak2026:aspeed_smmu_identity_for_7.0_bos
Closed

[for 26.04_linux-nvidia-bos]: NVIDIA: SAUCE: iommu/arm-smmu-v3: Use identity domain for ASPEED BMC devices#392
kobak2026 wants to merge 1 commit into
NVIDIA:26.04_linux-nvidia-bosfrom
kobak2026:aspeed_smmu_identity_for_7.0_bos

Conversation

@kobak2026
Copy link
Copy Markdown
Collaborator

@kobak2026 kobak2026 commented Apr 27, 2026

Backport of #371 to 26.04_linux-nvidia-bos (kernel 7.0).

Companion to #371 (24.04_linux-nvidia-6.17-next).
BugLink: 5918716

Backport delta vs PR #371

Single rename in drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:

PCI_DEV_FLAGS_PCI_BRIDGE_NO_ALIASESPCI_DEV_FLAGS_PCI_BRIDGE_NO_ALIAS

The flag was renamed between 6.17 and 7.0 (include/linux/pci.h declares
it as bit 14 in 7.0 vs bit 15 in 6.17). The AST1150 NO_ALIAS quirk
(drivers/pci/quirks.c:quirk_aspeed_pci_bridge_no_alias) is already
present on this branch, so the dev_flags check fires correctly.

Sanity build

make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- defconfig
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.o

builds cleanly; arm_smmu_def_domain_type is present in the resulting
object.

Verification carried over from PR #371

Test ASPEED F_TRANSLATION USB VGA
Without fix (passthrough=0) 8+ faults per boot Works Works
iommu.passthrough=1 Zero Works Works
With identity domain patch Zero Works Works

Verified on Vera by Koba Ko and Carol Soto on 2026-04-15.


LP: https://bugs.launchpad.net/ubuntu/+source/linux-nvidia/+bug/2150470

@kobak2026 kobak2026 requested review from clsotog, nirmoy and nvmochs April 27, 2026 15:21
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 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                 │
├──────────────┼───────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 8c2d38a54cc6 │ [SAUCE] iommu/arm-smmu-v3: use identity domai │ N/A        │ N/A     │ kobak, kobak              │
└──────────────┴───────────────────────────────────────────────┴────────────┴─────────┴───────────────────────────┘

Lint: all checks passed.

@nvmochs
Copy link
Copy Markdown
Collaborator

nvmochs commented Apr 27, 2026

If we're going to pick this from 6.17-HWE then I think we should wait for the the original patch to merged into 6.17.

@kobak2026 kobak2026 force-pushed the aspeed_smmu_identity_for_7.0_bos branch 2 times, most recently from 0a9f682 to c180164 Compare April 27, 2026 18:15
@nvmochs
Copy link
Copy Markdown
Collaborator

nvmochs commented Apr 27, 2026

@kobak2026

Instead of

(cherry picked from commit 738fff0e2060b6b383c21afdf1366330d9c79698)

Use

(backported from commit 738fff0e2060b6b383c21afdf1366330d9c79698 linux-nvidia-6.17)

…devices

ASPEED BMC devices behind an AST1150 PCIe-to-PCI bridge receive DMA
from BMC firmware using host physical addresses that bypass the
kernel's DMA API entirely.

When these devices are assigned a DMA translated domain, the SMMU
generates F_TRANSLATION faults because the BMC's physical addresses
have no corresponding IOVA mappings in the SMMU page tables.

Fix this by returning IOMMU_DOMAIN_IDENTITY for PCI devices whose
parent bridge has both the PCI_BRIDGE_NO_ALIASES flag and an ASPEED
vendor ID, so the SMMU passes BMC DMA transactions through
untranslated.

Signed-off-by: Koba Ko <kobak@nvidia.com>
(backported from commit 738fff0 linux-nvidia-6.17)
[koba: rename PCI_DEV_FLAGS_PCI_BRIDGE_NO_ALIASES ->
       PCI_DEV_FLAGS_PCI_BRIDGE_NO_ALIAS; Nirmoy's upstream AST1150
       NO_ALIAS quirk in 7.0 uses the singular form (bit 14 in
       include/linux/pci.h) vs the plural form (bit 15) in 6.17-next]
Signed-off-by: Koba Ko <kobak@nvidia.com>
@kobak2026 kobak2026 force-pushed the aspeed_smmu_identity_for_7.0_bos branch from c180164 to 8c2d38a Compare April 28, 2026 01:54
@kobak2026
Copy link
Copy Markdown
Collaborator Author

@kobak2026

Instead of

(cherry picked from commit 738fff0e2060b6b383c21afdf1366330d9c79698)

Use

(backported from commit 738fff0e2060b6b383c21afdf1366330d9c79698 linux-nvidia-6.17)

thanks, done

Copy link
Copy Markdown
Collaborator

@nvmochs nvmochs left a comment

Choose a reason for hiding this comment

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

Acked-by: Matthew R. Ochs <mochs@nvidia.com>

Copy link
Copy Markdown
Collaborator

@clsotog clsotog left a comment

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>

@nvmochs
Copy link
Copy Markdown
Collaborator

nvmochs commented Apr 28, 2026

Merged, closing PR.

b246e2a5a050 NVIDIA: SAUCE: iommu/arm-smmu-v3: Use identity domain for ASPEED BMC devices

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants