^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) # SPDX-License-Identifier: GPL-2.0-only
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) # AMD IOMMU support
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) config AMD_IOMMU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) bool "AMD IOMMU support"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) select SWIOTLB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) select PCI_MSI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) select PCI_ATS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) select PCI_PRI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) select PCI_PASID
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) select IOMMU_API
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) select IOMMU_IOVA
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) select IOMMU_DMA
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) depends on X86_64 && PCI && ACPI && HAVE_CMPXCHG_DOUBLE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) With this option you can enable support for AMD IOMMU hardware in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) your system. An IOMMU is a hardware component which provides
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) remapping of DMA memory accesses from devices. With an AMD IOMMU you
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) can isolate the DMA memory of different devices and protect the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) system from misbehaving device drivers or hardware.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) You can find out if your system has an AMD IOMMU if you look into
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) your BIOS for an option to enable it or if you have an IVRS ACPI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) table.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) config AMD_IOMMU_V2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) tristate "AMD IOMMU Version 2 driver"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) depends on AMD_IOMMU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) select MMU_NOTIFIER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) This option enables support for the AMD IOMMUv2 features of the IOMMU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) hardware. Select this option if you want to use devices that support
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) the PCI PRI and PASID interface.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) config AMD_IOMMU_DEBUGFS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) bool "Enable AMD IOMMU internals in DebugFS"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) depends on AMD_IOMMU && IOMMU_DEBUGFS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) !!!WARNING!!! !!!WARNING!!! !!!WARNING!!! !!!WARNING!!!
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) DO NOT ENABLE THIS OPTION UNLESS YOU REALLY, -REALLY- KNOW WHAT YOU ARE DOING!!!
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) Exposes AMD IOMMU device internals in DebugFS.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) This option is -NOT- intended for production environments, and should
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) not generally be enabled.