From: Hollis Blanchard <hollisb@us.ibm.com>
To: qemu-devel@nongnu.org
Cc: blauwirbel@gmail.com, Alexander Graf <alex@csgraf.de>
Subject: Re: [Qemu-devel] [PATCH 10/11] PPC64: Keep SLB in-CPU
Date: Fri, 06 Mar 2009 13:55:20 -0600 [thread overview]
Message-ID: <1236369320.26866.55.camel@slate.austin.ibm.com> (raw)
In-Reply-To: <1236353765-4484-11-git-send-email-agraf@suse.de>
On Fri, 2009-03-06 at 16:36 +0100, Alexander Graf wrote:
> Real 970 CPUs have the SLB not memory backed, but inside the CPU.
> This breaks bridge mode for 970 for now, but at least keeps us from
> overwriting physical addresses 0x0 - 0x300, rendering our interrupt
> handlers useless.
>
> I put in some stubs for bridge mode operation that could be enabled
> easily, but for now it's safer to leave that off I guess (970fx doesn't
> have bridge mode AFAIK).
The original code below is absolutely crazy. The architecture never
provided for hardware to write into memory like this in the first place.
In other words, the ifdefed "bridge" code should be removed with
prejudice.
For backwards compatibility, the architecture does allow for
implementations with an SLB to optionally do *lookups* in the (legacy)
segment table.
> diff --git a/target-ppc/helper.c b/target-ppc/helper.c
> index 58b7fe2..95958d4 100644
> --- a/target-ppc/helper.c
> +++ b/target-ppc/helper.c
> @@ -692,14 +692,48 @@ static always_inline int find_pte (CPUState *env, mmu_ctx_t *ctx,
...
> +static void slb_set_entry(CPUPPCState *env, int nr, ppc_slb_t *slb)
> +{
> + ppc_slb_t *entry = &env->slb[nr];
> +
> +#if 0 // XXX implement bridge mode?
> + if (bridge_mode) {
> + target_phys_addr_t sr_base = env->spr[SPR_ASR] + (12 * nr);
> +
> + stq_phys(sr_base, slb->tmp64);
> + stl_phys(sr_base + 8, slb->tmp);
> + } else
> +#endif
> + if (slb == entry)
> + return;
> +
> + entry->tmp64 = slb->tmp64;
> + entry->tmp = slb->tmp;
> +}
--
Hollis Blanchard
IBM Linux Technology Center
next prev parent reply other threads:[~2009-03-06 19:55 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-06 15:35 [Qemu-devel] [PATCH 00/11] PPC64 Linux bringup patches v3 Alexander Graf
2009-03-06 15:35 ` [Qemu-devel] [PATCH 01/11] PPC64: Implement slbmte Alexander Graf
2009-03-06 15:35 ` [Qemu-devel] [PATCH 02/11] PPC64: Implement large pages Alexander Graf
2009-03-06 15:35 ` [Qemu-devel] [PATCH 03/11] PPC64: Implment tlbiel Alexander Graf
2009-03-06 15:35 ` [Qemu-devel] [PATCH 04/11] Activate uninorth AGP bridge Alexander Graf
2009-03-06 15:35 ` [Qemu-devel] [PATCH 05/11] PPC64: Nop some SPRs on 970fx Alexander Graf
2009-03-06 15:36 ` [Qemu-devel] [PATCH 06/11] PPC64: Enable 64bit mode on interrupts Alexander Graf
2009-03-06 15:36 ` [Qemu-devel] [PATCH 07/11] PPC64: Implement mtfsf.L encoding Alexander Graf
2009-03-06 15:36 ` [Qemu-devel] [PATCH 08/11] PPC64: Fix RFI(d) Alexander Graf
2009-03-06 15:36 ` [Qemu-devel] [PATCH 09/11] PPC64: Fix NX bit Alexander Graf
2009-03-06 15:36 ` [Qemu-devel] [PATCH 10/11] PPC64: Keep SLB in-CPU Alexander Graf
2009-03-06 15:36 ` [Qemu-devel] [PATCH 11/11] PPC64: Disable BAT for 970 Alexander Graf
2009-03-06 19:55 ` Hollis Blanchard [this message]
2009-03-06 19:31 ` [Qemu-devel] [PATCH 09/11] PPC64: Fix NX bit Hollis Blanchard
2009-03-06 19:41 ` Alexander Graf
2009-03-07 9:57 ` [Qemu-devel] Re: [PATCH 01/11] PPC64: Implement slbmte Blue Swirl
2009-03-07 12:10 ` Alexander Graf
2009-03-07 10:04 ` [Qemu-devel] Re: [PATCH 00/11] PPC64 Linux bringup patches v3 Blue Swirl
-- strict thread matches above, loose matches on Subject: below --
2009-03-07 19:08 [Qemu-devel] [PATCH 00/11] PPC64 Linux bringup patches v4 Alexander Graf
2009-03-07 19:08 ` [Qemu-devel] [PATCH 01/11] PPC64: Implement slbmte Alexander Graf
2009-03-07 19:08 ` [Qemu-devel] [PATCH 02/11] PPC64: Implement large pages Alexander Graf
2009-03-07 19:08 ` [Qemu-devel] [PATCH 03/11] PPC64: Implment tlbiel Alexander Graf
2009-03-07 19:08 ` [Qemu-devel] [PATCH 04/11] Activate uninorth AGP bridge Alexander Graf
2009-03-07 19:08 ` [Qemu-devel] [PATCH 05/11] PPC64: Nop some SPRs on 970fx Alexander Graf
2009-03-07 19:08 ` [Qemu-devel] [PATCH 06/11] PPC64: Enable 64bit mode on interrupts Alexander Graf
2009-03-07 19:08 ` [Qemu-devel] [PATCH 07/11] PPC64: Implement mtfsf.L encoding Alexander Graf
2009-03-07 19:08 ` [Qemu-devel] [PATCH 08/11] PPC64: Fix RFI(d) Alexander Graf
2009-03-07 19:08 ` [Qemu-devel] [PATCH 09/11] PPC64: Fix NX bit Alexander Graf
2009-03-07 19:08 ` [Qemu-devel] [PATCH 10/11] PPC64: Keep SLB in-CPU Alexander Graf
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=1236369320.26866.55.camel@slate.austin.ibm.com \
--to=hollisb@us.ibm.com \
--cc=alex@csgraf.de \
--cc=blauwirbel@gmail.com \
--cc=qemu-devel@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).