* [Qemu-devel] [PATCH qemu] spapr_iommu: Fix xlate trace to print translated address @ 2019-08-12 5:42 Alexey Kardashevskiy 2019-08-12 7:58 ` David Gibson 2019-08-12 9:01 ` Philippe Mathieu-Daudé 0 siblings, 2 replies; 4+ messages in thread From: Alexey Kardashevskiy @ 2019-08-12 5:42 UTC (permalink / raw) To: qemu-devel; +Cc: Alexey Kardashevskiy, qemu-ppc, David Gibson Currently we basically print IO address twice, fix this. Fixes: 7e472264e9e2 ("PPC: spapr: iommu: rework traces") Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> --- 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); return ret; -- 2.17.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH qemu] spapr_iommu: Fix xlate trace to print translated address 2019-08-12 5:42 [Qemu-devel] [PATCH qemu] spapr_iommu: Fix xlate trace to print translated address Alexey Kardashevskiy @ 2019-08-12 7:58 ` David Gibson 2019-08-12 9:01 ` Philippe Mathieu-Daudé 1 sibling, 0 replies; 4+ messages in thread From: David Gibson @ 2019-08-12 7:58 UTC (permalink / raw) To: Alexey Kardashevskiy; +Cc: qemu-ppc, qemu-devel [-- Attachment #1: Type: text/plain, Size: 1169 bytes --] On Mon, Aug 12, 2019 at 03:42:02PM +1000, Alexey Kardashevskiy wrote: > Currently we basically print IO address twice, fix this. > > Fixes: 7e472264e9e2 ("PPC: spapr: iommu: rework traces") > Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Applied to ppc-for-4.2, thanks. > --- > 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); > > return ret; -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH qemu] spapr_iommu: Fix xlate trace to print translated address 2019-08-12 5:42 [Qemu-devel] [PATCH qemu] spapr_iommu: Fix xlate trace to print translated address Alexey Kardashevskiy 2019-08-12 7:58 ` David Gibson @ 2019-08-12 9:01 ` Philippe Mathieu-Daudé 2019-08-13 1:13 ` Alexey Kardashevskiy 1 sibling, 1 reply; 4+ messages in thread From: Philippe Mathieu-Daudé @ 2019-08-12 9:01 UTC (permalink / raw) To: Alexey Kardashevskiy, qemu-devel; +Cc: qemu-ppc, David Gibson 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 <aik@ozlabs.ru> > --- > 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: Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> > > return ret; > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH qemu] spapr_iommu: Fix xlate trace to print translated address 2019-08-12 9:01 ` Philippe Mathieu-Daudé @ 2019-08-13 1:13 ` Alexey Kardashevskiy 0 siblings, 0 replies; 4+ messages in thread From: Alexey Kardashevskiy @ 2019-08-13 1:13 UTC (permalink / raw) To: Philippe Mathieu-Daudé, qemu-devel; +Cc: qemu-ppc, David Gibson 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 <aik@ozlabs.ru> >> --- >> 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é <philmd@redhat.com> Thanks! > >> >> return ret; >> -- Alexey ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-08-13 1:14 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2019-08-12 5:42 [Qemu-devel] [PATCH qemu] spapr_iommu: Fix xlate trace to print translated address Alexey Kardashevskiy 2019-08-12 7:58 ` David Gibson 2019-08-12 9:01 ` Philippe Mathieu-Daudé 2019-08-13 1:13 ` Alexey Kardashevskiy
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).