mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 10:49:33 +00:00
![Kyung Min Park](/assets/img/avatar_default.png)
When the dmar translation fault happens, the kernel prints a single line fault reason with corresponding hexadecimal code defined in the Intel VT-d specification. Currently, when user wants to debug the translation fault in detail, debugfs is used for dumping the dmar_translation_struct, which is not available when the kernel failed to boot. Dump the DMAR translation structure, pagewalk the IO page table and print the page table entry when the fault happens. This takes effect only when CONFIG_DMAR_DEBUG is enabled. Signed-off-by: Kyung Min Park <kyung.min.park@intel.com> Link: https://lore.kernel.org/r/20210815203845.31287-1-kyung.min.park@intel.com Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com> Link: https://lore.kernel.org/r/20211014053839.727419-3-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
101 lines
3 KiB
Text
101 lines
3 KiB
Text
# SPDX-License-Identifier: GPL-2.0-only
|
|
# Intel IOMMU support
|
|
config DMAR_TABLE
|
|
bool
|
|
|
|
config DMAR_PERF
|
|
bool
|
|
|
|
config DMAR_DEBUG
|
|
bool
|
|
|
|
config INTEL_IOMMU
|
|
bool "Support for Intel IOMMU using DMA Remapping Devices"
|
|
depends on PCI_MSI && ACPI && (X86 || IA64)
|
|
select DMA_OPS
|
|
select IOMMU_API
|
|
select IOMMU_IOVA
|
|
select NEED_DMA_MAP_STATE
|
|
select DMAR_TABLE
|
|
select SWIOTLB
|
|
select IOASID
|
|
select IOMMU_DMA
|
|
select PCI_ATS
|
|
help
|
|
DMA remapping (DMAR) devices support enables independent address
|
|
translations for Direct Memory Access (DMA) from devices.
|
|
These DMA remapping devices are reported via ACPI tables
|
|
and include PCI device scope covered by these DMA
|
|
remapping devices.
|
|
|
|
if INTEL_IOMMU
|
|
|
|
config INTEL_IOMMU_DEBUGFS
|
|
bool "Export Intel IOMMU internals in Debugfs"
|
|
depends on IOMMU_DEBUGFS
|
|
select DMAR_PERF
|
|
select DMAR_DEBUG
|
|
help
|
|
!!!WARNING!!!
|
|
|
|
DO NOT ENABLE THIS OPTION UNLESS YOU REALLY KNOW WHAT YOU ARE DOING!!!
|
|
|
|
Expose Intel IOMMU internals in Debugfs.
|
|
|
|
This option is -NOT- intended for production environments, and should
|
|
only be enabled for debugging Intel IOMMU.
|
|
|
|
config INTEL_IOMMU_SVM
|
|
bool "Support for Shared Virtual Memory with Intel IOMMU"
|
|
depends on X86_64
|
|
select PCI_PASID
|
|
select PCI_PRI
|
|
select MMU_NOTIFIER
|
|
select IOASID
|
|
select IOMMU_SVA_LIB
|
|
help
|
|
Shared Virtual Memory (SVM) provides a facility for devices
|
|
to access DMA resources through process address space by
|
|
means of a Process Address Space ID (PASID).
|
|
|
|
config INTEL_IOMMU_DEFAULT_ON
|
|
bool "Enable Intel DMA Remapping Devices by default"
|
|
default y
|
|
help
|
|
Selecting this option will enable a DMAR device at boot time if
|
|
one is found. If this option is not selected, DMAR support can
|
|
be enabled by passing intel_iommu=on to the kernel.
|
|
|
|
config INTEL_IOMMU_BROKEN_GFX_WA
|
|
bool "Workaround broken graphics drivers (going away soon)"
|
|
depends on BROKEN && X86
|
|
help
|
|
Current Graphics drivers tend to use physical address
|
|
for DMA and avoid using DMA APIs. Setting this config
|
|
option permits the IOMMU driver to set a unity map for
|
|
all the OS-visible memory. Hence the driver can continue
|
|
to use physical addresses for DMA, at least until this
|
|
option is removed in the 2.6.32 kernel.
|
|
|
|
config INTEL_IOMMU_FLOPPY_WA
|
|
def_bool y
|
|
depends on X86
|
|
help
|
|
Floppy disk drivers are known to bypass DMA API calls
|
|
thereby failing to work when IOMMU is enabled. This
|
|
workaround will setup a 1:1 mapping for the first
|
|
16MiB to make floppy (an ISA device) work.
|
|
|
|
config INTEL_IOMMU_SCALABLE_MODE_DEFAULT_ON
|
|
bool "Enable Intel IOMMU scalable mode by default"
|
|
default y
|
|
help
|
|
Selecting this option will enable by default the scalable mode if
|
|
hardware presents the capability. The scalable mode is defined in
|
|
VT-d 3.0. The scalable mode capability could be checked by reading
|
|
/sys/devices/virtual/iommu/dmar*/intel-iommu/ecap. If this option
|
|
is not selected, scalable mode support could also be enabled by
|
|
passing intel_iommu=sm_on to the kernel. If not sure, please use
|
|
the default value.
|
|
|
|
endif # INTEL_IOMMU
|