Kernel quirk stops AMD PCIe misconfig from corrupting storage DMA
BIOS-enabled enhanced atomics on some AMD root ports were mangling 64-bit DMA, hitting SATA and NVMe drives on desktop systems.
A Linux kernel fix from AMD engineer Mario Limonciello disables a misconfigured PCIe root-port feature that has been silently corrupting storage data on some desktop systems.
Users reported corruption on SATA and NVMe devices. Disabling the IOMMU often made the problem go away, so the fault looked like an IOMMU bug. The real cause sits earlier in the path: certain BIOSes turn on AMD "enhanced atomics" on root ports even when no endpoint needs the feature. That setting repurposes the upper bits of 64-bit addresses, so any DMA using an IOVA above 58 bits can be corrupted. The breakage is not limited to atomics traffic, and it can occur with the IOMMU off as well, because it happens in the northbridge I/O block before the IOMMU sees the transaction.
Affected hardware is AMD NBIO 7.7 and 7.11. Many of those machines are unlikely to get BIOS updates, so the kernel now clears the feature on the relevant ports, including across suspend and resume. A narrower AHCI workaround that had forced 32-bit DMA on some JMicron controllers is being dropped; that change only papered over the platform bug for one class of disks.
PCI maintainer Bjorn Helgaas has taken the fix for the upcoming mainline kernel and marked it for stable backports. The change matters for anyone running 64-bit DMA to storage (or any other device) on those AMD platforms: without it, exhausting lower address space can produce silent data corruption rather than a clean failure.