Received: from eggs.gnu.org ([2001:4830:134:3::10]:53033) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1xQT-0000ov-3h for qemu-devel@nongnu.org; Fri, 19 Dec 2014 08:17:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y1xQJ-0007rU-CR for qemu-devel@nongnu.org; Fri, 19 Dec 2014 08:17:01 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56857) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1xQJ-0007rD-4s for qemu-devel@nongnu.org; Fri, 19 Dec 2014 08:16:51 -0500 Date: Fri, 19 Dec 2014 11:16:47 -0200 From: Eduardo Habkost Message-ID: <20141219131647.GX5002@thinpad.lan.raisama.net> References: <1418963165-498-1-git-send-email-ehabkost@redhat.com> <5493F42B.3080208@suse.de> <5493FE0E.6090209@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <5493FE0E.6090209@redhat.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 0/2] tcg: Move TCG arch-specific initialization inside TCG code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: rth@twiddle.net, Andreas =?iso-8859-1?Q?F=E4rber?= , qemu-devel@nongnu.org On Fri, Dec 19, 2014 at 11:29:34AM +0100, Paolo Bonzini wrote: > On 19/12/2014 10:47, Andreas F=E4rber wrote: > > How do you imagine this to work with multiple CPU types? From the loo= ks > > of it, this is for the target CPU, not the TCG architecture, so > > tcg_arch_init() limits us to one implementation unlike now. > > On the other hand it doesn't seem to be a per-CPU, i.e. CPUClass, > > initialization either... >=20 > I think these should go in a separate CPUClass method that is called by > tcg_exec_init (only for first_cpu now; later for all CPUs if each CPU > gets a separate tcg_ctx). configure_accelerator() (and tcg_exec_init()) is called before machine_class->init() (where the CPUs are created). I have work in progress that introduces arch-specific TYPE_ACCEL subclasses. With this, we can then make tcg_arch_init() a TYPE_TCG_ACCEL method that arch-specific TYPE_TCG_ACCEL subclasses can implement. Is it already possible to build a QEMU binary with multiple TCG arches, today? --=20 Eduardo