From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56697) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhU8J-00027L-0k for qemu-devel@nongnu.org; Wed, 07 Sep 2016 00:06:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bhU8E-0004vT-OH for qemu-devel@nongnu.org; Wed, 07 Sep 2016 00:06:41 -0400 Date: Wed, 7 Sep 2016 14:08:21 +1000 From: David Gibson Message-ID: <20160907040821.GK2780@voom.fritz.box> References: <1472797976-24210-1-git-send-email-nikunj@linux.vnet.ibm.com> <1472800761.9620.6.camel@kernel.crashing.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ibq+fG+Ci5ONsaof" Content-Disposition: inline In-Reply-To: <1472800761.9620.6.camel@kernel.crashing.org> Subject: Re: [Qemu-devel] [PATCH RFC 0/4] Enable MTTCG on PowerPC List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Benjamin Herrenschmidt Cc: Nikunj A Dadhania , qemu-ppc@nongnu.org, alex.bennee@linaro.org, rth@twiddle.net, qemu-devel@nongnu.org --ibq+fG+Ci5ONsaof Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 02, 2016 at 05:19:21PM +1000, Benjamin Herrenschmidt wrote: > On Fri, 2016-09-02 at 12:02 +0530, Nikunj A Dadhania wrote: > > The series is a first attempt at enabling Multi-Threaded TCG on PowerPC. > > Changes that were needed to enable PowerPC are pretty simple; > >=20 > > Patch 01: Take a iothread lock during hcall, as hcall can generate io r= equests > > =A0=A0=A0=A0=A0=A002: For TCG, we were harcoding smt as 1, this gets ri= d of the limitation >=20 > If we do this, we need to implement the shared SPRs properly and the > inter-thread doorbells... Exactly. I think we want to get MTTCG working with multiple emulated cores first, then look into handling emulated hardware multi-threading. 2/4 suggests you are conflating the two, when they're really not related AFAICT. >=20 > > =A0=A0=A0=A0=A0=A003: Use atomic_cmpxchg in store conditional > > =A0=A0=A0=A0=A0=A004: With more threads, flush the entry from each cpu.= =A0 > > =A0=A0This can be optimized further. > >=20 > > The patches are based on the Alex Bennee's base enabling patches for=A0 > > MTTCG[1] and Emilios's cmpxchg atomics. The consolidated tree of the=A0 > > above patches is here: > >=20 > > https://github.com/stsquad/qemu/tree/mttcg/base-patches-v4-with-cmpxchg= -atomics-v2 > >=20 > > Apart from the above, PPC patches are based out of ppc-for-2.8 and=A0 > > load/store consolidation patches [2] > >=20 > > Series with all dependent patches available here:=A0 > > https://github.com/nikunjad/qemu/tree/ppc_mttcg_v1 > >=20 > > Testing:=A0 > > =3D=3D=3D=3D=3D=3D=3D=3D > >=20 > > -smp 4,cores=3D1,threads=3D4 -accel tcg,thread=3Dmulti > >=20 > > TODO > > =3D=3D=3D=3D > > Implement msgsndp instructions(door-bell), newer kernels enable it=A0 > > depending on the PVR. I have been using following workaround to boot. > > https://github.com/nikunjad/qemu/commit/2c10052c5f93418a6b920e6ba3ce181= 3fcf50bc4 > >=20 > > [1] https://www.mail-archive.com/qemu-devel@nongnu.org/msg391966.html > > [2] https://lists.gnu.org/archive/html/qemu-ppc/2016-08/msg00265.html > >=20 > > Nikunj A Dadhania (4): > > =A0 spapr-hcall: take iothread lock during handler call > > =A0 target-ppc: with MTTCG report more threads > > =A0 target-ppc: use atomic_cmpxchg for ld/st reservation > > =A0 target-ppc: flush tlb from all the cpu > >=20 > > =A0cputlb.c=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0| 15 +++++++= ++++++++ > > =A0hw/ppc/spapr_hcall.c=A0=A0=A0=A0| 11 +++++++++-- > > =A0include/exec/exec-all.h |=A0=A02 ++ > > =A0target-ppc/kvm.c=A0=A0=A0=A0=A0=A0=A0=A0|=A0=A02 +- > > =A0target-ppc/kvm_ppc.h=A0=A0=A0=A0|=A0=A02 +- > > =A0target-ppc/mmu-hash64.c |=A0=A02 +- > > =A0target-ppc/translate.c=A0=A0| 24 +++++++++++++++++++++--- > > =A07 files changed, 50 insertions(+), 8 deletions(-) > >=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 --ibq+fG+Ci5ONsaof Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBAgAGBQJXz5K1AAoJEGw4ysog2bOSZ8kP/jtANuAgsETEqBqN0cTUZmmv dbb/c+AW+a0VEV/hJwSTg/J7syoLLFa3LUp/lqBtckCbMIG/ngaO3CfIQsdEeL9x i3oNqyHFB5SJq7KHUjyhGN+GvMvWvrg2kSs2XF8coQi3CbnQsoeRFX27n1Hu+FZk QnZeXEV0yAbc2q+ngBNu2TrI7bTafDdx7xS+RD8ekHJTHd/fnlZS4mVsrEE0gS9s a2qe7f76rZ3X9is9e/Ue4CgFPeMgMPcr/DA9rktWnBNU5UHQmgYnN9kDR7i2k6tU gcG9zIYUICCunEhH5R3duI+lnwBkv/VWBGLaSvbUuyTPIWDqv4lK8We7vBjIIy53 wUG0RubQ1S0pEliDGcp3HbfrNnpexEIZJoKCDJD0GXwSgpfP5/FLFf8SaYsitzGh pWfub9470gwXoHtBbjJl3nTr213Cj80tKBBq1nZup9Bxmbwy8VUVNV8lRSFVYzS5 XyQHpMyoNp2E9zCedjfBnrfWe+oxTeOe/vTg3iCzgxCkySYKnPQ/K05n46Zy72nw ECtJoOeQZNQDrFX5Jt3qfQLqqUsGG3aMzhZSOx93EPKFlwgUZKGYKsFj1tKcAUI5 vPkk/VQ6P2z+YBz/Ry2jcD/D30ZgUSClBRReMY6BL2bbHsow1m+k8O68q8TNyK6e 0c7L8uJodDxHHQzAx+zw =a/Fp -----END PGP SIGNATURE----- --ibq+fG+Ci5ONsaof--