qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Alexey Kardashevskiy <aik@ozlabs.ru>
Cc: armbru@redhat.com, qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
	Suraj Jitindar Singh <sjitindarsingh@gmail.com>,
	dgilbert@redhat.com
Subject: Re: [Qemu-devel] [PATCH 2/2] ppc: Add dump-stack implementation
Date: Mon, 6 May 2019 13:39:29 +1000	[thread overview]
Message-ID: <20190506033929.GE6790@umbus.fritz.box> (raw)
In-Reply-To: <c0917aef-79cc-f42c-2f4c-6d26da9657d6@ozlabs.ru>

[-- Attachment #1: Type: text/plain, Size: 1639 bytes --]

On Thu, May 02, 2019 at 01:47:32PM +1000, Alexey Kardashevskiy wrote:
> 
> 
> On 02/05/2019 10:43, David Gibson wrote:
> > On Wed, May 01, 2019 at 07:48:48PM +1000, Alexey Kardashevskiy wrote:
> >>
> >>
> >> On 01/05/2019 15:35, Suraj Jitindar Singh wrote:
> >>> The monitor function dump-stack is used to dump the stack for a cpu.
> >>> This can be useful for debugging purposes when the stack cannot be
> >>> dumped by another means.
> >>>
> >>> Add a ppc implementation ppc_cpu_dump_stack().
> >>> The stack pointer is stored in R1 with the back pointer at offset 0 and
> >>> the link register at offset 2.
> >>> Also dump the registers from the stack frame if the marker "regshere" is
> >>> found.
> >>
> >> Is this a Linux only marker? ABI does not mentioned this.
> >>
> >>> This only dumps the kernel stack, stopping if a non-kernel address is
> >>> found in the stack.
> >>
> >> Why enforce this limit?
> > 
> > It's also making a Linux specific assumption about addresses.
> 
> It does not have to if it used ppc_cpu_get_phys_page_debug(), the only
> linux specific left is that "regshere" marker, otherwise it could work
> for AIX or FreeBSD (obviously without the exception frame).

Sorry, I thought this was relying on the fact that Linux put its
linear mapping at 0xc0..., but I realized I was misreading what was
just the masking of the top two real mode address bits which is in the
hardware.

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

  parent reply	other threads:[~2019-05-06  3:53 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-01  5:35 [Qemu-devel] [PATCH 1/2] monitor: Add dump-stack command Suraj Jitindar Singh
2019-05-01  5:35 ` Suraj Jitindar Singh
2019-05-01  5:35 ` [Qemu-devel] [PATCH 2/2] ppc: Add dump-stack implementation Suraj Jitindar Singh
2019-05-01  5:35   ` Suraj Jitindar Singh
2019-05-01  9:48   ` Alexey Kardashevskiy
2019-05-01  9:48     ` Alexey Kardashevskiy
2019-05-02  0:43     ` David Gibson
2019-05-02  0:43       ` David Gibson
2019-05-02  3:47       ` Alexey Kardashevskiy
2019-05-02  3:47         ` Alexey Kardashevskiy
2019-05-06  3:39         ` David Gibson [this message]
2019-05-02 13:59   ` [Qemu-devel] [Qemu-ppc] " Greg Kurz
2019-05-02 13:59     ` Greg Kurz
2019-05-07 11:24   ` [Qemu-devel] " Markus Armbruster
2019-05-01 10:44 ` [Qemu-devel] [PATCH 1/2] monitor: Add dump-stack command Dr. David Alan Gilbert
2019-05-01 10:44   ` Dr. David Alan Gilbert
2019-05-02  0:44 ` David Gibson
2019-05-02  0:44   ` David Gibson
2019-05-02  2:15   ` [Qemu-devel] [Qemu-ppc] " Alexey Kardashevskiy
2019-05-02  2:15     ` Alexey Kardashevskiy
2019-05-07 11:21     ` Markus Armbruster
2019-05-07 11:09 ` [Qemu-devel] " Markus Armbruster
2019-05-08 10:26   ` Dr. David Alan Gilbert
2019-05-08 13:10     ` Markus Armbruster
2019-05-08 13:15       ` Dr. David Alan Gilbert
2019-06-21  0:51 ` Suraj Jitindar Singh
2019-06-24  8:57   ` Markus Armbruster

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=20190506033929.GE6790@umbus.fritz.box \
    --to=david@gibson.dropbear.id.au \
    --cc=aik@ozlabs.ru \
    --cc=armbru@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=sjitindarsingh@gmail.com \
    /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).