Skip to content

Commit 94aedac

Browse files
Dafna Hirschfeldjoergroedel
authored andcommitted
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. Signed-off-by: Dafna Hirschfeld <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent 0fcfb00 commit 94aedac

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

include/trace/events/iommu.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,9 @@ TRACE_EVENT(map,
101101
__entry->size = size;
102102
),
103103

104-
TP_printk("IOMMU: iova=0x%016llx paddr=0x%016llx size=%zu",
105-
__entry->iova, __entry->paddr, __entry->size
104+
TP_printk("IOMMU: iova=0x%016llx - 0x%016llx paddr=0x%016llx size=%zu",
105+
__entry->iova, __entry->iova + __entry->size, __entry->paddr,
106+
__entry->size
106107
)
107108
);
108109

@@ -124,8 +125,9 @@ TRACE_EVENT(unmap,
124125
__entry->unmapped_size = unmapped_size;
125126
),
126127

127-
TP_printk("IOMMU: iova=0x%016llx size=%zu unmapped_size=%zu",
128-
__entry->iova, __entry->size, __entry->unmapped_size
128+
TP_printk("IOMMU: iova=0x%016llx - 0x%016llx size=%zu unmapped_size=%zu",
129+
__entry->iova, __entry->iova + __entry->size,
130+
__entry->size, __entry->unmapped_size
129131
)
130132
);
131133

0 commit comments

Comments
 (0)