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: 896356 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com 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 40KZWR3m5Vz9s0W for ; Tue, 10 Apr 2018 01:50:10 +1000 (AEST) Received: from localhost ([::1]:47960 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5Z3W-0002bP-Kh for incoming@patchwork.ozlabs.org; Mon, 09 Apr 2018 11:50:06 -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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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;