From: Balbir Singh <bsingharora@gmail.com>
To: Michael Ellerman <mpe@ellerman.id.au>, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 1/2] powerpc/xmon: support dumping software pagetables
Date: Fri, 21 Jul 2017 18:43:54 +1000 [thread overview]
Message-ID: <1500626634.8256.21.camel@gmail.com> (raw)
In-Reply-To: <87k232e0mg.fsf@concordia.ellerman.id.au>
On Fri, 2017-07-21 at 16:59 +1000, Michael Ellerman wrote:
> Nice !
>
> Balbir Singh <bsingharora@gmail.com> writes:
>
> > It would be nice to be able to dump page tables in a
> > particular context
> >
> > Example use cases
> >
> > Dumping PTE contents to see the keys (useful for debugging)
> >
> > c0000000ba48c880 c0000000bab438b0 2677 2675 T 2 protection_keys
>
> What is that ^ ?
Thats extra, the output of P (print all tasks, I've used that task selection)
>
> > 0:mon> ds c0000000ba48c880 0x7ffff7f70000
> > translating tsk c0000000ba48c880, addr 7ffff7f70000
> > G: 0xb95b6400 U: 0xb6334000 M: 0xb6543000 PA: 0x012c0000, PTE: 0xd4800000012c0504
>
> Without reading the code I don't grok what G/U/M mean.
PGD, PUD and PMD, I'll expand on them.
>
> Feel free to use more than one line of output :)
>
> > Dumping vmalloc space
> >
> > 0:mon> ds 0 d000000000000000
>
> I suspect we will want to do that a lot. So I'd rather the arguments
> were reversed, and the second (task) can be omitted.
I considered that as well, can do
>
> So:
> 0:mon> ds x == translate x via init_mm
> 0:mon> ds x y == translate x via &y->mm
>
> I guess it's easier for folks to find a task rather than an mm directly?
> Otherwise it could take an mm not a task.
>
we already have commands for task, via (P), which is why I thought
task makes sense.
> > translating tsk (null), addr d000000000000000
>
> We should special case that to say "using kernel page tables" or similar.
>
> > G: 0x3d450400 U: 0xbc184000 M: 0x3d460000 PA: 0x7e010000, PTE: 0xc08000007e01018e
> > I did not replicate the complex code of dump_pagetable and have no support
> > for bolted linear mapping, thats why I've called it software pagetable
> > dumping support.
>
> Not sure about that naming. On hash it makes sense, but not on radix or
> on other platforms.
>
> Maybe 'dv' for dump Virtual address ?
>
> It doesn't dump a PTE, it tries to translate an address into a PTE.
>
Done, will do a v2
Thanks for the review!
Balbir Singh.
next prev parent reply other threads:[~2017-07-21 8:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-21 5:24 [PATCH 1/2] powerpc/xmon: support dumping software pagetables Balbir Singh
2017-07-21 5:24 ` [PATCH 2/2] powerpc/xmon: revisit SPR support Balbir Singh
2017-07-21 6:59 ` [PATCH 1/2] powerpc/xmon: support dumping software pagetables Michael Ellerman
2017-07-21 8:43 ` Balbir Singh [this message]
2017-07-21 17:08 ` Ram Pai
2017-07-23 14:50 ` kbuild test robot
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=1500626634.8256.21.camel@gmail.com \
--to=bsingharora@gmail.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
/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.