[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH 2/8] monitor: add ability to dump SLB entries
From: |
Alexander Graf |
Subject: |
Re: [Qemu-ppc] [PATCH 2/8] monitor: add ability to dump SLB entries |
Date: |
Tue, 20 Dec 2011 16:28:47 +0100 |
On 13.12.2011, at 05:24, David Gibson wrote:
> From: Nishanth Aravamudan <address@hidden>
>
> 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 <address@hidden>
> Signed-off-by: David Gibson <address@hidden>
> ---
> 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.
Alex
- [Qemu-ppc] [0/8] Assorted pseries updates, David Gibson, 2011/12/12
- [Qemu-ppc] [PATCH 1/8] pseries: Remove hcalls callback, David Gibson, 2011/12/12
- [Qemu-ppc] [PATCH 2/8] monitor: add ability to dump SLB entries, David Gibson, 2011/12/12
- Re: [Qemu-ppc] [PATCH 2/8] monitor: add ability to dump SLB entries,
Alexander Graf <=
- [Qemu-ppc] [PATCH 3/8] pseries: FDT NUMA extensions to support multi-node guests, David Gibson, 2011/12/12
- [Qemu-ppc] [PATCH 6/8] pseries: Add a routine to find a stable "default" vty and use it, David Gibson, 2011/12/12
- [Qemu-ppc] [PATCH 5/8] pseries: Emit device tree nodes in reg order, David Gibson, 2011/12/12
- [Qemu-ppc] [PATCH 7/8] pseries: Populate "/chosen/linux, stdout-path" in the FDT, David Gibson, 2011/12/12
- [Qemu-ppc] [PATCH 8/8] pseries: Check for duplicate addresses on the spapr-vio bus, David Gibson, 2011/12/12
- Re: [Qemu-ppc] [0/8] Assorted pseries updates, Alexander Graf, 2011/12/20