From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:58982) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UaO3W-00039V-V0 for qemu-devel@nongnu.org; Thu, 09 May 2013 06:26:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UaO3V-0006sM-IQ for qemu-devel@nongnu.org; Thu, 09 May 2013 06:26:34 -0400 Message-ID: <518B79CE.9060703@suse.de> Date: Thu, 09 May 2013 12:26:22 +0200 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <1361556605-21963-1-git-send-email-peter.maydell@linaro.org> <518B59C3.6070507@msgid.tls.msk.ru> In-Reply-To: <518B59C3.6070507@msgid.tls.msk.ru> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 0/6] Drop the irredeemably racy cpu_unlink_tb() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Tokarev Cc: Peter Maydell , Anthony Liguori , qemu-stable , qemu-devel@nongnu.org, Alexander Graf , Blue Swirl , Paul Brook , Richard Henderson Am 09.05.2013 10:09, schrieb Michael Tokarev: > 22.02.2013 22:09, Peter Maydell wrote: >> cpu-exec: wrap tcg_qemu_tb_exec() in a fn to restore the PC >=20 > This needed a "back merge" of env+cpu states back to cpu. > Maybe we should somehow revisit the whole concept of the > two, because it's sorta fun: at some point all functions > has been converted to accept `cpu' instead of `env', but > in many places the first thing a function does is to > get `env' pointer out of `cpu'. The concept is really easy: There is so much CPU code around that for many years no one dared to touch it, ;) so changes need to be done incrementally - not only to identify any fallout! If one function is converted to no longer rely on env, then rather likely in some caller it still needs to convert from env -> cpu. Once that caller is converted too, it goes on moving the conversion "outwards" until the only remaining env functions are TCG-related. env access from a specific *CPU type is cheap, thus only talking about common code here. You will find more background on the big "QOM CPUState part X" series. CPU_COMMON is definitely not the way for the future, it should be okay for backporting though in this case. Regards, Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer; HRB 16746 AG N=C3=BC= rnberg