From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44712) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1abKyr-0004LA-VT for qemu-devel@nongnu.org; Wed, 02 Mar 2016 23:35:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1abKyn-00082j-Ok for qemu-devel@nongnu.org; Wed, 02 Mar 2016 23:35:17 -0500 Date: Thu, 3 Mar 2016 15:35:07 +1100 From: David Gibson Message-ID: <20160303043506.GG1620@voom.redhat.com> References: <20160301180310.13357.91023.stgit@bahia.huguette.org> <20160302000619.GM5427@voom.redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="DWg365Y4B18r8evw" Content-Disposition: inline In-Reply-To: <20160302000619.GM5427@voom.redhat.com> 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 --DWg365Y4B18r8evw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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: > > 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 chang= e 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, fixes the > > issue. > >=20 > > Signed-off-by: Greg Kurz >=20 > Mea culpa. Good catch, applied to ppc-for-2.6, thanks. Ah.. wait.. this patch breaks compile for the ppc32 target. Can you fix this please. > > --- > > 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 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 --DWg365Y4B18r8evw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJW1776AAoJEGw4ysog2bOSUWIQAOHHkglO8SVTodK1slFny4cN +isVTSN7pr/lXULSs3mzcwXCZ0E5WA+I55J/Mc+60uUel57RZHvH1/8PSr1qffmM N5obw80fDzMJ2BL62WmtCO7MHrBlVhZriDzIQlw50CJP9MJTasnaO5829hq3n3Ow UmgF2w5mnTn2JpvEgJJT02o2ukpQ6vyFn/vp01EIzJ/OJ2l1UPdPUTMSCtMhyayl vZjVMSnB7HY3IGxnBHAHUfI4Zc8pTXjmV+5f6LBr7OK8GkixYmvnMDnWwv9/FcuL K5Wz2T41Pq1d31xEN/UKEqKHV5mxEG+H4klPdB5U5zXNcueUkjXf91aj1+NQD0Jj IopTESuo7DWrOVyw3ZTXqC7sMKcpemnTc2J39xd1rknCFQi/mirBO9UVWg/XnkZV rUwfEpPvMk4cDJSCDNivxFqcH92WHKzNIqFOguenDbaXCjHbV1xA4T9Y5W3d1Jaq IgziN4k0HPMH3UVYhzzUuTHtfBN/sSXjnlj3B8toiH+9Po5RU9Px3YCC2m5rhvi8 folaj+DJ4mOHfTG4SM9tnZltOiLkk0xJEXkw65oB8fNjSMu2YV9O2JdHAI6ytqaA aK9ESMEqkGgOOlmu1v/mmckDw8XrsYx4HpPh2Yk4EEHHsTL9yqJFf6t0IZBAmJ4O bkMmPgDNg6A8seiJXa5l =uWNE -----END PGP SIGNATURE----- --DWg365Y4B18r8evw--