Received: from eggs.gnu.org ([140.186.70.92]:60523) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHHDi-0006NJ-KI for qemu-devel@nongnu.org; Fri, 21 Oct 2011 11:41:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RHHDe-0006QK-Gm for qemu-devel@nongnu.org; Fri, 21 Oct 2011 11:41:18 -0400 Received: from gw.ac.upc.edu ([147.83.30.3]:59642) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHHDe-0006Of-3F for qemu-devel@nongnu.org; Fri, 21 Oct 2011 11:41:14 -0400 From: =?utf-8?Q?Llu=C3=ADs_Vilanova?= References: <4DDD4E15.1080404@mcgary.org> Date: Fri, 21 Oct 2011 17:41:07 +0200 In-Reply-To: (Peter Maydell's message of "Fri, 21 Oct 2011 07:58:54 +0100") Message-ID: <87r526xsh8.fsf@ginnungagap.bsc.es> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] Multi heterogenous CPU archs for SoC sim? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Blue Swirl , Andreas =?utf-8?Q?F=C3=A4rber?= , qemu-devel Developers , Greg McGary Peter Maydell writes: >> The only realistic way to get started with such setups I see is to create a >> new target-xxx for the specific mix, define TARGET_LONG_BITS etc. >> appropriately in a new cpu.h, compile the needed target-xyz/*.c to unique >> xxx-softmmu/xyz-*.o and dispatch from a cpu_init() to the two cpu_*_init(). > Yuck. Longer term if we want to support this kind of heterogeneity > we should be removing all the compile-time assumptions and generally > making the target-specifics suitably contained rather than leaking > into the rest of the code. Yup, this sounds like pointer tables. That's one of the main reasons I advocated C++. Another reason is improving code maintainability through templates (without impacting performance). >> I'm guessing we may need to distinguish the TBs at runtime? Reserving >> log2(#architectures) bits in the TBFLAGS might do, but feels ugly. >> Probably a lot of other issues I'm not seeing yet. > We may want the tb cache to be per-core anyway (and one thread per core), > which would avoid the problem of trying to wedge everything into one set > of tb_flags. Well, AFAIU if targets have different ISAs, the same physical tb will never be used by differing targets (ignoring the case of different targets but same ISA). Lluis -- "And it's much the same thing with knowledge, for whenever you learn something new, the whole world becomes that much richer." -- The Princess of Pure Reason, as told by Norton Juster in The Phantom Tollbooth