From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:44185) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ri4Yv-0005mO-EK for qemu-devel@nongnu.org; Tue, 03 Jan 2012 08:37:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ri4Yu-0004u8-90 for qemu-devel@nongnu.org; Tue, 03 Jan 2012 08:37:57 -0500 Received: from mail-iy0-f173.google.com ([209.85.210.173]:32777) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ri4Yu-0004tu-5N for qemu-devel@nongnu.org; Tue, 03 Jan 2012 08:37:56 -0500 Received: by iagj37 with SMTP id j37so35874504iag.4 for ; Tue, 03 Jan 2012 05:37:55 -0800 (PST) Message-ID: <4F0304AD.6010800@codemonkey.ws> Date: Tue, 03 Jan 2012 07:37:49 -0600 From: Anthony Liguori MIME-Version: 1.0 References: <87ehvis3uj.fsf@trasno.mitica> <4F01B542.8000800@suse.de> <4F02567F.6080701@codemonkey.ws> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] KVM call agenda for Tuesday 3 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Chris Wright , Developers qemu-devel , =?UTF-8?B?QW5k?= =?UTF-8?B?cmVhcyBGw6RyYmVy?= , KVM devel mailing list , quintela@redhat.com On 01/03/2012 04:26 AM, Peter Maydell wrote: > On 3 January 2012 01:14, Anthony Liguori wrote: >> Let's separate out what a user *should* do from what a user *can* do. >> >> A user *should* have a command line syntax that reflects something that >> makes sense to them. For instance, qemu-system-arm --machine beaglebone >> >> I don't really care what the SoC or CPU in my beaglebone is. I just want to >> emulate one. >> >> But I do believe we want to make it possible for -device to create a CPU >> even when it doesn't make sense. > > So there's a couple of things here that fall in the "can't do that" bin: > > 1. trying to instantiate more than one device which has a CPU in it > (eg the default one from the machine/SoC model, and the second one > from the -device my-soc command line argument). (Basic QEMU limitation.) But this is something that shouldn't be a limitation IMHO. > 2. trying to replace an existing device in the machine model with a > different one which isn't connection-compatible with it. So for the PC, I imagine we would have something like a socket[0]:link property. You would set topology by setting properties to make a single CPU appear to have multiple cores/threads. For what you're getting at, you actually want to model the CPUs in QOM such that you would have an ARM926 is-a ARMCPU is-a CPUCommon. Then you could have the beagle machine have a link. If it always has a single CPU, you make it a child and the user can't change it. They can still set properties on the CPU so if there are flags they need to tweak, they could. > For instance, > in a fully QOM world, trying to run a beagle machine with (say) a 926 > CPU should fail to instantiate, because the 926 CPU won't have the right > set of irq/gpio inputs and outputs that the beagle machine needs to > connect up to. (This is the QOM equivalent of trying to ram a 486 > into a Pentium CPU socket.) > > I don't think we even have syntax for 2 at the moment except for the > weird special case of "-cpu foo". Yeah, it's still not clear to me how much we want to model CPUs in QOM. We could do it very simply and flat or model the individual CPUs as proper types which lets you do fancier things with links. Regards, Anthony Liguori > -- PMM >