提交 23ceabf4 编写于 作者: J Jacob Pan 提交者: Xie XiuQi

iommu: use sva invalidate and device fault trace event

hulk inclusion
category: feature
bugzilla: 14369
CVE: NA
-------------------

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: NJacob Pan <jacob.jun.pan@linux.intel.com>
Signed-off-by: NFang Lijun <fanglijun3@huawei.com>
Reviewed-by: NHanjun Guo <guohanjun@huawei.com>
Reviewed-by: NZhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 da8b1374
......@@ -1049,6 +1049,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;
......@@ -1624,6 +1625,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;
}
......@@ -1661,6 +1663,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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册