From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56586) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNf8X-0003Ht-2O for qemu-devel@nongnu.org; Thu, 14 Jul 2016 07:49:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bNf8T-0001dP-6O for qemu-devel@nongnu.org; Thu, 14 Jul 2016 07:49:01 -0400 References: <1468354426-837-1-git-send-email-sergey.fedorov@linaro.org> <1468354426-837-7-git-send-email-sergey.fedorov@linaro.org> <87y4544iv1.fsf@linaro.org> <57877310.4070205@gmail.com> From: Paolo Bonzini Message-ID: <79a897b0-107d-f647-943b-dc5247cac999@redhat.com> Date: Thu, 14 Jul 2016 13:48:34 +0200 MIME-Version: 1.0 In-Reply-To: <57877310.4070205@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v3 06/11] tcg: Introduce tb_mark_invalid() and tb_is_invalid() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Sergey Fedorov , =?UTF-8?Q?Alex_Benn=c3=a9e?= , Sergey Fedorov Cc: qemu-devel@nongnu.org, mttcg@greensocs.com, fred.konrad@greensocs.com, a.rigo@virtualopensystems.com, cota@braap.org, bobby.prani@gmail.com, rth@twiddle.net, patches@linaro.org, mark.burton@greensocs.com, jan.kiszka@siemens.com, peter.maydell@linaro.org, claudio.fontana@huawei.com, Peter Crosthwaite , "Edgar E. Iglesias" , Eduardo Habkost , Michael Walle , Aurelien Jarno , Leon Alrae , Anthony Green , Jia Liu , David Gibson , Alexander Graf , Mark Cave-Ayland , Artyom Tarasenko , Bastian Koppelmann , Guan Xuetao , Max Filippov , qemu-arm@nongnu.org, qemu-ppc@nongnu.org On 14/07/2016 13:10, Sergey Fedorov wrote: > > This has merge conflicts with the current state of master. Is there > > anyway to have a common implementation that is specialised only when > > needed? > > The point was to put the assumptions on invalid CPU TB state as close t= o > cpu_get_tb_cpu_state() definitions as possible. So that if anyone make > changes they can notice those assumptions and correct them if necessary= . It causes some repetition indeed, but I think it's a good idea. restore_state_to_opc is another case where most implementations have the same simple "env->pc =3D data[0]" implementation. Paolo