Enable swiotlb to avoid untrusted devices errors on AMD platforms
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
HWE Next |
Fix Released
|
Undecided
|
Unassigned | ||
linux (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Invalid
|
Undecided
|
Unassigned | ||
Impish |
Won't Fix
|
Undecided
|
Unassigned | ||
Jammy |
Fix Released
|
Undecided
|
Unassigned | ||
linux-oem-5.14 (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Focal |
Won't Fix
|
Undecided
|
Unassigned | ||
Impish |
Invalid
|
Undecided
|
Unassigned | ||
Jammy |
Invalid
|
Undecided
|
Unassigned | ||
linux-oem-5.17 (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Focal |
Invalid
|
Undecided
|
Unassigned | ||
Impish |
Invalid
|
Undecided
|
Unassigned | ||
Jammy |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
It's been observed that plugging in a TBT3 NVME device to a port marked
with ExternalFacingPort that some DMA transactions occur that are not a
full page and so the DMA API attempts to use software bounce buffers
instead of relying upon the IOMMU translation.
This doesn't work and leads to messaging like:
swiotlb buffer is full (sz: 4096 bytes), total 0 (slots), used 0 (slots)
The bounce buffers were originally set up, but torn down during
the boot process.
* This happens because as part of IOMMU initialization
`amd_
* When late_init gets called `pci_swiotlb_
called and the buffers are torn down.
This can be observed in the logs:
```
[ 0.407286] AMD-Vi: Extended features (0x246577efa225
[ 0.407291] AMD-Vi: Interrupt remapping enabled
[ 0.407292] AMD-Vi: Virtual APIC enabled
[ 0.407872] software IO TLB: tearing down default memory pool
```
This series fixes the behavior of AMD IOMMU to enable swiotlb so that
non-page aligned DMA goes through a bounce buffer.
It also adds a message to help with debugging similar problems in the
future.
tags: | added: amd oem-priority originate-from-1968137 |
Changed in linux (Ubuntu Focal): | |
status: | New → Invalid |
Changed in linux-oem-5.14 (Ubuntu Jammy): | |
status: | New → Invalid |
Changed in linux-oem-5.17 (Ubuntu Focal): | |
status: | New → Invalid |
Changed in linux (Ubuntu Impish): | |
status: | Incomplete → Won't Fix |
This affects kernel v5.11 and on.