qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH qemu] spapr_iommu: Fix xlate trace to print tran


From: Alexey Kardashevskiy
Subject: Re: [Qemu-devel] [PATCH qemu] spapr_iommu: Fix xlate trace to print translated address
Date: Tue, 13 Aug 2019 11:13:22 +1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0



On 12/08/2019 19:01, Philippe Mathieu-Daudé wrote:
Hi Alexey,

On 8/12/19 7:42 AM, Alexey Kardashevskiy wrote:
Currently we basically print IO address twice, fix this.

Fixes: 7e472264e9e2 ("PPC: spapr: iommu: rework traces")
Signed-off-by: Alexey Kardashevskiy <address@hidden>
---
  hw/ppc/spapr_iommu.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/ppc/spapr_iommu.c b/hw/ppc/spapr_iommu.c
index bd3d0256a65d..6fe57d799a10 100644
--- a/hw/ppc/spapr_iommu.c
+++ b/hw/ppc/spapr_iommu.c
@@ -137,7 +137,7 @@ static IOMMUTLBEntry 
spapr_tce_translate_iommu(IOMMUMemoryRegion *iommu,
          ret.addr_mask = ~page_mask;
          ret.perm = spapr_tce_iommu_access_flags(tce);
      }
-    trace_spapr_iommu_xlate(tcet->liobn, addr, ret.iova, ret.perm,
+    trace_spapr_iommu_xlate(tcet->liobn, addr, ret.translated_addr, ret.perm,
                              ret.addr_mask);

But the trace format is:

spapr_iommu_xlate(uint64_t liobn, uint64_t ioba, uint64_t tce, unsigned
perm, unsigned pgsize) "liobn=%"PRIx64" 0x%"PRIx64" -> 0x%"PRIx64"
perm=%u mask=%x"

So this could be more appropriate:

   trace_spapr_iommu_xlate(tcet->liobn, ret.iova, ret.translated_addr,
                           ret.perm, ret.addr_mask);

Anyhow your patch is an improvment, so regardless addr/ret.iova:


I'd rather want to see the raw input data than with some bits removed.

Reviewed-by: Philippe Mathieu-Daudé <address@hidden>

Thanks!


return ret;


--
Alexey



reply via email to

[Prev in Thread] Current Thread [Next in Thread]