From nobody Tue Feb 10 08:04:50 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=toshiba.co.jp ARC-Seal: i=1; a=rsa-sha256; t=1597928133; cv=none; d=zohomail.com; s=zohoarc; b=jGSis2W8EzX/9SSmdOJUph6VQtjl5pLNQPbosh4wnvIQHTpTm0YpLphegAkaDYHSkTzXrNdmU45mkugeORl3kJae9ZKiy6nz5gXuJrOUADqbTtBIzRklpNJtuiH1m/1VG7yPxptrPFF6aWoAncb8FYsH11jHk1hc/F1PLrzD2fA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1597928133; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=u5PljA5HGgJoQhacENPV2kbekDCEo8Ii1pT/4d+7Uco=; b=OpqmOzIJowvFsLBH7RSKqkRB30og1uqkjBBzGMQ59enpHxu5lw9VIgwvUefvUnwDKCFflm88YrSrLa0wK3yT1zQLoEUT8l4ENWQiLX/TrwWmbcqVLp9k0J/hwd+whUjl8zICJ+ncRb5ykYrRlVVwiwjILSa9UL7P2Ax4zSsa9Fc= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1597928133567752.1532319630796; Thu, 20 Aug 2020 05:55:33 -0700 (PDT) Received: from localhost ([::1]:47606 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k8k6N-0002Ew-6x for importer@patchew.org; Thu, 20 Aug 2020 08:55:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38122) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k8cbx-0000yF-4s; Thu, 20 Aug 2020 00:55:37 -0400 Received: from mo-csw1116.securemx.jp ([210.130.202.158]:54104 helo=mo-csw.securemx.jp) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k8cbr-0005Dr-U7; Thu, 20 Aug 2020 00:55:35 -0400 Received: by mo-csw.securemx.jp (mx-mo-csw1116) id 07K4tJmI031419; Thu, 20 Aug 2020 13:55:20 +0900 Received: from imx12.toshiba.co.jp (imx12.toshiba.co.jp [61.202.160.132]) by relay.securemx.jp (mx-mr1111) id 07K4tIJC021865; Thu, 20 Aug 2020 13:55:19 +0900 Received: from enc03.toshiba.co.jp ([106.186.93.13]) by imx12.toshiba.co.jp with ESMTP id 07K4tIEa013070; Thu, 20 Aug 2020 13:55:18 +0900 (JST) Received: from hop101.toshiba.co.jp ([133.199.85.107]) by enc03.toshiba.co.jp with ESMTP id 07K4tI1N010320; Thu, 20 Aug 2020 13:55:18 +0900 X-Iguazu-Qid: 2wGrV5ExkTeoSQFQd4 X-Iguazu-QSIG: v=2; s=0; t=1597899319; q=2wGrV5ExkTeoSQFQd4; m=ZSBeRo0cUaHW2d51aGDT4R82sr7LdQDDf9LhBu8iUOA= From: Punit Agrawal To: peter.maydell@linaro.org Subject: [PATCH] hw/arm/virt: Default to architecture appropriate CPU Date: Thu, 20 Aug 2020 13:55:07 +0900 X-TSB-HOP: ON Message-Id: <20200820045507.614288-1-punit1.agrawal@toshiba.co.jp> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=210.130.202.158; envelope-from=punit1.agrawal@toshiba.co.jp; helo=mo-csw.securemx.jp X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/20 00:55:23 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Thu, 20 Aug 2020 08:54:49 -0400 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-arm@nongnu.org, Punit Agrawal , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" The default_cpu_type for the Virt machine is set to "cortex-a15" for both the arm (qemu-system-arm) and aarch64 (qemu-system-aarch64) targets. As a result, starting the aarch64 target with "-machine virt" defaults to booting with a Arm v7 cpu which is counter to expectation. Debugging the issue is further hampered by lack of any output from a supplied arm64 firmware as it is now running on the wrong CPU type. Fix this by defaulting to the "max" capability CPU for the target architecture. After the patch both the arm and aarch64 qemu default to the equivalent of passing "-cpu max". Signed-off-by: Punit Agrawal --- Hi Peter, I spent inordinately long time scratching my head trying to figure out why my arm64 VM wasn't booting in TCG mode. Please consider merging if you don't see any issues with the patch. Thanks, Punit hw/arm/virt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index ecfee362a1..7c5cbdba87 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -2424,7 +2424,7 @@ static void virt_machine_class_init(ObjectClass *oc, = void *data) mc->minimum_page_bits =3D 12; mc->possible_cpu_arch_ids =3D virt_possible_cpu_arch_ids; mc->cpu_index_to_instance_props =3D virt_cpu_index_to_props; - mc->default_cpu_type =3D ARM_CPU_TYPE_NAME("cortex-a15"); + mc->default_cpu_type =3D ARM_CPU_TYPE_NAME("max"); mc->get_default_cpu_node_id =3D virt_get_default_cpu_node_id; mc->kvm_type =3D virt_kvm_type; assert(!mc->get_hotplug_handler); --=20 2.28.0