Received: from eggs.gnu.org ([2001:4830:134:3::10]:46475) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZhzB9-0003cO-D4 for qemu-devel@nongnu.org; Fri, 02 Oct 2015 08:11:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZhzB6-0000bY-6V for qemu-devel@nongnu.org; Fri, 02 Oct 2015 08:11:11 -0400 Received: from forward15h.cmail.yandex.net ([87.250.230.157]:44151) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZhzB5-0000Yg-SO for qemu-devel@nongnu.org; Fri, 02 Oct 2015 08:11:08 -0400 From: Sergey Sorokin In-Reply-To: References: <1441814517-16041-1-git-send-email-afarallax@yandex.ru> <298531441986955@web10g.yandex.ru> MIME-Version: 1.0 Message-Id: <2269071443787864@web9h.yandex.ru> Date: Fri, 02 Oct 2015 15:11:04 +0300 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v3] target-arm: Break the TB after ISB to execute self-modified code correctly List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: QEMU Developers Oh, sorry, I forgot about this. A lot of work now. I'll send the patch. 01.10.2015, 15:12, "Peter Maydell" : > On 11 September 2015 at 16:55, Sergey Sorokin wro= te: >> =C2=A011.09.2015, 18:44, "Peter Maydell" : >>> =C2=A0On 9 September 2015 at 17:01, Sergey Sorokin wrote: >>>> =C2=A0=C2=A0If any store instruction writes the code inside the same= TB >>>> =C2=A0=C2=A0after this store insn, the execution of the TB must be s= topped >>>> =C2=A0=C2=A0to execute new code correctly. >>>> =C2=A0=C2=A0As described in ARMv8 manual D3.4.6 a self-modified code= need to do >>>> =C2=A0=C2=A0IC invalidation to be valid, and ISB after it. So it's e= nough to end the TB >>>> =C2=A0=C2=A0after ISB instruction on the code translation. >>>> =C2=A0=C2=A0Also this TB break is necessary to take any pending inte= rrupts immediately >>>> =C2=A0=C2=A0according to ARMv8 ARM D1.14.4. >>>> >>>> =C2=A0=C2=A0Signed-off-by: Sergey Sorokin >>> >>> =C2=A0This doesn't compile... >>> >>> =C2=A0/home/petmay01/linaro/qemu-from-laptop/qemu/target-arm/translat= e.c: In >>> =C2=A0function =E2=80=98disas_thumb2_insn=E2=80=99: >>> =C2=A0/home/petmay01/linaro/qemu-from-laptop/qemu/target-arm/translat= e.c:10017:29: >>> =C2=A0error: =E2=80=98return=E2=80=99 with no value, in function retu= rning non-void >>> =C2=A0[-Werror=3Dreturn-type] >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0return; >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0^ > >> =C2=A0Oh, sorry. I'll fix it next week. > > Just a nudge that I think I'm still waiting for the next round of > this patchset from you? > > thanks > -- PMM