From patchwork Thu Dec 26 21:19:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiaxun Yang X-Patchwork-Id: 13921438 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F185FE77188 for ; Thu, 26 Dec 2024 21:21:59 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tQvHV-0003wI-HH; Thu, 26 Dec 2024 16:20:33 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tQvHP-0003uW-1l for qemu-devel@nongnu.org; Thu, 26 Dec 2024 16:20:27 -0500 Received: from fhigh-a4-smtp.messagingengine.com ([103.168.172.155]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tQvHN-0003EE-Nw for qemu-devel@nongnu.org; Thu, 26 Dec 2024 16:20:26 -0500 Received: from phl-compute-05.internal (phl-compute-05.phl.internal [10.202.2.45]) by mailfhigh.phl.internal (Postfix) with ESMTP id 5D66B1140198; Thu, 26 Dec 2024 16:20:24 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Thu, 26 Dec 2024 16:20:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1735248024; x=1735334424; bh=Wn81zmb/wOHLnmGIuhH/D0MryJOnpofku8vcL5IQi2Q=; b= b5VDN0YSe7pkrxrItX9alysjbnDdmoLdvSg4NBujDoP065dTUzyoB5avyEl/Dkn2 7sAIBIZCM/J7EoNcdoYgLjD2wClBNcuahHEQLgEd5e60A2BcKQT3CzcogKhzpgwS 5itLJ23/HWzXlThNeS/0OJ+XVs5xVhH3hTz7xjyfzvX29Srhl/ZnWPuYPvgoDipF 7FW7c5OjkEr4tZt/L+n/T1zpBwtGLj7dLxE018ArVGF9/efN5GdbBjK25NHsod+U 9y2m6jxgqagy7Q8iASzO6m9w8YaJRJnaqEgOeLxt2CAs1ztmBLL9HWfuK1Hc3xHa 553XiwtfgZSqx+FaGfu96w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1735248024; x= 1735334424; bh=Wn81zmb/wOHLnmGIuhH/D0MryJOnpofku8vcL5IQi2Q=; b=b jSeP1pC9id9WQ5Pi7fxa8h0mRFQTxNtEoY8HM4Mq7GSsbZPpb9VX0Q8782HtGksf S0qhmBAXvfOgL4YfcsocMV2HbaMSWY3fPwKH0CZmHOwXZQAPOL73TiY5H81XiwBs pizgFvtxGRUDqM9TgdIfbnQ5uikOvkySxDEDkd7ib76bam576ziy4UgFOvRBp6Ia D7sED0krHh4SLtWq1IvtV5uFaBVZw2GDV2ZJRldQtNZx4zPTIFiEYa/+rashBLtK gLpBguf/hpdWKzKGIrN7ecLSDC53FdZw7gdvoLNWlQjCAGHoGLMIOaL5twU1Vasl PCXDvTJni+edAFnDuTYIw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddruddukedgudegjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhfffugggtgffkfhgjvfevofesthejredtredt jeenucfhrhhomheplfhirgiguhhnucgjrghnghcuoehjihgrgihunhdrhigrnhhgsehflh ihghhorghtrdgtohhmqeenucggtffrrghtthgvrhhnpedvkeeihfefveekueevteefleff keegudeghfdtuddugefhueevgeffgedukeejleenucevlhhushhtvghrufhiiigvpeegne curfgrrhgrmhepmhgrihhlfhhrohhmpehjihgrgihunhdrhigrnhhgsehflhihghhorght rdgtohhmpdhnsggprhgtphhtthhopeduvddpmhhouggvpehsmhhtphhouhhtpdhrtghpth htohepmhgrohgsihgsoheslhhoohhnghhsohhnrdgtnhdprhgtphhtthhopehmrghrtggv lhdrrghpfhgvlhgsrghumhesghhmrghilhdrtghomhdprhgtphhtthhopehpsghonhiiih hnihesrhgvughhrghtrdgtohhmpdhrtghpthhtohepghgrohhsohhngheslhhoohhnghhs ohhnrdgtnhdprhgtphhtthhopegvsghlrghkvgesrhgvughhrghtrdgtohhmpdhrtghpth htohepjhhirgiguhhnrdihrghnghesfhhlhihgohgrthdrtghomhdprhgtphhtthhopehq vghmuhdquggvvhgvlhesnhhonhhgnhhurdhorhhgpdhrtghpthhtohepfigrnhhghigrnh grnhehheeshhhurgifvghirdgtohhmpdhrtghpthhtohepiihhrghouddrlhhiuhesihhn thgvlhdrtghomh X-ME-Proxy: Feedback-ID: ifd894703:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 26 Dec 2024 16:20:22 -0500 (EST) From: Jiaxun Yang Date: Thu, 26 Dec 2024 21:19:51 +0000 Subject: [PATCH v2 20/23] hw/loongarch/virt: Default to max32 CPU for LoongArch 32 build MIME-Version: 1.0 Message-Id: <20241226-la32-fixes1-v2-20-0414594f8cb5@flygoat.com> References: <20241226-la32-fixes1-v2-0-0414594f8cb5@flygoat.com> In-Reply-To: <20241226-la32-fixes1-v2-0-0414594f8cb5@flygoat.com> To: qemu-devel@nongnu.org Cc: Song Gao , Bibo Mao , Eric Blake , Markus Armbruster , Eduardo Habkost , Marcel Apfelbaum , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?q?Daud=C3=A9?= , Yanan Wang , Zhao Liu , Paolo Bonzini , Jiaxun Yang X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=946; i=jiaxun.yang@flygoat.com; h=from:subject:message-id; bh=FBUn2ePNQYQFLuMxPG6+QOkSyR+VuhIkJlorSkF3OU8=; b=owGbwMvMwCXmXMhTe71c8zDjabUkhvTcE9lPJ62MUTnKd+xXsJ1pb9dTsVn6Dezc8RE/74ZfL rHfI2XZUcrCIMbFICumyBIioNS3ofHigusPsv7AzGFlAhnCwMUpABM5Xs/wPzdrY/1JSf1n+6Z9 X/FJvKcwlyU0ZDYjo5j/mykBuz31Qxn+VxXnnpQN+VV5uKhlWmHg05Mi511PTalIu7XvedcJq2Y XNgA= X-Developer-Key: i=jiaxun.yang@flygoat.com; a=openpgp; fpr=980379BEFEBFBF477EA04EF9C111949073FC0F67 Received-SPF: pass client-ip=103.168.172.155; envelope-from=jiaxun.yang@flygoat.com; helo=fhigh-a4-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org la464 CPU is not available on LoongArch32. Use max32 which makes more sense here. Signed-off-by: Jiaxun Yang --- hw/loongarch/virt.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c index 3a905cf71d46e3c5a29672f7bb73faedf1d29444..343d2e745e155d59f0ff17124b3c77ec9b3c111e 100644 --- a/hw/loongarch/virt.c +++ b/hw/loongarch/virt.c @@ -1440,7 +1440,11 @@ static void virt_class_init(ObjectClass *oc, void *data) HotplugHandlerClass *hc = HOTPLUG_HANDLER_CLASS(oc); mc->init = virt_init; +#if defined(TARGET_LOONGARCH64) mc->default_cpu_type = LOONGARCH_CPU_TYPE_NAME("la464"); +#elif defined(TARGET_LOONGARCH32) + mc->default_cpu_type = LOONGARCH_CPU_TYPE_NAME("max32"); +#endif mc->default_ram_id = "loongarch.ram"; mc->desc = "QEMU LoongArch Virtual Machine"; mc->max_cpus = LOONGARCH_MAX_CPUS;