iommu: Change iommu driver to call io_page_fault trace event
authorShuah Khan <shuah.kh@samsung.com>
Tue, 24 Sep 2013 21:21:20 +0000 (15:21 -0600)
committerJoerg Roedel <joro@8bytes.org>
Wed, 25 Sep 2013 09:07:04 +0000 (11:07 +0200)
commit56fa484969c367e3ae43a012a7b99f75bb4f3bdb
treec34c0fd586c5a43cc575ee61c0ee67b7e2b1e010
parent04fa2f7f837601903e5fe0f93bc2af8559d8c035
iommu: Change iommu driver to call io_page_fault trace event

Change iommu driver call io_page_fault trace event. This iommu_error class
event can be enabled to trigger when an iommu error occurs. Trace information
includes driver name, device name, iova, and flags.

Testing:
Added trace calls to iommu_prepare_identity_map() for testing some of the
conditions that are hard to trigger. Here is the trace from the testing:

       swapper/0-1     [003] ....     2.003774: io_page_fault: IOMMU:pci 0000:00:02.0 iova=0x00000000cb800000 flags=0x0002
       swapper/0-1     [003] ....     2.004098: io_page_fault: IOMMU:pci 0000:00:1d.0 iova=0x00000000cadc6000 flags=0x0002
       swapper/0-1     [003] ....     2.004115: io_page_fault: IOMMU:pci 0000:00:1a.0 iova=0x00000000cadc6000 flags=0x0002
       swapper/0-1     [003] ....     2.004129: io_page_fault: IOMMU:pci 0000:00:1f.0 iova=0x0000000000000000 flags=0x0002

Signed-off-by: Shuah Khan <shuah.kh@samsung.com>
Signed-off-by: Joerg Roedel <joro@8bytes.org>
include/linux/iommu.h