All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Stabellini <sstabellini@kernel.org>
To: Julien Grall <julien.grall@linaro.org>
Cc: sstabellini@kernel.org, xen-devel@lists.xen.org
Subject: Re: [PATCH for-4.10 2/2] xen/arm: p2m: Add more debug in get_page_from_gva
Date: Wed, 15 Nov 2017 17:36:27 -0800 (PST)	[thread overview]
Message-ID: <alpine.DEB.2.10.1711151723090.12676@sstabellini-ThinkPad-X260> (raw)
In-Reply-To: <20171115193414.7678-3-julien.grall@linaro.org>

On Wed, 15 Nov 2017, Julien Grall wrote:
> The function get_page_from_gva is used by copy_*_guest helpers to
> translate a guest virtual address to a machine physical address and take
> reference on the page.
> 
> There are a couple of errors path that will return the same value making
                               ^ paths

> difficult to know the exact error. Add more debug in each error patch
^ it difficult


> only for debug-build.
> 
> This should help narrowing down the intermittent failure with the
> hypercall GNTTABOP_copy (see [1]).
> 
> [1] https://lists.xen.org/archives/html/xen-devel/2017-11/msg00942.html
> 
> Signed-off-by: Julien Grall <julien.grall@linaro.org>

Acked-by: Stefano Stabellini <sstabellini@kernel.org>

fixed on commit


> ---
>  xen/arch/arm/p2m.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c
> index f6b3d8e421..417609ede2 100644
> --- a/xen/arch/arm/p2m.c
> +++ b/xen/arch/arm/p2m.c
> @@ -1428,16 +1428,29 @@ struct page_info *get_page_from_gva(struct vcpu *v, vaddr_t va,
>      par = gvirt_to_maddr(va, &maddr, flags);
>  
>      if ( par )
> +    {
> +        dprintk(XENLOG_G_DEBUG,
> +                "%pv: gvirt_to_maddr failed va=%#"PRIvaddr" flags=0x%lx par=%#"PRIx64"\n",
> +                v, va, flags, par);
>          goto err;
> +    }
>  
>      if ( !mfn_valid(maddr_to_mfn(maddr)) )
> +    {
> +        dprintk(XENLOG_G_DEBUG, "%pv: Invalid MFN %#"PRI_mfn"\n",
> +                v, mfn_x(maddr_to_mfn(maddr)));
>          goto err;
> +    }
>  
>      page = mfn_to_page(maddr_to_mfn(maddr));
>      ASSERT(page);
>  
>      if ( unlikely(!get_page(page, d)) )
> +    {
> +        dprintk(XENLOG_G_DEBUG, "%pv: Failing to acquire the MFN %#"PRI_mfn"\n",
> +                v, mfn_x(maddr_to_mfn(maddr)));
>          page = NULL;
> +    }
>  
>  err:
>      if ( !page && p2m->mem_access_enabled )

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  parent reply	other threads:[~2017-11-16  1:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-15 19:34 [PATCH for-4.10 0/2] xen/arm: Add more debug in get_page_from_gva Julien Grall
2017-11-15 19:34 ` [PATCH for-4.10 1/2] xen/arm: mm: Change the return value of gvirt_to_maddr Julien Grall
2017-11-16  1:35   ` Stefano Stabellini
2017-11-15 19:34 ` [PATCH for-4.10 2/2] xen/arm: p2m: Add more debug in get_page_from_gva Julien Grall
2017-11-15 19:43   ` Andrew Cooper
2017-11-15 21:42     ` Julien Grall
2017-11-16  1:36   ` Stefano Stabellini [this message]
2017-11-16  8:50     ` Julien Grall
2017-11-16 19:00       ` Stefano Stabellini

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=alpine.DEB.2.10.1711151723090.12676@sstabellini-ThinkPad-X260 \
    --to=sstabellini@kernel.org \
    --cc=julien.grall@linaro.org \
    --cc=xen-devel@lists.xen.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.