Skip to contentSkip to conversation

iommu: log iova range in map/unmap trace events

PATCH Applied Dafna Hirschfeld 2 participants 2 messages Nov 4, 2021 – Dec 6, 2021 Tracing

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iommu: log iova range in map/unmap trace events

In case of an iommu page fault, the faulting iova is logged in trace_io_page_fault. It is therefore convenient to log the iova range in mapping/unmapping trace events so that it is easier to see if the faulting iova was recently in any of those ranges.

---
 include/trace/events/iommu.h | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
include/trace/events/iommu.h +6 -4
index 72b4582322ff..29096fe12623 100644
@@ -101,8 +101,9 @@ TRACE_EVENT(map,
 		__entry->size = size;
 	),
 
-	TP_printk("IOMMU: iova=0x%016llx paddr=0x%016llx size=%zu",
-			__entry->iova, __entry->paddr, __entry->size
+	TP_printk("IOMMU: iova=0x%016llx - 0x%016llx paddr=0x%016llx size=%zu",
+		  __entry->iova, __entry->iova + __entry->size, __entry->paddr,
+		  __entry->size
 	)
 );
 
@@ -124,8 +125,9 @@ TRACE_EVENT(unmap,
 		__entry->unmapped_size = unmapped_size;
 	),
 
-	TP_printk("IOMMU: iova=0x%016llx size=%zu unmapped_size=%zu",
-			__entry->iova, __entry->size, __entry->unmapped_size
+	TP_printk("IOMMU: iova=0x%016llx - 0x%016llx size=%zu unmapped_size=%zu",
+		  __entry->iova, __entry->iova + __entry->size,
+		  __entry->size, __entry->unmapped_size
 	)
 );
 
Signature · 6 lines
2.17.1

_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu
Applied
#1 lore raw
Quoted 10 lines · Dafna Hirschfeld

In case of an iommu page fault, the faulting iova is logged in trace_io_page_fault. It is therefore convenient to log the iova range in mapping/unmapping trace events so that it is easier to see if the faulting iova was recently in any of those ranges.

---
 include/trace/events/iommu.h | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

Applied, thanks.

Next time, please start the subject after 'iommu:' with a capital letter.

Thanks,

Joerg
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu