Commit 885cd42
committed
NVIDIA: SAUCE: iommu/arm-smmu-v3: Use identity domain for ASPEED BMC 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>1 parent 6179a7b commit 885cd42
1 file changed
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3731 | 3731 | | |
3732 | 3732 | | |
3733 | 3733 | | |
| 3734 | + | |
| 3735 | + | |
| 3736 | + | |
| 3737 | + | |
| 3738 | + | |
| 3739 | + | |
| 3740 | + | |
| 3741 | + | |
| 3742 | + | |
| 3743 | + | |
| 3744 | + | |
| 3745 | + | |
| 3746 | + | |
3734 | 3747 | | |
3735 | 3748 | | |
3736 | 3749 | | |
| |||
0 commit comments