From patchwork Mon Apr 9 15:49:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Huang X-Patchwork-Id: 10331721 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 27B986020F for ; Mon, 9 Apr 2018 15:50:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1987A287A3 for ; Mon, 9 Apr 2018 15:50:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0E24F28B0C; Mon, 9 Apr 2018 15:50:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 94239287A3 for ; Mon, 9 Apr 2018 15:50:28 +0000 (UTC) Received: from localhost ([::1]:48000 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5Z3r-0003Hy-1z for patchwork-qemu-devel@patchwork.kernel.org; Mon, 09 Apr 2018 11:50:27 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39973) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5Z30-0002ZV-VO for qemu-devel@nongnu.org; Mon, 09 Apr 2018 11:49:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5Z30-0004kC-2p for qemu-devel@nongnu.org; Mon, 09 Apr 2018 11:49:35 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:38792 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1f5Z2v-0004cK-7n; Mon, 09 Apr 2018 11:49:29 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 15B5D4023BAD; Mon, 9 Apr 2018 15:49:25 +0000 (UTC) Received: from weilaptop.redhat.com (ovpn-120-209.rdu2.redhat.com [10.10.120.209]) by smtp.corp.redhat.com (Postfix) with ESMTP id A47552026990; Mon, 9 Apr 2018 15:49:21 +0000 (UTC) From: Wei Huang To: qemu-devel@nongnu.org Date: Mon, 9 Apr 2018 10:49:21 -0500 Message-Id: <20180409154921.29906-1-wei@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Mon, 09 Apr 2018 15:49:25 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Mon, 09 Apr 2018 15:49:25 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'wei@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH 1/1] mach-virt: Change default cpu and gic-version setting to "max" X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, drjones@redhat.com, qemu-arm@nongnu.org, abologna@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Running mach-virt machine types (i.e. "-M virt") on different systems can result in various misleading warnings if -cpu and/or gic-version not specified. For KVM, this can be solved mostly by using "host" type. But the "host" type doesn't work for TCG. Compared with "host", the "max" type not only supports auto detection under KVM mode, but also works with TCG. So this patch set "max" as the default types for both -cpu and gic-version. Signed-off-by: Wei Huang --- hw/arm/virt.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 94dcb125d3..1a9d68b8d5 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1555,7 +1555,7 @@ static void virt_machine_class_init(ObjectClass *oc, void *data) mc->minimum_page_bits = 12; mc->possible_cpu_arch_ids = virt_possible_cpu_arch_ids; mc->cpu_index_to_instance_props = virt_cpu_index_to_props; - mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-a15"); + mc->default_cpu_type = ARM_CPU_TYPE_NAME("max"); mc->get_default_cpu_node_id = virt_get_default_cpu_node_id; } @@ -1609,13 +1609,13 @@ static void virt_2_12_instance_init(Object *obj) "Set on/off to enable/disable using " "physical address space above 32 bits", NULL); - /* Default GIC type is v2 */ - vms->gic_version = 2; + /* Default GIC type is max */ + vms->gic_version = -1; object_property_add_str(obj, "gic-version", virt_get_gic_version, virt_set_gic_version, NULL); object_property_set_description(obj, "gic-version", - "Set GIC version. " - "Valid values are 2, 3 and host", NULL); + "Set GIC version. Valid values are 2, 3, " + "host, and max", NULL); if (vmc->no_its) { vms->its = false;