From 602c993a3e7d26a10967cd6ddc8349384e1fb53b Mon Sep 17 00:00:00 2001 From: Mark Cave-Ayland Date: Mon, 8 Jan 2018 18:16:34 +0000 Subject: sun4u_iommu: add trace event for IOMMU translations Signed-off-by: Mark Cave-Ayland Acked-by: Artyom Tarasenko --- hw/sparc64/sun4u_iommu.c | 2 ++ hw/sparc64/trace-events | 1 + 2 files changed, 3 insertions(+) (limited to 'hw/sparc64') diff --git a/hw/sparc64/sun4u_iommu.c b/hw/sparc64/sun4u_iommu.c index 51fbc394ce..4cf8e69be9 100644 --- a/hw/sparc64/sun4u_iommu.c +++ b/hw/sparc64/sun4u_iommu.c @@ -184,6 +184,8 @@ static IOMMUTLBEntry sun4u_translate_iommu(IOMMUMemoryRegion *iommu, ret.addr_mask = (IOMMU_PAGE_SIZE_8K - 1); } + trace_sun4u_iommu_translate(ret.iova, ret.translated_addr, tte); + return ret; } diff --git a/hw/sparc64/trace-events b/hw/sparc64/trace-events index 052352feea..2ee2d75f70 100644 --- a/hw/sparc64/trace-events +++ b/hw/sparc64/trace-events @@ -6,3 +6,4 @@ ebus_isa_irq_handler(int n, int level) "Set ISA IRQ %d level %d" # hw/sparc64/sun4u_iommu.c sun4u_iommu_mem_read(uint64_t addr, uint64_t val, int size) "addr: 0x%"PRIx64" val: 0x%"PRIx64" size: %d" sun4u_iommu_mem_write(uint64_t addr, uint64_t val, int size) "addr: 0x%"PRIx64" val: 0x%"PRIx64" size: %d" +sun4u_iommu_translate(uint64_t addr, uint64_t trans_addr, uint64_t tte) "xlate 0x%"PRIx64" => pa 0x%"PRIx64" tte: 0x%"PRIx64 -- cgit v1.2.3