From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39691) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aausX-0005F3-B6 for qemu-devel@nongnu.org; Tue, 01 Mar 2016 19:43:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aausT-0008Sx-5f for qemu-devel@nongnu.org; Tue, 01 Mar 2016 19:43:01 -0500 Date: Wed, 2 Mar 2016 11:06:19 +1100 From: David Gibson Message-ID: <20160302000619.GM5427@voom.redhat.com> References: <20160301180310.13357.91023.stgit@bahia.huguette.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="UeXZ3FjlYZvuln/G" Content-Disposition: inline In-Reply-To: <20160301180310.13357.91023.stgit@bahia.huguette.org> Subject: Re: [Qemu-devel] [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: Alexey Kardashevskiy , qemu-ppc@nongnu.org, Alexander Graf , qemu-devel@nongnu.org --UeXZ3FjlYZvuln/G Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 y= ou > 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 change = 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 Mea culpa. Good catch, applied to ppc-for-2.6, thanks. > --- > 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 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 --UeXZ3FjlYZvuln/G Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJW1i57AAoJEGw4ysog2bOStJQP/3FjhXmyFWHPEtGkjWAc9V6z W8uel8J/IqwCXozPMjWeysOCyagXaW2lUunazK8HKt14LctKNzcEYz6DWIlnHz0r 1ZWIe3jeieVx090l4yGLkVtcem27W7wPtO+5UHY3FXksVyFQwV8eYY14PtoR927z H/EHycgyHXhJbuK12TKh9r94JLsgjeqxfctNlEGnwfuxhzyrzwSkNyuW/U/NTMce kPw11ptpZQ/LV+mVEQmVFDuaqaZSwcvlMFJB8EywljflbBSRYRVxu9hyqGW63Zlo jHsEhPuV2h2ol8WsWIDKvetVuAXVFYddACGD8iwI+6tC6gyTnTG241vCNyJQ5R1o HQaHc5BwaeuiHXutTtHgGU6mJo6j+wlZfa4zL0CgH0+442rJGFnpJU2Xqak+97Ew KCex/cix/7M6VDSwUruOwUiAfXmTP5MnCp7uRNuaverZERfipDWfOfcwvgWaxJqg I4OFFbRc12TETu3f9r21O4FUAVK5xKCkKxMawgH4jIJbmLXUKa8ewSQ/3eXsac31 IMCq9r2erJnow472mTFlWs21y3Dnnw8wqqHdcMK+X2c8NkYr9kngWh4J+acVQl8A zFAhmiKzldfVpdRPdbTrLItJ6n5CWF+kWVhfLElzJtrPc/VxS9ZBQX9sMJToFhU5 CnjJTzGSAkxUNN+uS71S =pbS/ -----END PGP SIGNATURE----- --UeXZ3FjlYZvuln/G--