diff options
author | Lu Baolu <baolu.lu@linux.intel.com> | 2021-01-14 10:04:00 +0100 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2021-01-28 11:32:13 +0100 |
commit | f2dd871799ba5d80f95f9bdbc0e60d390e1bcd22 (patch) | |
tree | f910ca52ab2770dba8f30937f258f398a86a7241 /drivers/iommu/intel/dmar.c | |
parent | iommu/vt-d: Consolidate duplicate cache invaliation code (diff) | |
download | linux-f2dd871799ba5d80f95f9bdbc0e60d390e1bcd22.tar.xz linux-f2dd871799ba5d80f95f9bdbc0e60d390e1bcd22.zip |
iommu/vt-d: Add qi_submit trace event
This adds a new trace event to track the submissions of requests to the
invalidation queue. This event will provide the information like:
- IOMMU name
- Invalidation type
- Descriptor raw data
A sample output like:
| qi_submit: iotlb_inv dmar1: 0x100e2 0x0 0x0 0x0
| qi_submit: dev_tlb_inv dmar1: 0x1000000003 0x7ffffffffffff001 0x0 0x0
| qi_submit: iotlb_inv dmar2: 0x800f2 0xf9a00005 0x0 0x0
This will be helpful for queued invalidation related debugging.
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Link: https://lore.kernel.org/r/20210114090400.736104-1-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/intel/dmar.c')
-rw-r--r-- | drivers/iommu/intel/dmar.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/iommu/intel/dmar.c b/drivers/iommu/intel/dmar.c index 004feaed3c72..bd51f33642e0 100644 --- a/drivers/iommu/intel/dmar.c +++ b/drivers/iommu/intel/dmar.c @@ -31,6 +31,7 @@ #include <linux/limits.h> #include <asm/irq_remapping.h> #include <asm/iommu_table.h> +#include <trace/events/intel_iommu.h> #include "../irq_remapping.h" @@ -1307,6 +1308,8 @@ restart: offset = ((index + i) % QI_LENGTH) << shift; memcpy(qi->desc + offset, &desc[i], 1 << shift); qi->desc_status[(index + i) % QI_LENGTH] = QI_IN_USE; + trace_qi_submit(iommu, desc[i].qw0, desc[i].qw1, + desc[i].qw2, desc[i].qw3); } qi->desc_status[wait_index] = QI_IN_USE; |