From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:40704) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLKKd-0001PJ-M5 for qemu-devel@nongnu.org; Mon, 08 Oct 2012 16:53:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TLKKc-0001Hr-6S for qemu-devel@nongnu.org; Mon, 08 Oct 2012 16:53:43 -0400 Received: from mail-oa0-f45.google.com ([209.85.219.45]:59311) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLKKb-0001Gy-Th for qemu-devel@nongnu.org; Mon, 08 Oct 2012 16:53:41 -0400 Received: by mail-oa0-f45.google.com with SMTP id i18so573862oag.4 for ; Mon, 08 Oct 2012 13:53:40 -0700 (PDT) From: Anthony Liguori In-Reply-To: References: <87obkc3e77.fsf@codemonkey.ws> Date: Mon, 08 Oct 2012 15:53:37 -0500 Message-ID: <877gr0u1m6.fsf@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] Building QEMU with multiple CPU targets. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: "qemu-devel@nongnu.org Developers" , Peter Crosthwaite , John Williams , Paolo Bonzini , "Edgar E. Iglesias" , Andreas =?utf-8?Q?F=C3=A4rber?= Peter Maydell writes: > On 8 October 2012 21:23, Anthony Liguori wrote: >> It may be possible to cheat and compile the TCG + CPU code multiple >> times as dynamic libraries. You can then load the libraries with >> dlopen() with local symbol resolution. > > ...and when the common code wants to (say) call cpu_exit() on a > particular core, how does it know which DLL's version to call? > That said, I have a feeling I've heard about people trying this > kind of approach before, so it's probably possible to get something > that works on at least one host OS. I think doing it "properly" > would be less of a hack, though... I think you basically need to treat a "foreign" CPU separately from a local CPU. You would load foreign CPUs as libraries and interact with it separately. I think the initial focus should be on hacking something to work. Then we can figure out what's the best path to merging. Regards, Anthony Liguori > > -- PMM