From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60106) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VmJU1-0004qZ-MM for qemu-devel@nongnu.org; Fri, 29 Nov 2013 03:31:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VmJTw-0001vy-Os for qemu-devel@nongnu.org; Fri, 29 Nov 2013 03:31:29 -0500 Received: from mail-pb0-f48.google.com ([209.85.160.48]:35559) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VmJTw-0001vl-J7 for qemu-devel@nongnu.org; Fri, 29 Nov 2013 03:31:24 -0500 Received: by mail-pb0-f48.google.com with SMTP id md12so14045221pbc.35 for ; Fri, 29 Nov 2013 00:31:23 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <52984B0C.9030209@cn.fujitsu.com> References: <1385450531-3170-1-git-send-email-lig.fnst@cn.fujitsu.com> <1385450531-3170-4-git-send-email-lig.fnst@cn.fujitsu.com> <5295B9BD.7080101@suse.de> <5295BB1E.1090600@suse.de> <5297E3F1.4060200@cn.fujitsu.com> <5298098C.1040105@suse.de> <52984B0C.9030209@cn.fujitsu.com> From: Peter Maydell Date: Fri, 29 Nov 2013 08:31:03 +0000 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH v4 3/4] hw/arm: add sunxi machine type List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Li Guang Cc: Peter Crosthwaite , Bamvor Jian Zhang , =?UTF-8?Q?Herv=C3=A9_Poussineau?= , =?UTF-8?Q?Andreas_F=C3=A4rber?= , qemu-devel On 29 November 2013 08:06, Li Guang wrote: > what I design is: > we have a sunxi series as a machine, then > for sunx4i, we specify -M sunxi -cpu cortex-a8 -device x1 ... > for sunx5i, we specify -M sunxi -cpu cortex-a8 -device x2 ... > for sunx7i, we specify -M sunxi -cpu cortex-a7 -devcie x3 ... > for cubieboard, we specify -M sunxi -cpu -cortex-a8 -device x1 -device p1 No, QEMU doesn't work this way. "-M whatever" specifies a board model, so in this example it should be "-M cubieboard" and so on. That then gives you a particular CPU and set of devices. Obviously where we have several board models that share a single SoC they share implementation (by instantiating the same SoC object). If we have several SoCs that share common subcomponents like a UART, then they share implementation by having all those SoCs instantiate the same UART object. -cpu is really only intended where you have a situation like the PC where just the CPU can be plugged and unplugged into a board; it doesn't fit for SoC-based systems. Similarly, -device is really (currently) for pluggable devices like ISA or PCI cards -- where the device is a non-removable part of the SoC it doesn't work. As Andreas says, we need to model real actual hardware, not some abstraction that kind of matches the kernel's abstractions. Is "sunxi" what the hardware is actually called, or only what the kernel port has been called? More information about where this name comes from might make it easier to tell if it is the correct one for the QEMU SoC models. thanks -- PMM