From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:58390) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RlLVb-0000We-BZ for qemu-devel@nongnu.org; Thu, 12 Jan 2012 09:20:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RlLVV-0000bT-9A for qemu-devel@nongnu.org; Thu, 12 Jan 2012 09:20:03 -0500 Received: from cantor2.suse.de ([195.135.220.15]:33735 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RlLVV-0000bK-0D for qemu-devel@nongnu.org; Thu, 12 Jan 2012 09:19:57 -0500 Message-ID: <4F0EEBA4.1010500@suse.de> Date: Thu, 12 Jan 2012 15:18:12 +0100 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] throwing away translated code on CPU reset List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: QEMU Developers , Alexander Graf Am 12.01.2012 15:00, schrieb Peter Maydell: > When doing TCG code translation, the target-foo translate.c > code is allowed to bake assumptions into the generated code from > the current values of various fields in the CPUState. This then > imposes the requirement that if the field is changed then tb_flush > must be called to throw away the now-incorrect generated code. >=20 > However, cpu_reset() changes (unsurprisingly) lots of fields in > the CPUState, but it doesn't call tb_flush()... >=20 > So should cpu_reset() implementations be changed to call tb_flush() > as well as tlb_flush(), or is this supposed to work in some other > way? I would rather suggest to introduce a new cpu_common_reset() that hides these details - memset() for common parts and whatever necessary here. 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