From: David Gibson <david@gibson.dropbear.id.au>
To: Alexander Graf <agraf@suse.de>
Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/8] monitor: add ability to dump SLB entries
Date: Wed, 21 Dec 2011 11:33:46 +1100 [thread overview]
Message-ID: <20111221003346.GA5188@truffala.fritz.box> (raw)
In-Reply-To: <0B54269F-3B52-4466-A7F1-033F81B13DD5@suse.de>
On Tue, Dec 20, 2011 at 04:28:47PM +0100, Alexander Graf wrote:
>
> On 13.12.2011, at 05:24, David Gibson wrote:
>
> > From: Nishanth Aravamudan <nacc@us.ibm.com>
> >
> > When run with a PPC Book3S (server) CPU Currently 'info tlb' in the
> > qemu monitor reports "dump_mmu: unimplemented". However, during
> > bringup work, it can be quite handy to have the SLB entries, which are
> > available in the CPUPPCState. This patch adds an implementation of
> > info tlb for book3s, which dumps the SLB.
> >
> > Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
> > Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
> > ---
> > target-ppc/helper.c | 32 +++++++++++++++++++++++++++-----
> > 1 files changed, 27 insertions(+), 5 deletions(-)
> >
> > diff --git a/target-ppc/helper.c b/target-ppc/helper.c
> > index 137a494..29c7050 100644
> > --- a/target-ppc/helper.c
> > +++ b/target-ppc/helper.c
> > @@ -1545,14 +1545,36 @@ static void mmubooke206_dump_mmu(FILE *f, fprintf_function cpu_fprintf,
> > }
> > }
> >
> > +static void mmubooks_dump_mmu(FILE *f, fprintf_function cpu_fprintf,
> > + CPUState *env)
> > +{
> > + int i;
> > + uint64_t slbe, slbv;
> > +
> > + cpu_synchronize_state(env);
> > +
> > + cpu_fprintf(f, "SLB\tESID\t\t\tVSID\n");
> > + for (i = 0; i < env->slb_nr; i++) {
> > + slbe = env->slb[i].esid;
> > + slbv = env->slb[i].vsid;
> > + if (slbe == 0 && slbv == 0) {
> > + continue;
> > + }
> > + cpu_fprintf(f, "%d\t0x%016" PRIx64 "\t0x%016" PRIx64 "\n",
> > + i, slbe, slbv);
> > + }
> > +}
> > +
> > void dump_mmu(FILE *f, fprintf_function cpu_fprintf, CPUState *env)
> > {
> > - switch (env->mmu_model) {
> > - case POWERPC_MMU_BOOKE206:
> > + if (env->mmu_model == POWERPC_MMU_BOOKE206) {
> > mmubooke206_dump_mmu(f, cpu_fprintf, env);
> > - break;
> > - default:
> > - cpu_fprintf(f, "%s: unimplemented\n", __func__);
> > + } else {
> > + if ((env->mmu_model & POWERPC_MMU_64B) != 0) {
> > + mmubooks_dump_mmu(f, cpu_fprintf, env);
> > + } else {
> > + cpu_fprintf(f, "%s: unimplemented\n", __func__);
> > + }
>
> Didn't I comment on this one before, saying that it should stay a
> switch? In fact, I even applied his v2 already.
Ah, yes, sorry. I was tracking upstream, so I forgot it was in your
tree.
--
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
next prev parent reply other threads:[~2011-12-21 0:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-13 4:24 [Qemu-devel] [0/8] Assorted pseries updates David Gibson
2011-12-13 4:24 ` [Qemu-devel] [PATCH 1/8] pseries: Remove hcalls callback David Gibson
2011-12-13 4:24 ` [Qemu-devel] [PATCH 2/8] monitor: add ability to dump SLB entries David Gibson
2011-12-20 15:28 ` Alexander Graf
2011-12-21 0:33 ` David Gibson [this message]
2011-12-13 4:24 ` [Qemu-devel] [PATCH 3/8] pseries: FDT NUMA extensions to support multi-node guests David Gibson
2011-12-13 4:24 ` [Qemu-devel] [PATCH 5/8] pseries: Emit device tree nodes in reg order David Gibson
2011-12-13 4:24 ` [Qemu-devel] [PATCH 6/8] pseries: Add a routine to find a stable "default" vty and use it David Gibson
2011-12-13 4:24 ` [Qemu-devel] [PATCH 7/8] pseries: Populate "/chosen/linux, stdout-path" in the FDT David Gibson
2011-12-13 4:24 ` [Qemu-devel] [PATCH 8/8] pseries: Check for duplicate addresses on the spapr-vio bus David Gibson
2011-12-20 15:41 ` [Qemu-devel] [0/8] Assorted pseries updates Alexander Graf
2011-12-21 0:34 ` [Qemu-devel] [Qemu-ppc] " David Gibson
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=20111221003346.GA5188@truffala.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=agraf@suse.de \
--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).