lkml.org 
[lkml]   [2018]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v4 22/22] iommu: use sva invalidate and device fault trace event
Date
For performance and debugging purposes, these trace events help
analyzing device faults and passdown invalidations 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>
---
drivers/iommu/iommu.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index f6512692..e2090d2 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -979,6 +979,7 @@ int iommu_report_device_fault(struct device *dev, struct iommu_fault_event *evt)
mutex_unlock(&fparam->lock);
}
ret = fparam->handler(evt, fparam->data);
+ trace_dev_fault(dev, evt);
done_unlock:
mutex_unlock(&dev->iommu_param->lock);
return ret;
@@ -1547,6 +1548,7 @@ int iommu_sva_invalidate(struct iommu_domain *domain,
return -ENODEV;

ret = domain->ops->sva_invalidate(domain, dev, inv_info);
+ trace_sva_invalidate(dev, inv_info);

return ret;
}
@@ -1584,6 +1586,7 @@ int iommu_page_response(struct device *dev,
if (evt->pasid == msg->pasid &&
msg->page_req_group_id == evt->page_req_group_id) {
msg->private_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: 2018-04-16 23:48    [W:0.130 / U:1.184 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site