From: David Gibson <david@gibson.dropbear.id.au>
To: Thomas Huth <thuth@redhat.com>
Cc: Aaron Larson <alarson@ddci.com>,
qemu-ppc@nongnu.org, agraf@suse.de, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] target-ppc: ppce500_spin.c uses SPR_PIR, should use SPR_BOOKE_PIR
Date: Mon, 27 Jun 2016 11:29:01 +1000 [thread overview]
Message-ID: <20160627012901.GA4242@voom.fritz.box> (raw)
In-Reply-To: <576E38E1.2060404@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1717 bytes --]
On Sat, Jun 25, 2016 at 09:55:13AM +0200, Thomas Huth wrote:
> On 24.06.2016 04:27, David Gibson wrote:
> > On Thu, Jun 23, 2016 at 03:35:17PM -0700, Aaron Larson wrote:
> >>
> >> ppce500_spin.c uses SPR_PIR to initialize the spin table, however on
> >> Book E processors the correct SPR is SPR_BOOKE_PIR.
> >>
> >> Signed-off-by: Aaron Larson <alarson@ddci.com>
> >
> > Applied to ppc-for-2.7, thanks.
> >
> > IIRC this leaves a redundant bit in spin_init, but that can be cleaned
> > up later.
>
> It's in spin_reset() ... and I'm not sure whether this value is needed
> between reset and kick time, so maybe it's safer to just keep that line
> in spin_reset()?
It shouldn't be. According to the spin table definition, the guest
isn't supposed to read the rest of the info in the table until after
it is kickced.
>
> >> ---
> >> hw/ppc/ppce500_spin.c | 2 +-
> >> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/hw/ppc/ppce500_spin.c b/hw/ppc/ppce500_spin.c
> >> index 76bd78b..225177b 100644
> >> --- a/hw/ppc/ppce500_spin.c
> >> +++ b/hw/ppc/ppce500_spin.c
> >> @@ -104,7 +104,7 @@ static void spin_kick(void *data)
> >> hwaddr map_start;
> >>
> >> cpu_synchronize_state(cpu);
> >> - stl_p(&curspin->pir, env->spr[SPR_PIR]);
> >> + stl_p(&curspin->pir, env->spr[SPR_BOOKE_PIR]);
> >> env->nip = ldq_p(&curspin->addr) & (map_size - 1);
> >> env->gpr[3] = ldq_p(&curspin->r3);
> >> env->gpr[4] = 0;
> >
>
>
--
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
prev parent reply other threads:[~2016-06-27 1:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-23 22:35 [Qemu-devel] [PATCH] target-ppc: ppce500_spin.c uses SPR_PIR, should use SPR_BOOKE_PIR Aaron Larson
2016-06-24 2:27 ` David Gibson
2016-06-25 7:55 ` Thomas Huth
2016-06-27 1:29 ` David Gibson [this message]
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=20160627012901.GA4242@voom.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=agraf@suse.de \
--cc=alarson@ddci.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=thuth@redhat.com \
/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).