From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LZRrq-0005yL-7E for qemu-devel@nongnu.org; Tue, 17 Feb 2009 10:28:14 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LZRro-0005x4-CN for qemu-devel@nongnu.org; Tue, 17 Feb 2009 10:28:13 -0500 Received: from [199.232.76.173] (port=39944 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LZRro-0005wy-63 for qemu-devel@nongnu.org; Tue, 17 Feb 2009 10:28:12 -0500 Received: from fk-out-0910.google.com ([209.85.128.191]:36007) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LZRrn-0001ks-Ml for qemu-devel@nongnu.org; Tue, 17 Feb 2009 10:28:11 -0500 Received: by fk-out-0910.google.com with SMTP id z23so1453561fkz.2 for ; Tue, 17 Feb 2009 07:28:08 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <1234864778-19099-5-git-send-email-yu.liu@freescale.com> References: <1234864778-19099-1-git-send-email-yu.liu@freescale.com> <1234864778-19099-2-git-send-email-yu.liu@freescale.com> <1234864778-19099-3-git-send-email-yu.liu@freescale.com> <1234864778-19099-4-git-send-email-yu.liu@freescale.com> <1234864778-19099-5-git-send-email-yu.liu@freescale.com> Date: Tue, 17 Feb 2009 17:28:08 +0200 Message-ID: Subject: Re: [Qemu-devel] [PATCH 4/5] kvm/powerpc: Add MPC8544DS board support From: Blue Swirl Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kvm-ppc@vger.kernel.org, Liu Yu , hollisb@us.ibm.com, aurelien@aurel32.net On 2/17/09, Liu Yu wrote: > This patch add emulation of MPC8544DS board. > And it can work on All E500 platforms. > > Signed-off-by: Liu Yu > + * Copyright (C) 2009 Freescale Semiconductor, Inc. All rights reserved. Again, "All rights reserved" is not what GPL says. > + ret = kvmppc_read_host_property(node, prop, &cell, sizeof(cell)); > + if (ret < 0) { > + fprintf(stderr, "couldn't read host %s/%s\n", node, prop); > + goto out; > + } For the Qemu case, the host CPU or system may be different from the emulated target CPU or system. These should be moved to target-ppc/kvm_ppc.c. > + path = qemu_malloc(pathlen); > + if (path == NULL) > + goto out; qemu_malloc will not return NULL anymore, please remove the check. > + free(path); s/free/qemu_free/g > + sprintf(buf, "/cpus/%s", dirp->d_name); Please use snprintf. > + /* Register Memory */ > + cpu_register_physical_memory(0, ram_size, 0); This was the old way. Please use qemu_ram_alloc instead.