]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/vt-d: Dump DMAR translation structure when DMA fault occurs
authorKyung Min Park <kyung.min.park@intel.com>
Thu, 14 Oct 2021 05:38:32 +0000 (13:38 +0800)
committerJoerg Roedel <jroedel@suse.de>
Mon, 18 Oct 2021 10:31:48 +0000 (12:31 +0200)
commit8d52becab23773c35c2c1353319bd5d9b6f809d8
tree767f43e8b3d8527cbbf2d8ac3d8d44ac311c184a
parent6b97f130ca1b5314ba40a2e9ad51444bb8d7048b
iommu/vt-d: Dump DMAR translation structure when DMA fault occurs

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>
drivers/iommu/intel/Kconfig
drivers/iommu/intel/dmar.c
drivers/iommu/intel/iommu.c
include/linux/dmar.h