From: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: qemu-ppc@nongnu.org, agraf@suse.de, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RFC PATCH 04/17] target/ppc/POWER9: Add ISAv3.00 MMU definition
Date: Tue, 17 Jan 2017 11:33:30 +1100 [thread overview]
Message-ID: <1484613210.2028.3.camel@gmail.com> (raw)
In-Reply-To: <20170116213617.GF15853@umbus>
On Tue, 2017-01-17 at 08:36 +1100, David Gibson wrote:
> On Fri, Jan 13, 2017 at 05:28:10PM +1100, Suraj Jitindar Singh wrote:
> >
> > POWER9 processors implement the mmu as defined in version 3.00 of
> > the ISA.
> >
> > Add a definition for this mmu model and set the POWER9 cpu model to
> > use
> > this mmu model.
> >
> > Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
> > ---
> > target/ppc/cpu-qom.h | 5 ++++-
> > target/ppc/mmu_helper.c | 2 ++
> > target/ppc/translate_init.c | 3 +--
> > 3 files changed, 7 insertions(+), 3 deletions(-)
> >
> > diff --git a/target/ppc/cpu-qom.h b/target/ppc/cpu-qom.h
> > index d46c31a..1577cc8 100644
> > --- a/target/ppc/cpu-qom.h
> > +++ b/target/ppc/cpu-qom.h
> > @@ -86,10 +86,13 @@ enum powerpc_mmu_t {
> > POWERPC_MMU_2_07 = POWERPC_MMU_64 | POWERPC_MMU_1TSEG
> > | POWERPC_MMU_64K
> > | POWERPC_MMU_AMR | 0x00000004,
> > - /* FIXME Add POWERPC_MMU_3_OO defines */
> > /* Architecture 2.07 "degraded" (no 1T segments) */
> > POWERPC_MMU_2_07a = POWERPC_MMU_64 | POWERPC_MMU_AMR
> > | 0x00000004,
> > + /* Architecture 3.00 variant */
> > + POWERPC_MMU_3_00 = POWERPC_MMU_64 | POWERPC_MMU_1TSEG
> > + | POWERPC_MMU_64K
> > + | POWERPC_MMU_AMR | 0x00000005,
> Hmm. I guess it works for now, but I'm not really sure that having
> this include POWERPC_MMU_64 is a great idea. The name is kind of
> misleading, but I'm pretty sure a number of places assume that the
> POWERPC_MMU_64 bitindicates a 64-bit *hash* MMU, which is no longer
> really the case.
Good catch, I didn't realise this assumption was made in the code.
There are some cases where this bit needs to be set for correct
behaviour but other places where, while it doesn't break anything, it
leads to incorrect code being called.
Time for me to investigate :)
>
> >
> > };
> >
> > /*****************************************************************
> > ************/
> > diff --git a/target/ppc/mmu_helper.c b/target/ppc/mmu_helper.c
> > index d09fc0a..2ab4562 100644
> > --- a/target/ppc/mmu_helper.c
> > +++ b/target/ppc/mmu_helper.c
> > @@ -1935,6 +1935,7 @@ void ppc_tlb_invalidate_all(CPUPPCState *env)
> > case POWERPC_MMU_2_06a:
> > case POWERPC_MMU_2_07:
> > case POWERPC_MMU_2_07a:
> > + case POWERPC_MMU_3_00:
> > #endif /* defined(TARGET_PPC64) */
> > env->tlb_need_flush = 0;
> > tlb_flush(CPU(cpu), 1);
> > @@ -1974,6 +1975,7 @@ void ppc_tlb_invalidate_one(CPUPPCState *env,
> > target_ulong addr)
> > case POWERPC_MMU_2_06a:
> > case POWERPC_MMU_2_07:
> > case POWERPC_MMU_2_07a:
> > + case POWERPC_MMU_3_00:
> > /* tlbie invalidate TLBs for all segments */
> > /* XXX: given the fact that there are too many segments to
> > invalidate,
> > * and we still don't have a tlb_flush_mask(env, n,
> > mask) in QEMU,
> > diff --git a/target/ppc/translate_init.c
> > b/target/ppc/translate_init.c
> > index bfc1f24..2402eef 100644
> > --- a/target/ppc/translate_init.c
> > +++ b/target/ppc/translate_init.c
> > @@ -8838,8 +8838,7 @@ POWERPC_FAMILY(POWER9)(ObjectClass *oc, void
> > *data)
> > (1ull << MSR_PMM) |
> > (1ull << MSR_RI) |
> > (1ull << MSR_LE);
> > - /* Using 2.07 defines until new radix model is added. */
> > - pcc->mmu_model = POWERPC_MMU_2_07;
> > + pcc->mmu_model = POWERPC_MMU_3_00;
> > #if defined(CONFIG_SOFTMMU)
> > pcc->handle_mmu_fault = ppc_hash64_handle_mmu_fault;
> > /* segment page size remain the same */
next prev parent reply other threads:[~2017-01-17 0:33 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-13 6:28 [Qemu-devel] [RFC PATCH 00/17] target/ppc: Implement POWER9 pseries tcg legacy kernel support Suraj Jitindar Singh
2017-01-13 6:28 ` [Qemu-devel] [RFC PATCH 01/17] powerpc/cpu-models: rename ISAv3.00 logical PVR definition Suraj Jitindar Singh
2017-01-16 2:16 ` David Gibson
2017-01-13 6:28 ` [Qemu-devel] [RFC PATCH 02/17] hw/ppc/spapr: Add POWER9 to pseries cpu models Suraj Jitindar Singh
2017-01-16 12:11 ` David Gibson
2017-01-13 6:28 ` [Qemu-devel] [RFC PATCH 03/17] target/ppc: Add pcr_supported to POWER9 cpu class definition Suraj Jitindar Singh
2017-01-16 21:21 ` David Gibson
2017-01-13 6:28 ` [Qemu-devel] [RFC PATCH 04/17] target/ppc/POWER9: Add ISAv3.00 MMU definition Suraj Jitindar Singh
2017-01-16 21:36 ` David Gibson
2017-01-17 0:33 ` Suraj Jitindar Singh [this message]
2017-01-23 5:01 ` Suraj Jitindar Singh
2017-01-13 6:28 ` [Qemu-devel] [RFC PATCH 05/17] target/ppc/POWER9: Adapt LPCR handling for POWER9 Suraj Jitindar Singh
2017-01-16 21:40 ` David Gibson
2017-01-17 0:48 ` Suraj Jitindar Singh
2017-01-17 4:37 ` David Gibson
2017-01-23 4:19 ` Suraj Jitindar Singh
2017-01-13 6:28 ` [Qemu-devel] [RFC PATCH 06/17] target/ppc/POWER9: Direct all instr and data storage interrupts to the hypv Suraj Jitindar Singh
2017-02-01 0:50 ` David Gibson
2017-01-13 6:28 ` [Qemu-devel] [RFC PATCH 07/17] target/ppc/POWER9: Add partition table pointer to sPAPRMachineState Suraj Jitindar Singh
2017-02-01 4:04 ` David Gibson
2017-02-09 2:57 ` Suraj Jitindar Singh
2017-02-10 0:11 ` David Gibson
2017-01-13 6:28 ` [Qemu-devel] [RFC PATCH 08/17] target/ppc/POWER9: Add external partition table pointer to cpu state Suraj Jitindar Singh
2017-02-01 4:09 ` David Gibson
2017-02-09 2:58 ` Suraj Jitindar Singh
2017-02-10 0:11 ` David Gibson
2017-01-13 6:28 ` [Qemu-devel] [RFC PATCH 09/17] target/ppc/POWER9: Remove SDR1 register Suraj Jitindar Singh
2017-02-01 4:16 ` David Gibson
2017-02-09 3:00 ` Suraj Jitindar Singh
2017-01-13 6:28 ` [Qemu-devel] [RFC PATCH 10/17] target/ppc/POWER9: Add POWER9 mmu fault handler Suraj Jitindar Singh
2017-02-01 4:23 ` David Gibson
2017-02-09 3:04 ` Suraj Jitindar Singh
2017-02-10 0:16 ` David Gibson
2017-01-13 6:28 ` [Qemu-devel] [RFC PATCH 11/17] target/ppc/POWER9: Update to new pte format for POWER9 accesses Suraj Jitindar Singh
2017-02-01 4:28 ` David Gibson
2017-02-09 3:08 ` Suraj Jitindar Singh
2017-02-09 23:47 ` Suraj Jitindar Singh
2017-02-10 0:21 ` David Gibson
2017-02-10 1:05 ` Suraj Jitindar Singh
2017-02-10 2:24 ` David Gibson
2017-01-13 6:28 ` [Qemu-devel] [RFC PATCH 12/17] target/ppc/POWER9: Add POWER9 pa-features definition Suraj Jitindar Singh
2017-02-01 4:29 ` David Gibson
2017-01-13 6:28 ` [Qemu-devel] [RFC PATCH 13/17] target/ppc/POWER9: Add cpu_has_work function for POWER9 Suraj Jitindar Singh
2017-02-01 4:34 ` David Gibson
2017-01-13 6:28 ` [Qemu-devel] [RFC PATCH 14/17] target/ppc/debug: Print LPCR register value if register exists Suraj Jitindar Singh
2017-01-13 6:28 ` [Qemu-devel] [RFC PATCH 15/17] tcg/POWER9: NOOP the cp_abort instruction Suraj Jitindar Singh
2017-01-13 6:28 ` [Qemu-devel] [RFC PATCH 16/17] target/ppc/mmu_hash64: Fix printing unsigned as signed int Suraj Jitindar Singh
2017-01-13 6:28 ` [Qemu-devel] [RFC PATCH 17/17] target/ppc/mmu_hash64: Fix incorrect shift value in amr calculation Suraj Jitindar Singh
2017-01-13 6:55 ` [Qemu-devel] [RFC PATCH 00/17] target/ppc: Implement POWER9 pseries tcg legacy kernel support no-reply
2017-02-01 1:04 ` David Gibson
2017-02-09 3:09 ` Suraj Jitindar Singh
2017-02-01 2:16 ` David Gibson
2017-02-01 2:22 ` 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=1484613210.2028.3.camel@gmail.com \
--to=sjitindarsingh@gmail.com \
--cc=agraf@suse.de \
--cc=david@gibson.dropbear.id.au \
--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).