[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190526161004.25232-8-eric.auger@redhat.com>
Date: Sun, 26 May 2019 18:09:42 +0200
From: Eric Auger <eric.auger@...hat.com>
To: eric.auger.pro@...il.com, eric.auger@...hat.com,
iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org,
kvm@...r.kernel.org, kvmarm@...ts.cs.columbia.edu, joro@...tes.org,
alex.williamson@...hat.com, jacob.jun.pan@...ux.intel.com,
yi.l.liu@...el.com, jean-philippe.brucker@....com,
will.deacon@....com, robin.murphy@....com
Cc: kevin.tian@...el.com, ashok.raj@...el.com, marc.zyngier@....com,
peter.maydell@...aro.org, vincent.stehle@....com
Subject: [PATCH v8 07/29] iommu: Use device fault trace event
From: Jacob Pan <jacob.jun.pan@...ux.intel.com>
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@...ux.intel.com>
[JPB: removed invalidate event, that will be added later]
Signed-off-by: Jean-Philippe Brucker <jean-philippe.brucker@....com>
---
drivers/iommu/iommu.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index 64e87d56f471..166adb88b014 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(¶m->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.20.1
Powered by blists - more mailing lists