From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52033) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1abfff-0005S7-4C for qemu-devel@nongnu.org; Thu, 03 Mar 2016 21:40:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1abffd-0002tu-S6 for qemu-devel@nongnu.org; Thu, 03 Mar 2016 21:40:51 -0500 Date: Fri, 4 Mar 2016 13:39:21 +1100 From: David Gibson Message-ID: <20160304023921.GS1620@voom.redhat.com> References: <20160301180310.13357.91023.stgit@bahia.huguette.org> <20160302000619.GM5427@voom.redhat.com> <20160303043506.GG1620@voom.redhat.com> <20160304004529.6c6e5b34@bahia.huguette.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Vy6UCbb9EK60RK4A" Content-Disposition: inline In-Reply-To: <20160304004529.6c6e5b34@bahia.huguette.org> Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH] target-ppc: fix sync of SPR_SDR1 with KVM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Greg Kurz Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org --Vy6UCbb9EK60RK4A Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Mar 04, 2016 at 12:45:29AM +0100, Greg Kurz wrote: > On Thu, 3 Mar 2016 15:35:07 +1100 > David Gibson wrote: >=20 > > On Wed, Mar 02, 2016 at 11:06:19AM +1100, David Gibson wrote: > > > On Tue, Mar 01, 2016 at 07:03:10PM +0100, Greg Kurz wrote: =20 > > > > The gdbstub can't access guest memory with current master. This is = what you > > > > get in gdb: > > > >=20 > > > > 0x00000000100009b8 in main (argc=3D > > > at address 0x3fffce4d3620>, argv=3D > > > at address 0x3fffce4d3628>) at fp.c:11 > > > >=20 > > > > Bisect leads to the following commit: > > > >=20 > > > > commit fa48b4328c39b2532e47efcfcba6d4031512f514 > > > > Author: David Gibson > > > > Date: Tue Feb 9 09:30:21 2016 +1000 > > > >=20 > > > > target-ppc: Remove hack for ppc_hash64_load_hpte*() with HV KVM > > > >=20 > > > > Looking at the env->external_htab users, I've spotted a behaviour c= hange in > > > > kvm_arch_get_registers(), which now always calls ppc_store_sdr1(). > > > >=20 > > > > Checking kvmppc_kern_htab, like it is done in the MMU helpers, fixe= s the > > > > issue. > > > >=20 > > > > Signed-off-by: Greg Kurz =20 > > >=20 > > > Mea culpa. Good catch, applied to ppc-for-2.6, thanks. =20 > >=20 > > Ah.. wait.. this patch breaks compile for the ppc32 target. Can you > > fix this please. > >=20 >=20 > Oops... I'm on vacation this week. Not sure I can find time before > next monday... :\ Ok. I've had a closer look and realized that the earlier commit (fa48b43) was basically a bad idea. I'll shortly post something to accomplish its aims in a different and better way. >=20 > > > > --- > > > > target-ppc/kvm.c | 2 +- > > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > >=20 > > > > diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c > > > > index d67c169ba324..dbc37f25af2b 100644 > > > > --- a/target-ppc/kvm.c > > > > +++ b/target-ppc/kvm.c > > > > @@ -1190,7 +1190,7 @@ int kvm_arch_get_registers(CPUState *cs) > > > > return ret; > > > > } > > > > =20 > > > > - if (!env->external_htab) { > > > > + if (!kvmppc_kern_htab && !env->external_htab) { > > > > ppc_store_sdr1(env, sregs.u.s.sdr1); > > > > } > > > > =20 > > > > =20 > > > =20 > >=20 > >=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 --Vy6UCbb9EK60RK4A Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJW2PVYAAoJEGw4ysog2bOS/A4QANJYMzcK+hruhN664QzCPWCa iUuJSScTQvswL83fUyRTdQk2ONDNi9qTlT813FvAxHz+yxOKPZ8ljS3F5/dzMzlz p4Jons8PBUaZz2TOC0cspi+qFYygGzAkTSOvkl2fnH9FeaHwCF6yXiD+8rAhZkwt VSSOrOxuBdY31wDlUmO8LSuRx4GEhTCvdbWZoTKn1YX0pwMihZHxsqZ3UYdWh19t +wPzRctWUpeRATjm1H5ZYHGnTpoDv+sUiUS81RC2oy3e44wGmKkTwkzv+bEZX1vr f34zdzYHY7grJ0gMsEknLh2yhsi6ue1tNYYpzVK27Ms3/karvnYjn0rHW30yyW1+ Z3PZS/Ib95KCLueMf6p60iQnp7PXXYhZgUBJWi1wpkwYFbqywva67l4f8h9bEKVL W+9lVN0DiRxCnmKe9fYZCZG8zIAVPuN+pTs+WH+YviZS73p83ZbNlmd5oDFYW9rC 4+B19kwezZI53QhoRGptenoKdGdn6nT3MoWehE5JPhZwHwLj1wHw6QvU4A+SXyRN pv7yYKdC/vuh0VzO3YejLMr0yaLfYssZGWoVVWqiLFZT2r6Pw/3pCILRXK2zOV02 GaFdRaxnLaiE21SaAr4MqUL2zOVqMUOrqzv5+bPszkvJFwcpTsNQU9fFUwNuzzxk eB2eWl5+CMrKttamZvEi =q/v3 -----END PGP SIGNATURE----- --Vy6UCbb9EK60RK4A--