From nobody Mon Dec 15 11:23:40 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1752007634; cv=none; d=zohomail.com; s=zohoarc; b=aEShod/OCjUrR9isBa4dW2Bjsvau8PCeAwxG3NR+vjBwIEBCO4nsxOd7QXuxLxI6m0W+8JjvJMv4tBtuvpkcc06/CzuRbXbWiHWd/t0Vyt9uIYl/ZGBjz+RpMKT4ZP83O1Paou2zZgDfT1P4WzUTVHGzqrEl4Zyygsw9MeOWc+Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1752007634; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=MdQhcbrWCDw+stGMxabzY7NAeBH4tymx5hVA3eT0Fq4=; b=M9zTSpzCcK2eLmGoRLCNKUCZMEsN3sUp1s2EdMduWNL18O3cldbVwmYSYMfBhr6P77THpsd0PX64tzcqhjU/yPByEuKR82c5kyPl51r7swHuUgb032185mV9SPUIYznA6n4qSnjlMPjCJ6hwOQ2zlhzG4aeGaIgEWSEFWWHYadc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1752007634681304.77058408810774; Tue, 8 Jul 2025 13:47:14 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uZFAG-0002Sm-3U; Tue, 08 Jul 2025 16:43:44 -0400 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 1uZDha-000840-Ic for qemu-devel@nongnu.org; Tue, 08 Jul 2025 15:10:24 -0400 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uZDhX-0005UB-Ck for qemu-devel@nongnu.org; Tue, 08 Jul 2025 15:10:02 -0400 Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-6099d89a19cso8480753a12.2 for ; Tue, 08 Jul 2025 12:09:54 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-454cd38eee8sm27951465e9.6.2025.07.08.10.21.14 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 08 Jul 2025 10:21:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1752001793; x=1752606593; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=MdQhcbrWCDw+stGMxabzY7NAeBH4tymx5hVA3eT0Fq4=; b=dP5ZNyxa4qwPKz+9hDD9T6ijFwrQ4Ihz+9qpAQ1/qMfunUtcWWboyAeUwrEiTbCd1/ tonj+Xolb6WcFKbVsRB+ysmZE5tp4N22DOsMy4cQv7LeS83r4N6VURdidvKDRlWoNIkS ppHKxpJhWtHeb+EOcfdDgF3NcXwTlDGYPAtP9YRdx2OhXUSQeR0YxWsJMWhKGaBch7V7 0N6gCE9VPaSTNeOaoOq+Pn8LeIaecTKQuygeneMD5n9IbuxgkPgevMMc/gsUClqefIEW 1vBwAkDUu0lSyAQ+MfSH1SmnGH84Kn91FCIXEurBMqhMsKC+CroPtT6PSyTqU90uxsMz gc4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752001793; x=1752606593; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MdQhcbrWCDw+stGMxabzY7NAeBH4tymx5hVA3eT0Fq4=; b=uLcq6h5lAL2EnkhwnIEoLnmZpBEqowmI36Romti2Ae+ydsuQWUcUVB/eK+JP1Z9Sfg EA4JJkcUg9k/FkyHM6aRkXyM/Ed7yT143PJoHLqlLJ7tA3D7mC6T1F89Eo0Qrgg1LQd3 vMQ/FsWoxil9xlTfJxQ9RCNrNp7ITnBk/f7+N6onDuLFhBbwxnyHQKPn9stWkXXidSO8 fYe8Pfc1bio3BHkdgYIHVoJE0KqEv1UG2gMTlvoPA2kwCR6Ar1tXVoASeLXux0VLrnfY tNR3lf/Cel5gbYAF6xfhOLWV3D0lyROE2Lk/0Dycghs1qmqWaQL6f0/abTDPsevYVb2V gFXw== X-Gm-Message-State: AOJu0YxkVy3LHzbFmXZNLoWv6FG/0/NwuWBFyxaIgYD2R0UvwRnAIlwz ReSaDLVqSPJ8cMADeL+xWGRXbehKpVhT0h1okvyWYEJoGbzP7DogWcmPLxOgA7wnR3IizirF1+S ZSigU X-Gm-Gg: ASbGnct3E4OiyBAFMPX3GI0ioeO6UC/qtQVZpWtnjNU7vdiIoBGy8RbHQS/ivct8ehf QRJ4M0CVd+TIxkP6WKlT7rxpIg7bEvMjIto3okExoz6KMStlIO59deDLv02x6mDtvxFXe2AGK8o J1WPe45XTUlFsgS+rqa7rpVeFPLMHeydt6+SBybCSGF9jmSXXWo4xx9yrJzTlzIK2jsLDk99KIo vMOga5DU98qryiteogm0x6z5Hp+Dpgzn4z4z6wb367rmsTS3UHa5RM25VeaNLGE6v98g9QD1c47 0V6xncIbWr3rqSVHb31ZzHGSvy9jD0iNT6lDpM9BN1m27fVGgfYIfH/Yi3kK8y9ztVDMfBtUHvQ DBCzir5vBfYbmhyS3zC7bwzn0piCs4SyTeRKs X-Google-Smtp-Source: AGHT+IFxP3b5N6vxU6EpIbRwS7wH6KJLvPs4GzEpfkT+XKcIdQ581Ja1R1yt6JsGcJHJpBkNjt+5HA== X-Received: by 2002:a05:600c:5247:b0:453:b1c:442a with SMTP id 5b1f17b1804b1-454c0fc516bmr100411325e9.27.1751995282887; Tue, 08 Jul 2025 10:21:22 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Manos Pitsidianakis , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Paolo Bonzini , Thomas Huth , qemu-arm@nongnu.org, qemu-s390x@nongnu.org, Pierrick Bouvier , "Michael S. Tsirkin" , qemu-riscv@nongnu.org, Richard Henderson , qemu-block@nongnu.org, qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH-for-10.1 v7 3/8] qemu/target-info: Add %target_arch field to TargetInfo Date: Tue, 8 Jul 2025 19:19:43 +0200 Message-ID: <20250708171949.62500-4-philmd@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250708171949.62500-1-philmd@linaro.org> References: <20250708171949.62500-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::536; envelope-from=philmd@linaro.org; helo=mail-ed1-x536.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1752007635739116600 Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier --- include/qemu/target-info-impl.h | 4 +++- target-info-stub.c | 1 + target-info.c | 9 +++++++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/include/qemu/target-info-impl.h b/include/qemu/target-info-imp= l.h index 1b51cbcfe1b..a8b34d150ab 100644 --- a/include/qemu/target-info-impl.h +++ b/include/qemu/target-info-impl.h @@ -9,11 +9,13 @@ #ifndef QEMU_TARGET_INFO_IMPL_H #define QEMU_TARGET_INFO_IMPL_H =20 -#include "qemu/target-info.h" +#include "qapi/qapi-types-machine.h" =20 typedef struct TargetInfo { /* runtime equivalent of TARGET_NAME definition */ const char *target_name; + /* related to TARGET_ARCH definition */ + SysEmuTarget target_arch; /* runtime equivalent of TARGET_LONG_BITS definition */ unsigned long_bits; /* runtime equivalent of CPU_RESOLVING_TYPE definition */ diff --git a/target-info-stub.c b/target-info-stub.c index fecc0e71286..2e4407ff04b 100644 --- a/target-info-stub.c +++ b/target-info-stub.c @@ -14,6 +14,7 @@ =20 static const TargetInfo target_info_stub =3D { .target_name =3D TARGET_NAME, + .target_arch =3D SYS_EMU_TARGET__MAX, .long_bits =3D TARGET_LONG_BITS, .cpu_type =3D CPU_RESOLVING_TYPE, .machine_typename =3D TYPE_MACHINE, diff --git a/target-info.c b/target-info.c index 9ebabec988f..8e29553b4ef 100644 --- a/target-info.c +++ b/target-info.c @@ -24,8 +24,13 @@ unsigned target_long_bits(void) =20 SysEmuTarget target_arch(void) { - return qapi_enum_parse(&SysEmuTarget_lookup, target_name(), -1, - &error_abort); + SysEmuTarget arch =3D target_info()->target_arch; + + if (arch =3D=3D SYS_EMU_TARGET__MAX) { + arch =3D qapi_enum_parse(&SysEmuTarget_lookup, target_name(), -1, + &error_abort); + } + return arch; } =20 const char *target_cpu_type(void) --=20 2.49.0