All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <Ian.Campbell@citrix.com>
To: Frediano Ziglio <freddy77@gmail.com>
Cc: Stefano Stabellini <stefano.stabellini@citrix.com>,
	xen-devel@lists.xen.org, Julien Grall <julien.grall@linaro.org>,
	Tim Deegan <tim@xen.org>
Subject: Re: [PATCH for-xen-4-5 v3] xen/arm: dump guest stack even if not the current VCPU
Date: Thu, 23 Oct 2014 13:14:46 +0100	[thread overview]
Message-ID: <1414066486.1140.10.camel@citrix.com> (raw)
In-Reply-To: <CAHt6W4eBBHNcAhhGBxWtfTHuUiqU2VZSftSz6H4KH=+KGdpu9Q@mail.gmail.com>

On Thu, 2014-10-23 at 09:46 +0100, Frediano Ziglio wrote:
> From: Frediano Ziglio <frediano.ziglio@huawei.com>
> 
> If show_guest_stack was called from Xen context (for instance hitting
> '0' key on Xen console) get_page_from_gva was not able to get the
> page returning NULL.
> Detecting different domain and changing VTTBR register make
> get_page_from_gva works for different domains.
> 
> Signed-off-by: Frediano Ziglio <frediano.ziglio@huawei.com>
> ---
>  xen/arch/arm/p2m.c   | 22 +++++++++++++++++++---
>  xen/arch/arm/traps.c |  2 +-
>  2 files changed, 20 insertions(+), 4 deletions(-)
> 
> This is a bug fix to fix guest stack dumps.
> 
> The function get_page_from_gva is used in hot path (see
> arch/arm/guestcopy.c) but always with the current domain. The function
> will be used with another domain than current only when the stack of
> the guest will be dumped. The code added is self-containted.
> 
> Changed from v2:
> - add comment suggested by Julien Grall;
> 
> - modify code path to avoid keeping IRQ disabled too much (Julien Grall);
> - collapse change in a single if to improve performances.
> 
> Tested manually.

I succeeding in applying for real this time but:
p2m.c: In function ‘get_page_from_gva’:
p2m.c:1185:45: error: ‘maddr’ may be used uninitialized in this function [-Werror=uninitialized]
cc1: all warnings being treated as errors
make[4]: *** [p2m.o] Error 1

This was on arm32. So not pushed.

> diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c
> index 1585d35..2345199 100644
> --- a/xen/arch/arm/p2m.c
> +++ b/xen/arch/arm/p2m.c
> @@ -1177,12 +1177,28 @@ struct page_info *get_page_from_gva(struct
> domain *d, vaddr_t va,

Please avoid word wrapping patches in the future.
http://wiki.xen.org/wiki/Submitting_Xen_Patches has some guidance for
different mail clients. I fixed it by hand this time.

Ian.


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

  parent reply	other threads:[~2014-10-23 12:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-23  8:46 [PATCH for-xen-4-5 v3] xen/arm: dump guest stack even if not the current VCPU Frediano Ziglio
2014-10-23 11:30 ` Ian Campbell
2014-10-23 11:34   ` Ian Campbell
2014-10-23 11:31 ` Ian Campbell
2014-10-23 11:56   ` Julien Grall
2014-10-23 12:08     ` Frediano Ziglio
2014-10-23 12:14 ` Ian Campbell [this message]
2014-10-23 15:02   ` Frediano Ziglio

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=1414066486.1140.10.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=freddy77@gmail.com \
    --cc=julien.grall@linaro.org \
    --cc=stefano.stabellini@citrix.com \
    --cc=tim@xen.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.