From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57179) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHLov-0003ec-9C for qemu-devel@nongnu.org; Sun, 26 Jun 2016 21:58:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHLos-0006j5-U1 for qemu-devel@nongnu.org; Sun, 26 Jun 2016 21:58:40 -0400 Date: Mon, 27 Jun 2016 11:29:01 +1000 From: David Gibson Message-ID: <20160627012901.GA4242@voom.fritz.box> References: <201606232235.u5NMZHkU027326@linux03a.ddci.com> <20160624022741.GA15625@voom.fritz.box> <576E38E1.2060404@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="FCuugMFkClbJLl1L" Content-Disposition: inline In-Reply-To: <576E38E1.2060404@redhat.com> Subject: Re: [Qemu-devel] [PATCH] target-ppc: ppce500_spin.c uses SPR_PIR, should use SPR_BOOKE_PIR List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Thomas Huth Cc: Aaron Larson , qemu-ppc@nongnu.org, agraf@suse.de, qemu-devel@nongnu.org --FCuugMFkClbJLl1L Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 > >=20 > > Applied to ppc-for-2.7, thanks. > >=20 > > IIRC this leaves a redundant bit in spin_init, but that can be cleaned > > up later. >=20 > 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. >=20 > >> --- > >> 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; > >> =20 > >> cpu_synchronize_state(cpu); > >> - stl_p(&curspin->pir, env->spr[SPR_PIR]); > >> + stl_p(&curspin->pir, env->spr[SPR_BOOKE_PIR]); > >> env->nip =3D ldq_p(&curspin->addr) & (map_size - 1); > >> env->gpr[3] =3D ldq_p(&curspin->r3); > >> env->gpr[4] =3D 0; > >=20 >=20 >=20 --=20 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 --FCuugMFkClbJLl1L Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXcIFdAAoJEGw4ysog2bOSAxEQAKmkAhRF1QtpgFiwDURHUHN0 JF4Q8pbRi5cFrm2zB+hP2ugbtgiu1+soWJpp3DRmes88Ewcq99tv438muRhSO3Tb SNOkSG2jsnah/2LWKg13CJ8usjcZtaJDEjFy4OUdctqKvp5S4nrlNkmMxVTfJm0t DJXIrn1hCVGdfizXIs7pQpBe8pBzIn836ogiTXe3Kb/2rqYZSyTXpPcxb/R6vvEt n1d0k0EGXWXTY7PAKDarTCr42snMcsQ3k8akUbRR19HI1LDsb7zwO6PY1A6kP6Uj IBpfO195cUml7JdcgrkCY9xAESdDUJeqaxJPVnEm6WFJ7XMdBS0p5QkiSVxwVNN7 XYzfwHrGcEONlRJ3hpSgt1uuUG+f7AFUy8uB7F//xYWq1sxRaQR8auqjAh54y8IX 3OstZd/qOsunjoc8p39SEJxgMNk2KfPgpAnhUu7ul28hCmyL1AhZ8OlrPYqE3k6F /zZpC7pfEMn7pp5vHAsUmdBgcGsNbcprDqARqABl2M1YB0UxAyD2qIIksuvU3JD5 8EHtaWkS+FBJeS3ICJFfOhAHIru2JGYwk4S+yfB1XeOcAFRNpo9LBSSK/2KGWCx1 M/31g1beP9psdTYA09nCeokEtDRoVBIhC1eRc2s7z9CO/pl00Hdt8Y2uhLGQv0RZ Sf0scCLj9XMBU3McR6Pd =4L7K -----END PGP SIGNATURE----- --FCuugMFkClbJLl1L--