qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Alexey Kardashevskiy <aik@ozlabs.ru>, qemu-devel@nongnu.org
Cc: qemu-ppc@nongnu.org, David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [Qemu-devel] [PATCH qemu] spapr_iommu: Fix xlate trace to print translated address
Date: Mon, 12 Aug 2019 11:01:25 +0200	[thread overview]
Message-ID: <2c36b78c-cec9-4122-86a3-d9f4ef762583@redhat.com> (raw)
In-Reply-To: <20190812054202.125492-1-aik@ozlabs.ru>

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;
> 


  parent reply	other threads:[~2019-08-12  9:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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é [this message]
2019-08-13  1:13   ` Alexey Kardashevskiy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2c36b78c-cec9-4122-86a3-d9f4ef762583@redhat.com \
    --to=philmd@redhat.com \
    --cc=aik@ozlabs.ru \
    --cc=david@gibson.dropbear.id.au \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).