lkml.org 
[lkml]   [2019]   [Jun]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v4 07/22] iommu: Use device fault trace event
Date
For performance and debugging purposes, these trace events help
analyzing device faults that interact with IOMMU subsystem.
E.g.
IOMMU:0000:00:0a.0 type=2 reason=0 addr=0x00000000007ff000 pasid=1
group=1 last=0 prot=1

Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
[JPB: removed invalidate event, that will be added later]
Signed-off-by: Jean-Philippe Brucker <jean-philippe.brucker@arm.com>
---
drivers/iommu/iommu.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index 64e87d5..166adb8 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -1032,6 +1032,7 @@ int iommu_report_device_fault(struct device *dev, struct iommu_fault_event *evt)
}

ret = fparam->handler(evt, fparam->data);
+ trace_dev_fault(dev, &evt->fault);
done_unlock:
mutex_unlock(&param->lock);
return ret;
@@ -1604,6 +1605,7 @@ int iommu_page_response(struct device *dev,
if (evt->fault.prm.pasid == msg->pasid &&
evt->fault.prm.grpid == msg->grpid) {
msg->iommu_data = evt->iommu_private;
+ trace_dev_page_response(dev, msg);
ret = domain->ops->page_response(dev, msg);
list_del(&evt->list);
kfree(evt);
--
2.7.4
\
 
 \ /
  Last update: 2019-06-09 15:43    [W:0.410 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site