From patchwork Thu Mar 19 14:53:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Huang X-Patchwork-Id: 452000 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 1995C1400B7 for ; Fri, 20 Mar 2015 01:53:54 +1100 (AEDT) Received: from localhost ([::1]:39616 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYbpY-0006mP-53 for incoming@patchwork.ozlabs.org; Thu, 19 Mar 2015 10:53:52 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45292) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYbpB-0006Mn-Pn for qemu-devel@nongnu.org; Thu, 19 Mar 2015 10:53:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YYbp5-00086f-Lc for qemu-devel@nongnu.org; Thu, 19 Mar 2015 10:53:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59076) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYbp5-00085x-GL for qemu-devel@nongnu.org; Thu, 19 Mar 2015 10:53:23 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 350FF8E90B; Thu, 19 Mar 2015 14:53:22 +0000 (UTC) Received: from seattle-04.farm.hsv.redhat.com (seattle-04.farm.hsv.redhat.com [10.15.5.10]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t2JErLJK002488; Thu, 19 Mar 2015 10:53:21 -0400 From: Wei Huang To: qemu-devel@nongnu.org Date: Thu, 19 Mar 2015 09:53:21 -0500 Message-Id: <1426776801-17869-1-git-send-email-wei@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: peter.maydell@linaro.org, pbonzini@redhat.com Subject: [Qemu-devel] [PATCH 1/1] hw/arm/virt: Make host as default CPU type on AArch64 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Currently mach-virt machine model uses cortex-a15 as default CPU when -cpu option is missing. This caused confusion to certain virt tools (e.g. libvirt, virt-install) which don't suppply -cpu option while invoking qemu-kvm. To solve this problem this patch changes the default CPU type to "host" when target is AArch64. NOTE: It doesn't use "cortex-a57" as default CPU type because cortex-a57 doesn't work on some 64bit ARM machine, such as APM Mustang. "host" is a safe bet for all AArch64 machines. Signed-off-by: Wei Huang --- hw/arm/virt.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 9072bc2..1e8371c 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -731,7 +731,11 @@ static void machvirt_init(MachineState *machine) char **cpustr; if (!cpu_model) { +#if defined(TARGET_AARCH64) + cpu_model = "host"; +#else cpu_model = "cortex-a15"; +#endif } /* Separate the actual CPU model name from any appended features */