From nobody Thu May 28 00:44:24 2026 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=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1777581587; cv=none; d=zohomail.com; s=zohoarc; b=LigFWc3OMBHKR4Zc3ok62mye35FYOM/OJI3EvPXNZkbidf0QS2LjFFd1i+SPJ1Wlc7LK7fFPHfzi2fHZdafv0iIHycUS/+nZMssoQZhz50Pcwd+krWwtqSSlBOeh/rxq7nsIx3Kwji0LcIh5XG5e/sweJXkNgeWYJ9vtsxDEKcU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1777581587; 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=ONXkN3ifjbZ/ePm7DoxSplyChWIv5V/mKaE+92h7psE=; b=ACgKKHFZfnaxCZd9HEOWPXN96OlMhlTuOBej+c/AlGchOaR3A/rGH+rrBNwhfJV7I5jWiHrcq3g4MkreP30D98tH7PqfDAFhb5478exFsacuzuAN6eq/UrX1RZ58D9WesAwmxuStMIwSm6YONM0RoRpVDKTG4fBmvGCgqVp0JkU= 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=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1777581587573180.87075336379814; Thu, 30 Apr 2026 13:39:47 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wIYA7-0002uJ-VR; Thu, 30 Apr 2026 16:39:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wIYA3-0002oW-E6 for qemu-devel@nongnu.org; Thu, 30 Apr 2026 16:39:04 -0400 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wIY9v-0000st-Ci for qemu-devel@nongnu.org; Thu, 30 Apr 2026 16:39:01 -0400 Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 63UGIUTQ2121543 for ; Thu, 30 Apr 2026 20:38:52 GMT Received: from mail-dy1-f198.google.com (mail-dy1-f198.google.com [74.125.82.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dvag4s6wb-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 30 Apr 2026 20:38:51 +0000 (GMT) Received: by mail-dy1-f198.google.com with SMTP id 5a478bee46e88-2ee34588671so599157eec.0 for ; Thu, 30 Apr 2026 13:38:51 -0700 (PDT) Received: from hu-pbouvier-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2ee3889d628sm2202341eec.6.2026.04.30.13.38.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Apr 2026 13:38:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= ONXkN3ifjbZ/ePm7DoxSplyChWIv5V/mKaE+92h7psE=; b=W9BUoXXDCm/Kff3p xz+lY+DcdUXaDl7epE3vLkjVemFoob4g3NG7RSnAVjigkSE0AcyBa7eFHTnBmsUH sCRhMbafdgzBr3DLOcvg+UPDlUYRstrgXO8Shc6oXObobqfdJ9cyzINe0+1DOQs1 ckjSG69M5ol3QTtWTbSiVoqa0y45CcaQwuvogiFL+gWHZbv6O0g/oopRwXjpvWlq wpqcBrCJwM1AeOHLjNlJWV78dXhDLB7jr1bguzXrjMJbKcq9kD0QGUhgHwPmnVTP +hVWBjxPG9tGIdeRisgYTNt2qr7cfNjNW0hJyRzLY1lmFh8sxboXddMafED0hThv IsRFLA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1777581531; x=1778186331; 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=ONXkN3ifjbZ/ePm7DoxSplyChWIv5V/mKaE+92h7psE=; b=ORLntglVrt2E59WGqAEw2gpwCXUW8xoHGgzHUvZmSiIfj2GhKH4S1SvFjKZX7h0rLr 5kJmZSV90rNdMqyaHzcLNfIutTsnHIWEz4HYbVE2PWb7jmv4cPaxT/O2sJp0N7KtzXmJ eQgMDpyy4UzTuv2ZuD/16KeKmVwM8Bs5LdKPFC9J8qQmy8I3xi7f3pRAsc6ie1R885/t dmRPyIQD2n1gxBTC7lgSZGtY9VN6AgS7GR3awp8QQBGOFd2x2dA2uvKlKPUu7yPrCA6N T+Io0nAVRW5acEK9vpcSF5BB5wBcorqnBLWroyulaRGdBUo7TI3UkYisTVvaswcs73ua Eqkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777581531; x=1778186331; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=ONXkN3ifjbZ/ePm7DoxSplyChWIv5V/mKaE+92h7psE=; b=D7HRc00pO//RQFQrLVlMRUR4Tv4rnNmLG5/p2CrrMnmj7sQI/CjS8yP/8PsLYsmep1 gmHpb0tFkO6CllYNIjptDcfReoc8RScjPWqa3Q8OIv7QnQclH6BReU3YplZS/n2wVYJ1 dE298C4QLRqBKVajvGiygVvbCkH2tbHqN7iqlCS0Ll12XK57GzgnZhxEFxBa5zSWZonV N8sGXhuzAXK3v6gn3DIoX7niU004YjEblH+wfPaDQmm8tFNToTTJ8AcNX3VKb+VyE5hu x8+AnqQysVBDmw5rmylhJ8AositnlvgTtG56Q+TvYW1Rdsbuj42EykYFAdQ/6CAfp78f kX6g== X-Gm-Message-State: AOJu0YzNLQ4dH6fDtlqdbMY4POTIXazzN7KIammZFLUgZishI5ZTkS7G Vd35f9i/0I62Qk5mMf8CRGQU1ARXPf8qmVHxMnVnvigULHPQ1IwsRal1Y8a4I3M6T6/ciy8x9yi Ky5FjBp6updwK33n4rKAE8NSSPsmO4PbXhxtCNbaipg5EbJV9FF1YzVpOU1VQVKx2maLn X-Gm-Gg: AeBDieuRXgjbt0bTxvOy6rJvTKJtlg6hplZkxxTDvGQP7wbtMd0/4O1zK1rbx7BopMr KRizqE1OZJ96GqhOjGc3Gph4s2iJAatS+9wC9EbCcX61J5wy6H5BhQlxnSgaQtHCW/i2i244A1D yctfCJtF6mT64NP2y+tgq2/j4Ltl2uwjD34t3T73XOcqLdyoSYpRo/waqFxDiKZN02jEzAaO59+ 4Mnes0Eide2vL5pfq4PZNPEdCoguc21EFV0Fpby7puAqzMsrGc9BHKHcO4WKGdYDL8S8I9hgIm+ bAU4j3edMgHx4Up7ZRii/aiBi6PjF7F3SUY8NBRxbt1eW4Ou4gq/ZqbNGsPRAqGRBp52Q66bgKx c19wfcWgHnYJLLgMVk9l+0K4FkW0bdvTjQqOtAotB9SxGcGbwqIlqXYfA9nvHcKBfUmelCkIVsO Xp5XMOStBJr7e6ujE8 X-Received: by 2002:a05:7301:e0c6:b0:2ed:b131:240e with SMTP id 5a478bee46e88-2edb13124d5mr964212eec.23.1777581530856; Thu, 30 Apr 2026 13:38:50 -0700 (PDT) X-Received: by 2002:a05:7301:e0c6:b0:2ed:b131:240e with SMTP id 5a478bee46e88-2edb13124d5mr964196eec.23.1777581530191; Thu, 30 Apr 2026 13:38:50 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , marcandre.lureau@redhat.com, Markus Armbruster , Pierrick Bouvier , Paolo Bonzini , Anton Johansson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Max Filippov , Richard Henderson Subject: [PATCH v3 1/8] qemu/module: add a new QOM_EARLY init step Date: Thu, 30 Apr 2026 13:38:35 -0700 Message-ID: <20260430203842.29156-2-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260430203842.29156-1-pierrick.bouvier@oss.qualcomm.com> References: <20260430203842.29156-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: h7ckFA70UG8DUrsYaseGT2eaIhqKBjna X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDMwMDIxMyBTYWx0ZWRfX6a7m4OEoGrMr FkiocFyAXPMi6KODYiWxnEUi6kmyiO7weDVy4oAJRtDL0JPS2VbpUL3y76SpRbN5+cNOTjSDDJy lIZCl8pRomGVzYTYGiZJFvizL7qHsBVBX1OidYfkUSihZYcnt9aK9Z3ZhPnAdCqX63BknH9LRYQ lijN6EkRhEmB8P4wxFv3hHNbcmeRju6i//OFWosEWLYy3+Fr7FspN9C8ZLG9u1+BCRcCSMnpXYS dldXtK8NtrcIWU2ZVVP9raVH2XSEx+1kL/Evdqk36fsGZDFiIDFOGfzawktoTpqI7Q4nmTUxVlM DyoI90RItafUnhLsgtD8bPvUCMJu/yj/eaBLf/Wi1L313gOc7eeYYTHsRnvUlpXp58r0F2x+p50 naOfXvw+We8J8/oXSBiJWzxXc2Z3YXLsQjELgpKeusM63wX9ENlEglE5W71pDJ29jSOIAGrOMog iv5Xi+O3dLB7A599V/Q== X-Authority-Analysis: v=2.4 cv=UcxhjqSN c=1 sm=1 tr=0 ts=69f3bddc cx=c_pps a=wEP8DlPgTf/vqF+yE6f9lg==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=DJpcGTmdVt4CTyJn9g5Z:22 a=20KFwNOVAAAA:8 a=EUspDBNiAAAA:8 a=IYgryfmtWe4h1XmuO8sA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=bBxd6f-gb0O0v-kibOvt:22 X-Proofpoint-ORIG-GUID: h7ckFA70UG8DUrsYaseGT2eaIhqKBjna X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-04-30_06,2026-04-30_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 bulkscore=0 clxscore=1015 lowpriorityscore=0 malwarescore=0 impostorscore=0 adultscore=0 spamscore=0 phishscore=0 priorityscore=1501 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2604300213 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=pierrick.bouvier@oss.qualcomm.com; helo=mx0a-0031df01.pphosted.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, SPF_HELO_NONE=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: qemu development 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 @qualcomm.com) X-ZM-MESSAGEID: 1777581590949158500 This step will be used to initialize fundamental QOM types, like OBJECT, INTERFACE or TARGET_INFO that will be introduced in this series. It may be used in the future if needed. We need to patch all call sites to module_init(MODULE_INIT_QOM) to call module_init(MODULE_INIT_QOM_EARLY) as well. Suggested-by: Daniel P. Berrang=C3=A9 Signed-off-by: Pierrick Bouvier --- bsd-user/main.c | 1 + include/qemu/module.h | 2 ++ linux-user/main.c | 1 + qemu-img.c | 1 + qemu-io.c | 1 + qemu-nbd.c | 1 + rust/hw/core/tests/tests.rs | 1 + scsi/qemu-pr-helper.c | 1 + storage-daemon/qemu-storage-daemon.c | 1 + system/runstate.c | 1 + tests/audio/test-audio.c | 1 + tests/qtest/bios-tables-test.c | 1 + tests/qtest/fuzz/fuzz.c | 1 + tests/qtest/migration-test.c | 1 + tests/qtest/qos-test.c | 1 + tests/qtest/tpm-crb-swtpm-test.c | 1 + tests/qtest/tpm-crb-test.c | 1 + tests/qtest/tpm-tis-device-swtpm-test.c | 1 + tests/qtest/tpm-tis-device-test.c | 1 + tests/qtest/tpm-tis-i2c-test.c | 1 + tests/qtest/tpm-tis-swtpm-test.c | 1 + tests/qtest/tpm-tis-test.c | 1 + tests/unit/check-qom-interface.c | 1 + tests/unit/check-qom-proplist.c | 1 + tests/unit/test-authz-list.c | 1 + tests/unit/test-authz-listfile.c | 1 + tests/unit/test-authz-pam.c | 1 + tests/unit/test-authz-simple.c | 1 + tests/unit/test-char.c | 1 + tests/unit/test-crypto-block.c | 1 + tests/unit/test-crypto-secret.c | 1 + tests/unit/test-crypto-tlscredsx509.c | 1 + tests/unit/test-crypto-tlssession.c | 1 + tests/unit/test-io-channel-buffer.c | 1 + tests/unit/test-io-channel-command.c | 1 + tests/unit/test-io-channel-file.c | 1 + tests/unit/test-io-channel-null.c | 1 + tests/unit/test-io-channel-socket.c | 1 + tests/unit/test-io-channel-tls.c | 1 + tests/unit/test-io-task.c | 1 + tests/unit/test-qdev-global-props.c | 1 + tests/unit/test-qdev.c | 1 + tests/unit/test-smp-parse.c | 1 + tests/unit/test-throttle.c | 1 + tests/unit/test-vmstate.c | 1 + tests/unit/test-xs-node.c | 1 + tests/unit/test-yank.c | 1 + tools/i386/qemu-vmsr-helper.c | 1 + 48 files changed, 49 insertions(+) diff --git a/bsd-user/main.c b/bsd-user/main.c index 73aae8c3274..a6e7a285af7 100644 --- a/bsd-user/main.c +++ b/bsd-user/main.c @@ -285,6 +285,7 @@ int main(int argc, char **argv) error_init(argv[0]); module_call_init(MODULE_INIT_TRACE); qemu_init_cpu_list(); + module_call_init(MODULE_INIT_QOM_EARLY); module_call_init(MODULE_INIT_QOM); =20 envlist =3D envlist_create(); diff --git a/include/qemu/module.h b/include/qemu/module.h index 9885ac9afb3..37b63cd2b03 100644 --- a/include/qemu/module.h +++ b/include/qemu/module.h @@ -43,6 +43,7 @@ typedef enum { MODULE_INIT_MIGRATION, MODULE_INIT_BLOCK, MODULE_INIT_OPTS, + MODULE_INIT_QOM_EARLY, MODULE_INIT_QOM, MODULE_INIT_TRACE, MODULE_INIT_XEN_BACKEND, @@ -54,6 +55,7 @@ typedef enum { #define block_init(function) module_init(function, MODULE_INIT_BLOCK) #define opts_init(function) module_init(function, MODULE_INIT_OPTS) #define type_init(function) module_init(function, MODULE_INIT_QOM) +#define type_init_early(function) module_init(function, MODULE_INIT_QOM_EA= RLY) #define trace_init(function) module_init(function, MODULE_INIT_TRACE) #define xen_backend_init(function) module_init(function, \ MODULE_INIT_XEN_BACKEND) diff --git a/linux-user/main.c b/linux-user/main.c index 86d04cca3c4..629a6b64cf1 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -702,6 +702,7 @@ int main(int argc, char **argv, char **envp) error_init(argv[0]); module_call_init(MODULE_INIT_TRACE); qemu_init_cpu_list(); + module_call_init(MODULE_INIT_QOM_EARLY); module_call_init(MODULE_INIT_QOM); =20 envlist =3D envlist_create(); diff --git a/qemu-img.c b/qemu-img.c index c42dd4e995e..096dd318963 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -5931,6 +5931,7 @@ int main(int argc, char **argv) =20 qcrypto_init(&error_fatal); =20 + module_call_init(MODULE_INIT_QOM_EARLY); module_call_init(MODULE_INIT_QOM); bdrv_init(); =20 diff --git a/qemu-io.c b/qemu-io.c index 8f2de83f3c8..d0db7df2ad7 100644 --- a/qemu-io.c +++ b/qemu-io.c @@ -537,6 +537,7 @@ int main(int argc, char **argv) =20 qcrypto_init(&error_fatal); =20 + module_call_init(MODULE_INIT_QOM_EARLY); module_call_init(MODULE_INIT_QOM); qemu_add_opts(&qemu_trace_opts); bdrv_init(); diff --git a/qemu-nbd.c b/qemu-nbd.c index ed5895861bb..f9fe220b176 100644 --- a/qemu-nbd.c +++ b/qemu-nbd.c @@ -629,6 +629,7 @@ int main(int argc, char **argv) module_call_init(MODULE_INIT_TRACE); qcrypto_init(&error_fatal); =20 + module_call_init(MODULE_INIT_QOM_EARLY); module_call_init(MODULE_INIT_QOM); qemu_add_opts(&qemu_trace_opts); qemu_init_exec_dir(argv[0]); diff --git a/rust/hw/core/tests/tests.rs b/rust/hw/core/tests/tests.rs index 05aa5d4a377..08597ca46b7 100644 --- a/rust/hw/core/tests/tests.rs +++ b/rust/hw/core/tests/tests.rs @@ -91,6 +91,7 @@ fn init_qom() { bql::start_test(); if !ONCE.get() { unsafe { + module_call_init(module_init_type::MODULE_INIT_QOM_EARLY); module_call_init(module_init_type::MODULE_INIT_QOM); } ONCE.set(true); diff --git a/scsi/qemu-pr-helper.c b/scsi/qemu-pr-helper.c index 9dcd3ec7111..089b95842c9 100644 --- a/scsi/qemu-pr-helper.c +++ b/scsi/qemu-pr-helper.c @@ -907,6 +907,7 @@ int main(int argc, char **argv) =20 error_init(argv[0]); module_call_init(MODULE_INIT_TRACE); + module_call_init(MODULE_INIT_QOM_EARLY); module_call_init(MODULE_INIT_QOM); qemu_add_opts(&qemu_trace_opts); qemu_init_exec_dir(argv[0]); diff --git a/storage-daemon/qemu-storage-daemon.c b/storage-daemon/qemu-sto= rage-daemon.c index eb725613582..8ede324fd89 100644 --- a/storage-daemon/qemu-storage-daemon.c +++ b/storage-daemon/qemu-storage-daemon.c @@ -406,6 +406,7 @@ int main(int argc, char *argv[]) =20 os_daemonize(); =20 + module_call_init(MODULE_INIT_QOM_EARLY); module_call_init(MODULE_INIT_QOM); module_call_init(MODULE_INIT_TRACE); qemu_add_opts(&qemu_trace_opts); diff --git a/system/runstate.c b/system/runstate.c index 770253b467b..43d60bafedf 100644 --- a/system/runstate.c +++ b/system/runstate.c @@ -981,6 +981,7 @@ void qemu_init_subsystems(void) =20 atexit(qemu_run_exit_notifiers); =20 + module_call_init(MODULE_INIT_QOM_EARLY); module_call_init(MODULE_INIT_QOM); module_call_init(MODULE_INIT_MIGRATION); =20 diff --git a/tests/audio/test-audio.c b/tests/audio/test-audio.c index af8cf03d10e..8962cc6be45 100644 --- a/tests/audio/test-audio.c +++ b/tests/audio/test-audio.c @@ -584,6 +584,7 @@ int main(int argc, char **argv) dir =3D g_test_build_filename(G_TEST_BUILT, "..", "..", NULL); g_setenv("QEMU_MODULE_DIR", dir, true); qemu_init_exec_dir(argv[0]); + module_call_init(MODULE_INIT_QOM_EARLY); module_call_init(MODULE_INIT_QOM); module_init_info(qemu_modinfo); =20 diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 510751799e4..460ddf18589 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -1527,6 +1527,7 @@ static void test_acpi_tcg_tpm(const char *machine, co= nst char *arch, =20 tpm_tis_base_addr =3D base; =20 + module_call_init(MODULE_INIT_QOM_EARLY); module_call_init(MODULE_INIT_QOM); =20 test.addr =3D g_new0(SocketAddress, 1); diff --git a/tests/qtest/fuzz/fuzz.c b/tests/qtest/fuzz/fuzz.c index ca248a51a6c..031b3173a36 100644 --- a/tests/qtest/fuzz/fuzz.c +++ b/tests/qtest/fuzz/fuzz.c @@ -172,6 +172,7 @@ int LLVMFuzzerInitialize(int *argc, char ***argv, char = ***envp) /* Initialize qgraph and modules */ qos_graph_init(); module_call_init(MODULE_INIT_FUZZ_TARGET); + module_call_init(MODULE_INIT_QOM_EARLY); module_call_init(MODULE_INIT_QOM); module_call_init(MODULE_INIT_LIBQOS); =20 diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index e582f05c7dc..f69e679895a 100644 --- a/tests/qtest/migration-test.c +++ b/tests/qtest/migration-test.c @@ -46,6 +46,7 @@ int main(int argc, char **argv) g_test_init(&argc, &argv, NULL); env =3D migration_get_env(); env->full_set =3D full_set; + module_call_init(MODULE_INIT_QOM_EARLY); module_call_init(MODULE_INIT_QOM); =20 migration_test_add_tls(env); diff --git a/tests/qtest/qos-test.c b/tests/qtest/qos-test.c index 50fa0ceef36..c4bc2408cb2 100644 --- a/tests/qtest/qos-test.c +++ b/tests/qtest/qos-test.c @@ -343,6 +343,7 @@ int main(int argc, char **argv, char** envp) qos_printf("}\n"); } qos_graph_init(); + module_call_init(MODULE_INIT_QOM_EARLY); module_call_init(MODULE_INIT_QOM); module_call_init(MODULE_INIT_LIBQOS); qos_set_machines_devices_available(); diff --git a/tests/qtest/tpm-crb-swtpm-test.c b/tests/qtest/tpm-crb-swtpm-t= est.c index ffeb1c396b8..297182a73bb 100644 --- a/tests/qtest/tpm-crb-swtpm-test.c +++ b/tests/qtest/tpm-crb-swtpm-test.c @@ -50,6 +50,7 @@ int main(int argc, char **argv) ts.dst_tpm_path =3D g_dir_make_tmp("qemu-tpm-crb-swtpm-test.XXXXXX", N= ULL); ts.uri =3D g_strdup_printf("unix:%s/migsocket", ts.src_tpm_path); =20 + module_call_init(MODULE_INIT_QOM_EARLY); module_call_init(MODULE_INIT_QOM); g_test_init(&argc, &argv, NULL); =20 diff --git a/tests/qtest/tpm-crb-test.c b/tests/qtest/tpm-crb-test.c index 396ae3f91c1..08d58b613eb 100644 --- a/tests/qtest/tpm-crb-test.c +++ b/tests/qtest/tpm-crb-test.c @@ -144,6 +144,7 @@ int main(int argc, char **argv) GThread *thread; TPMTestState test; =20 + module_call_init(MODULE_INIT_QOM_EARLY); module_call_init(MODULE_INIT_QOM); g_test_init(&argc, &argv, NULL); =20 diff --git a/tests/qtest/tpm-tis-device-swtpm-test.c b/tests/qtest/tpm-tis-= device-swtpm-test.c index 517a0770055..ad2660210f9 100644 --- a/tests/qtest/tpm-tis-device-swtpm-test.c +++ b/tests/qtest/tpm-tis-device-swtpm-test.c @@ -58,6 +58,7 @@ int main(int argc, char **argv) NULL); ts.uri =3D g_strdup_printf("unix:%s/migsocket", ts.src_tpm_path); =20 + module_call_init(MODULE_INIT_QOM_EARLY); module_call_init(MODULE_INIT_QOM); g_test_init(&argc, &argv, NULL); =20 diff --git a/tests/qtest/tpm-tis-device-test.c b/tests/qtest/tpm-tis-device= -test.c index 3ddefb51ecf..be0f2e3df03 100644 --- a/tests/qtest/tpm-tis-device-test.c +++ b/tests/qtest/tpm-tis-device-test.c @@ -37,6 +37,7 @@ int main(int argc, char **argv) char *args; int ret; =20 + module_call_init(MODULE_INIT_QOM_EARLY); module_call_init(MODULE_INIT_QOM); g_test_init(&argc, &argv, NULL); =20 diff --git a/tests/qtest/tpm-tis-i2c-test.c b/tests/qtest/tpm-tis-i2c-test.c index 3a1af026f2e..c23fdefd4a3 100644 --- a/tests/qtest/tpm-tis-i2c-test.c +++ b/tests/qtest/tpm-tis-i2c-test.c @@ -605,6 +605,7 @@ int main(int argc, char **argv) GThread *thread; TPMTestState test; =20 + module_call_init(MODULE_INIT_QOM_EARLY); module_call_init(MODULE_INIT_QOM); g_test_init(&argc, &argv, NULL); =20 diff --git a/tests/qtest/tpm-tis-swtpm-test.c b/tests/qtest/tpm-tis-swtpm-t= est.c index 105e42e21d6..30a07fa1adc 100644 --- a/tests/qtest/tpm-tis-swtpm-test.c +++ b/tests/qtest/tpm-tis-swtpm-test.c @@ -53,6 +53,7 @@ int main(int argc, char **argv) ts.dst_tpm_path =3D g_dir_make_tmp("qemu-tpm-tis-swtpm-test.XXXXXX", N= ULL); ts.uri =3D g_strdup_printf("unix:%s/migsocket", ts.src_tpm_path); =20 + module_call_init(MODULE_INIT_QOM_EARLY); module_call_init(MODULE_INIT_QOM); g_test_init(&argc, &argv, NULL); =20 diff --git a/tests/qtest/tpm-tis-test.c b/tests/qtest/tpm-tis-test.c index a4a25ba7452..7ea2bafc045 100644 --- a/tests/qtest/tpm-tis-test.c +++ b/tests/qtest/tpm-tis-test.c @@ -31,6 +31,7 @@ int main(int argc, char **argv) GThread *thread; TPMTestState test; =20 + module_call_init(MODULE_INIT_QOM_EARLY); module_call_init(MODULE_INIT_QOM); g_test_init(&argc, &argv, NULL); =20 diff --git a/tests/unit/check-qom-interface.c b/tests/unit/check-qom-interf= ace.c index 86ae5f6c3b1..c02acfc7b27 100644 --- a/tests/unit/check-qom-interface.c +++ b/tests/unit/check-qom-interface.c @@ -90,6 +90,7 @@ int main(int argc, char **argv) { g_test_init(&argc, &argv, NULL); =20 + module_call_init(MODULE_INIT_QOM_EARLY); module_call_init(MODULE_INIT_QOM); type_register_static(&test_if_info); type_register_static(&direct_impl_info); diff --git a/tests/unit/check-qom-proplist.c b/tests/unit/check-qom-proplis= t.c index ee3c6fb32b1..d8e5cd97091 100644 --- a/tests/unit/check-qom-proplist.c +++ b/tests/unit/check-qom-proplist.c @@ -652,6 +652,7 @@ int main(int argc, char **argv) { g_test_init(&argc, &argv, NULL); =20 + module_call_init(MODULE_INIT_QOM_EARLY); module_call_init(MODULE_INIT_QOM); type_register_static(&dummy_info); type_register_static(&dummy_dev_info); diff --git a/tests/unit/test-authz-list.c b/tests/unit/test-authz-list.c index 5351992a013..1f7754f1024 100644 --- a/tests/unit/test-authz-list.c +++ b/tests/unit/test-authz-list.c @@ -147,6 +147,7 @@ int main(int argc, char **argv) { g_test_init(&argc, &argv, NULL); =20 + module_call_init(MODULE_INIT_QOM_EARLY); module_call_init(MODULE_INIT_QOM); =20 g_test_add_func("/auth/list/default/deny", test_authz_default_deny); diff --git a/tests/unit/test-authz-listfile.c b/tests/unit/test-authz-listf= ile.c index 64d0e1500f7..b8d39645362 100644 --- a/tests/unit/test-authz-listfile.c +++ b/tests/unit/test-authz-listfile.c @@ -170,6 +170,7 @@ int main(int argc, char **argv) =20 g_test_init(&argc, &argv, NULL); =20 + module_call_init(MODULE_INIT_QOM_EARLY); module_call_init(MODULE_INIT_QOM); =20 workdir =3D g_dir_make_tmp("qemu-test-authz-listfile-XXXXXX", diff --git a/tests/unit/test-authz-pam.c b/tests/unit/test-authz-pam.c index 4fe1ef2603e..d23f3fb0871 100644 --- a/tests/unit/test-authz-pam.c +++ b/tests/unit/test-authz-pam.c @@ -123,6 +123,7 @@ int main(int argc, char **argv) { g_test_init(&argc, &argv, NULL); =20 + module_call_init(MODULE_INIT_QOM_EARLY); module_call_init(MODULE_INIT_QOM); =20 g_test_add_func("/auth/pam/unknown-service", test_authz_unknown_servic= e); diff --git a/tests/unit/test-authz-simple.c b/tests/unit/test-authz-simple.c index 6f9034d8ff2..a6c038220ae 100644 --- a/tests/unit/test-authz-simple.c +++ b/tests/unit/test-authz-simple.c @@ -43,6 +43,7 @@ static void test_authz_simple(void) int main(int argc, char **argv) { g_test_init(&argc, &argv, NULL); + module_call_init(MODULE_INIT_QOM_EARLY); module_call_init(MODULE_INIT_QOM); =20 g_test_add_func("/authz/simple", test_authz_simple); diff --git a/tests/unit/test-char.c b/tests/unit/test-char.c index b88b557133a..0686d917434 100644 --- a/tests/unit/test-char.c +++ b/tests/unit/test-char.c @@ -1898,6 +1898,7 @@ int main(int argc, char **argv) goto end; } =20 + module_call_init(MODULE_INIT_QOM_EARLY); module_call_init(MODULE_INIT_QOM); qemu_add_opts(&qemu_chardev_opts); =20 diff --git a/tests/unit/test-crypto-block.c b/tests/unit/test-crypto-block.c index 218e585f988..5197e6c122a 100644 --- a/tests/unit/test-crypto-block.c +++ b/tests/unit/test-crypto-block.c @@ -565,6 +565,7 @@ int main(int argc, char **argv) { gsize i; =20 + module_call_init(MODULE_INIT_QOM_EARLY); module_call_init(MODULE_INIT_QOM); g_test_init(&argc, &argv, NULL); =20 diff --git a/tests/unit/test-crypto-secret.c b/tests/unit/test-crypto-secre= t.c index fc32a01747b..ee2b7bd3469 100644 --- a/tests/unit/test-crypto-secret.c +++ b/tests/unit/test-crypto-secret.c @@ -558,6 +558,7 @@ static void test_secret_crypt_bad_iv(void) =20 int main(int argc, char **argv) { + module_call_init(MODULE_INIT_QOM_EARLY); module_call_init(MODULE_INIT_QOM); g_test_init(&argc, &argv, NULL); =20 diff --git a/tests/unit/test-crypto-tlscredsx509.c b/tests/unit/test-crypto= -tlscredsx509.c index b1ad7d5c0d8..c83e2ef82d2 100644 --- a/tests/unit/test-crypto-tlscredsx509.c +++ b/tests/unit/test-crypto-tlscredsx509.c @@ -140,6 +140,7 @@ int main(int argc, char **argv) { int ret; =20 + module_call_init(MODULE_INIT_QOM_EARLY); module_call_init(MODULE_INIT_QOM); g_test_init(&argc, &argv, NULL); g_setenv("GNUTLS_FORCE_FIPS_MODE", "2", 1); diff --git a/tests/unit/test-crypto-tlssession.c b/tests/unit/test-crypto-t= lssession.c index 0d06a6892eb..f9e23ace76c 100644 --- a/tests/unit/test-crypto-tlssession.c +++ b/tests/unit/test-crypto-tlssession.c @@ -412,6 +412,7 @@ int main(int argc, char **argv) { int ret; =20 + module_call_init(MODULE_INIT_QOM_EARLY); module_call_init(MODULE_INIT_QOM); g_test_init(&argc, &argv, NULL); g_setenv("GNUTLS_FORCE_FIPS_MODE", "2", 1); diff --git a/tests/unit/test-io-channel-buffer.c b/tests/unit/test-io-chann= el-buffer.c index 9c6724dea41..45f9528d8d3 100644 --- a/tests/unit/test-io-channel-buffer.c +++ b/tests/unit/test-io-channel-buffer.c @@ -43,6 +43,7 @@ static void test_io_channel_buf(void) =20 int main(int argc, char **argv) { + module_call_init(MODULE_INIT_QOM_EARLY); module_call_init(MODULE_INIT_QOM); =20 g_test_init(&argc, &argv, NULL); diff --git a/tests/unit/test-io-channel-command.c b/tests/unit/test-io-chan= nel-command.c index 964418b5cd9..a5d6becff73 100644 --- a/tests/unit/test-io-channel-command.c +++ b/tests/unit/test-io-channel-command.c @@ -124,6 +124,7 @@ static void test_io_channel_command_echo_sync(void) =20 int main(int argc, char **argv) { + module_call_init(MODULE_INIT_QOM_EARLY); module_call_init(MODULE_INIT_QOM); =20 g_test_init(&argc, &argv, NULL); diff --git a/tests/unit/test-io-channel-file.c b/tests/unit/test-io-channel= -file.c index b597350dca3..41b45e23f9b 100644 --- a/tests/unit/test-io-channel-file.c +++ b/tests/unit/test-io-channel-file.c @@ -337,6 +337,7 @@ static void test_io_channel_pipe_sync(void) =20 int main(int argc, char **argv) { + module_call_init(MODULE_INIT_QOM_EARLY); module_call_init(MODULE_INIT_QOM); =20 g_test_init(&argc, &argv, NULL); diff --git a/tests/unit/test-io-channel-null.c b/tests/unit/test-io-channel= -null.c index b3aab17ccce..d27a389a061 100644 --- a/tests/unit/test-io-channel-null.c +++ b/tests/unit/test-io-channel-null.c @@ -85,6 +85,7 @@ static void test_io_channel_null_io(void) =20 int main(int argc, char **argv) { + module_call_init(MODULE_INIT_QOM_EARLY); module_call_init(MODULE_INIT_QOM); =20 g_test_init(&argc, &argv, NULL); diff --git a/tests/unit/test-io-channel-socket.c b/tests/unit/test-io-chann= el-socket.c index dc7be96e9cd..fd9162aac41 100644 --- a/tests/unit/test-io-channel-socket.c +++ b/tests/unit/test-io-channel-socket.c @@ -566,6 +566,7 @@ int main(int argc, char **argv) { bool has_ipv4, has_ipv6, has_afunix; =20 + module_call_init(MODULE_INIT_QOM_EARLY); module_call_init(MODULE_INIT_QOM); qemu_init_main_loop(&error_abort); socket_init(); diff --git a/tests/unit/test-io-channel-tls.c b/tests/unit/test-io-channel-= tls.c index 4e4034af67b..661fdbf7434 100644 --- a/tests/unit/test-io-channel-tls.c +++ b/tests/unit/test-io-channel-tls.c @@ -269,6 +269,7 @@ int main(int argc, char **argv) =20 g_assert(qcrypto_init(NULL) =3D=3D 0); =20 + module_call_init(MODULE_INIT_QOM_EARLY); module_call_init(MODULE_INIT_QOM); g_test_init(&argc, &argv, NULL); g_setenv("GNUTLS_FORCE_FIPS_MODE", "2", 1); diff --git a/tests/unit/test-io-task.c b/tests/unit/test-io-task.c index b1c8ecb7abb..60e09ef14b0 100644 --- a/tests/unit/test-io-task.c +++ b/tests/unit/test-io-task.c @@ -282,6 +282,7 @@ static void test_task_thread_failure(void) int main(int argc, char **argv) { g_test_init(&argc, &argv, NULL); + module_call_init(MODULE_INIT_QOM_EARLY); module_call_init(MODULE_INIT_QOM); type_register_static(&dummy_info); g_test_add_func("/crypto/task/complete", test_task_complete); diff --git a/tests/unit/test-qdev-global-props.c b/tests/unit/test-qdev-glo= bal-props.c index 8ea362cbb90..79d13f0139c 100644 --- a/tests/unit/test-qdev-global-props.c +++ b/tests/unit/test-qdev-global-props.c @@ -306,6 +306,7 @@ int main(int argc, char **argv) { g_test_init(&argc, &argv, NULL); =20 + module_call_init(MODULE_INIT_QOM_EARLY); module_call_init(MODULE_INIT_QOM); type_register_static(&static_prop_type); type_register_static(&subclass_type); diff --git a/tests/unit/test-qdev.c b/tests/unit/test-qdev.c index 20eae38e03f..61c6a9ba08a 100644 --- a/tests/unit/test-qdev.c +++ b/tests/unit/test-qdev.c @@ -83,6 +83,7 @@ int main(int argc, char **argv) { g_test_init(&argc, &argv, NULL); =20 + module_call_init(MODULE_INIT_QOM_EARLY); module_call_init(MODULE_INIT_QOM); type_register_static(&my_dev_type_info); test_init_machine(); diff --git a/tests/unit/test-smp-parse.c b/tests/unit/test-smp-parse.c index 1b6450e7d8f..412b151865a 100644 --- a/tests/unit/test-smp-parse.c +++ b/tests/unit/test-smp-parse.c @@ -1566,6 +1566,7 @@ DEFINE_TYPES(smp_machine_types) =20 int main(int argc, char *argv[]) { + module_call_init(MODULE_INIT_QOM_EARLY); module_call_init(MODULE_INIT_QOM); =20 g_test_init(&argc, &argv, NULL); diff --git a/tests/unit/test-throttle.c b/tests/unit/test-throttle.c index 52eb8966b3f..a6931fed19a 100644 --- a/tests/unit/test-throttle.c +++ b/tests/unit/test-throttle.c @@ -806,6 +806,7 @@ int main(int argc, char **argv) qemu_init_main_loop(&error_fatal); ctx =3D qemu_get_aio_context(); bdrv_init(); + module_call_init(MODULE_INIT_QOM_EARLY); module_call_init(MODULE_INIT_QOM); =20 do {} while (g_main_context_iteration(NULL, false)); diff --git a/tests/unit/test-vmstate.c b/tests/unit/test-vmstate.c index df1fb4c7780..e32417c759d 100644 --- a/tests/unit/test-vmstate.c +++ b/tests/unit/test-vmstate.c @@ -1626,6 +1626,7 @@ int main(int argc, char **argv) temp_fd =3D mkstemp(temp_file); g_assert(temp_fd >=3D 0); =20 + module_call_init(MODULE_INIT_QOM_EARLY); module_call_init(MODULE_INIT_QOM); =20 g_setenv("QTEST_SILENT_ERRORS", "1", 1); diff --git a/tests/unit/test-xs-node.c b/tests/unit/test-xs-node.c index 2f447a73fb8..2eb56549c86 100644 --- a/tests/unit/test-xs-node.c +++ b/tests/unit/test-xs-node.c @@ -857,6 +857,7 @@ static void test_xs_node_tx_resurrect2(void) int main(int argc, char **argv) { g_test_init(&argc, &argv, NULL); + module_call_init(MODULE_INIT_QOM_EARLY); module_call_init(MODULE_INIT_QOM); =20 g_test_add_func("/xs_node/simple", test_xs_node_simple); diff --git a/tests/unit/test-yank.c b/tests/unit/test-yank.c index 9fc86a21282..23c3acf6eba 100644 --- a/tests/unit/test-yank.c +++ b/tests/unit/test-yank.c @@ -202,6 +202,7 @@ int main(int argc, char **argv) goto end; } =20 + module_call_init(MODULE_INIT_QOM_EARLY); module_call_init(MODULE_INIT_QOM); qemu_add_opts(&qemu_chardev_opts); =20 diff --git a/tools/i386/qemu-vmsr-helper.c b/tools/i386/qemu-vmsr-helper.c index f12fd3c3e81..25f054edcf0 100644 --- a/tools/i386/qemu-vmsr-helper.c +++ b/tools/i386/qemu-vmsr-helper.c @@ -359,6 +359,7 @@ int main(int argc, char **argv) =20 error_init(argv[0]); module_call_init(MODULE_INIT_TRACE); + module_call_init(MODULE_INIT_QOM_EARLY); module_call_init(MODULE_INIT_QOM); qemu_add_opts(&qemu_trace_opts); qemu_init_exec_dir(argv[0]); --=20 2.43.0 From nobody Thu May 28 00:44:24 2026 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=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1777581551; cv=none; d=zohomail.com; s=zohoarc; b=Li/l+I+PxJcrAu1snrcIABzdLRTC/U9ZWbNG5YvkFQPz+mjJeDKnTwofa/rAmu9S4rBFA7MhQ1RXvVplVX+K27Ss2ewG0iHbk1jiOCFYDNyjAZC1Yxfxl4fFqXkLANvAIu0uz0u3XJNrDAlEhpF9TvHJ71ZmvfLKE+ZqaKBCrh8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1777581551; h=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=MuMGZIyU8EsEucXeveARFZ0iuXjJOtWKT+BHVswZ9As=; b=cKFSQlujVOjH9usMUO3fKAFaQyJYDfN6SRBGMkvzB67OjrnyUQuVtujjMz8QzepftRWBTHSarLq1u10n2nxRXcO7d14bkjxvmdiChoa1fnJxvC1MnoiML4LREeI2rXbppVFW/RkaMabxpcltOHFjfjP4vgNIYw3XpMPCEgwGFkA= 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=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1777581551041412.50620392202154; Thu, 30 Apr 2026 13:39:11 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wIYA5-0002s8-Sy; Thu, 30 Apr 2026 16:39:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wIY9z-0002mn-Mh for qemu-devel@nongnu.org; Thu, 30 Apr 2026 16:39:00 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wIY9v-0000sw-DR for qemu-devel@nongnu.org; Thu, 30 Apr 2026 16:38:58 -0400 Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 63UIjQ5b563970 for ; Thu, 30 Apr 2026 20:38:53 GMT Received: from mail-dy1-f200.google.com (mail-dy1-f200.google.com [74.125.82.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dv7wut3rv-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 30 Apr 2026 20:38:52 +0000 (GMT) Received: by mail-dy1-f200.google.com with SMTP id 5a478bee46e88-2ee34588671so599175eec.0 for ; Thu, 30 Apr 2026 13:38:52 -0700 (PDT) Received: from hu-pbouvier-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2ee3889d628sm2202341eec.6.2026.04.30.13.38.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Apr 2026 13:38:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=MuMGZIyU8Es EucXeveARFZ0iuXjJOtWKT+BHVswZ9As=; b=eFFknTZ4QdZWsWNSE0MgBZlXSdo MWbamA42y17e10GH2WTHr7hGDCz8fs0SBQI9Em57gy3boDcuFz8iuXxP1nTaJMuR OZLY1fhsWJXDTh4W2kfcDhdiRuHXhSGrJSdEVR3n5fxjIyFkMVEh+BECPU/lQwpR 1yoXehTwp2zE3fMyoscfMg28CMg39KIBqQrNfPMB8Q+2QrTpJ7Ftckl1JvkW+SvA rm5hciR/G0FSy8NwPIlEAfpK6STkmEZfafW7C0+2Lee4SEIxRJ7887r5JO86I1Wv qj6rHZsF5563r+XlLLN3bcCdyvHtCpFAF9M2q7OotkM5K0/fPe9MOscnP0g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1777581532; x=1778186332; 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=MuMGZIyU8EsEucXeveARFZ0iuXjJOtWKT+BHVswZ9As=; b=Dzbbv0P8kVEbGBAfDQiJccgNEmz5g+ImImdyp25Af1OcYkHjtrPdH/JzFIPRPPzw0a 8xmkBTWlXZotiWssmQK/1UFaGonc4pTt12zKZ1VzPKTJbxsZh0H2YNMkmjX9di4TQxeC 6JocXSuNmV9Mb8xDMnOQ4jM7bN4kxvv6epp6a/Z1CYfdB4wxvordb3Oxu3LI2TpBAuws RZNx8avDDJcaKOS1jx+cP+WNV4dp8sgrfNYeTyilAA33/QAqxlNv6/ytM9OvubJcI6yy 993TJezRuwDCLhRgU6iE8EckhhjqnlCFK9qldsWgtkp2m09M8fhSCPvht8zmdipwueCJ flSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777581532; x=1778186332; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=MuMGZIyU8EsEucXeveARFZ0iuXjJOtWKT+BHVswZ9As=; b=oibY2dx4IRVCK+UMfykl1uyipD3wLEVgQT2XUj1t9pc0KcCw/xnYTLq1u9mPXr6VBa U8d3yEyfuek4Le5vf9bbA5P54bUDQQQmRp9aUPQb4XvTX8GRTuI1uPhxU+Oimf2Y7MPi ssUOcdQt+pqhzoyajgQaG/dmhY4witp3UVQjWoqUKyOIqWP/YpFqVKPxOVGy7V1R4UwF OpU7lgl69BMFJjFQ4EPawTOxyMf4pELkKXxx9caxEPqJOH8euVY1lKpGvHsjR5mEhVLl V0lzUkOEDakovK6FJd+0Thaye71PbaB6mpWNG+ywQI1+qOn8Ua/qaPJ3fSLgzKNRG19g dQyg== X-Gm-Message-State: AOJu0Ywx+Ldm3pJFhK4tKjCnv+4xd5zu2aFY2VSap9u2K4AmBhGKLtuz ObPRhLzEeq6oXexfJgpFku4rM5w91m2wlvLssgCgBp+ZH/xClRqwuLJhp2k4KbYynHBtVZsh4oa gD7KmWaR1JpBTZOsSw2H3cNUgLdQ7jDtGxvV+HJiqVPUsaKmCkyf2yzXzL8TY9mGiTZTr X-Gm-Gg: AeBDieuo6dBZXbvZJBGKISW0bQ+8FWUA8m7pSZZQVxsdWo7P3JOfpQQmJYxgTMEVVaX YVnXHZ95X1d8ubb4FoDu+vTjffzucp9bHuy2M/UYSVR3qv3hk4Q4VRYjmFqD+jMvhxezvRZccHV OqFv/+zDnRCwBgr7X3l+UH0GWqvqA/zKh0uudCppFCLj1ygY8qrarOF9ZDgBlntdzBhD7J1wsQd YdCaNrS7+KEgrM/HrVBn1ZAFZCYsravBBy6cgRN0ubqGbqdrEFpkxSTHqg1rbFAZllihwjYjmjp 4l5naLOtmOtRPcFlN/fJepsA+mn//RZm5ALWQdFxAZ05DqMeibVIZ75lpHP647eaUkblwaQ0ISe OIa5kOJ+sBDSnpz0+Weq4WIsP4bD1qXiIqPuMQllR4ezGHf2Pb617Jh442Ju/xPvUui74G9neDT V5ycO5GGDtwnI071aM X-Received: by 2002:a05:7300:4341:b0:2da:d4b4:c85a with SMTP id 5a478bee46e88-2ed3d8b85a3mr1866212eec.11.1777581531688; Thu, 30 Apr 2026 13:38:51 -0700 (PDT) X-Received: by 2002:a05:7300:4341:b0:2da:d4b4:c85a with SMTP id 5a478bee46e88-2ed3d8b85a3mr1866192eec.11.1777581531148; Thu, 30 Apr 2026 13:38:51 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , marcandre.lureau@redhat.com, Markus Armbruster , Pierrick Bouvier , Paolo Bonzini , Anton Johansson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Max Filippov , Richard Henderson Subject: [PATCH v3 2/8] qom/object: init OBJECT and INTERFACE type early Date: Thu, 30 Apr 2026 13:38:36 -0700 Message-ID: <20260430203842.29156-3-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260430203842.29156-1-pierrick.bouvier@oss.qualcomm.com> References: <20260430203842.29156-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDMwMDIxMyBTYWx0ZWRfXxernYMwufFnF S5sXIaqq58SM5KOETAQg8SdWeuhx3+5Qrrvccn3Imf/cZS8Hk4qBwE8WtQVWfCzJZM6lAd/jkYE z5KkpMlk2f4DN3m8hQt6Wb8fROfhvYULc6VoqBGJVGbhMdbAgUwSxnrMPDCD5xqsoYK5MUQuoq1 gQS9Iv2Luy5jTVnWNV9G1IQn3Uk7umR+Z1299Hqx54WbODWDS81S/0S/07Tn9DmyWk7QH4Ga/5V mDHCPZyfjKevsdArzBsgJSx07ORLUI9tLvQBnpHdIz8fgRaocf0ttLgLbJMF6Qy3AyyTuCfAdfV k/dfJQe5pSwMWugpp+/TqUPk8CgBZyDUFBjjx0ZXGPYVMqJUFXPYiLab5f7ATsv0GBUz5dIKuTF eClLReQztMkoPVf0gpW7qMzFs8CZKi9sV3aXfPPu+uZhSQOzQ4vUkJ0rYVmSmIX8L8m9X0DYHIf 2joKl/n4QMoeuhL8yxA== X-Proofpoint-ORIG-GUID: 1RXWK3j505hNlt9xQmhUSeAWh1TijFEu X-Proofpoint-GUID: 1RXWK3j505hNlt9xQmhUSeAWh1TijFEu X-Authority-Analysis: v=2.4 cv=GMk41ONK c=1 sm=1 tr=0 ts=69f3bddc cx=c_pps a=PfFC4Oe2JQzmKTvty2cRDw==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=EUspDBNiAAAA:8 a=5SPJjbiQiQb8vRSH_4UA:9 a=6Ab_bkdmUrQuMsNx7PHu:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-04-30_06,2026-04-30_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 impostorscore=0 priorityscore=1501 adultscore=0 lowpriorityscore=0 phishscore=0 malwarescore=0 bulkscore=0 clxscore=1015 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2604300213 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=pierrick.bouvier@oss.qualcomm.com; helo=mx0b-0031df01.pphosted.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, SPF_HELO_NONE=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: qemu development 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 @qualcomm.com) X-ZM-MESSAGEID: 1777581554561158500 Content-Type: text/plain; charset="utf-8" We need to make those fundamental types available during QOM early setup phase. Signed-off-by: Pierrick Bouvier --- qom/object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qom/object.c b/qom/object.c index f981e270440..2f92b2249e7 100644 --- a/qom/object.c +++ b/qom/object.c @@ -2858,4 +2858,4 @@ static void register_types(void) type_register_internal(&object_info); } =20 -type_init(register_types) +type_init_early(register_types) --=20 2.43.0 From nobody Thu May 28 00:44:24 2026 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=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1777581583; cv=none; d=zohomail.com; s=zohoarc; b=nIGMAHN2Bi7ascNW+Uf1PSzw7L8FIkriCIK5a+06FLfy2A/GmR1w3MRzSZ5uO8cyLLI5ad/fbm9wLljF3lMZekrpIIVZwWfmSyITJsn7loPtvN6Ni7nsRMorQkDj0YOTen8yVuGcw8Xp4GbkaCjNAuSd503HGTfw2leksLVL+bI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1777581583; 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=wSZ/Spf9jTX5omsj1ryEHouCjhpkZKbrn85CwyPrVfE=; b=Zch3zqWvJ+4FR71FLim+UVw6RVSOuEIby6bjxu/S36Lf1as69Lzutcxfji/kaRh21KnpVtsVH0QIlRzf4+LjyC1aSbvTAmVHa065GDihkfaX2qSfmGKsteDBsHzZA6w7V+T/FBgjwRYec8fske95dL8GQp9/nchdgn2PYeg615s= 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=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1777581583272294.1920629866794; Thu, 30 Apr 2026 13:39:43 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wIYA6-0002t0-V0; Thu, 30 Apr 2026 16:39:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wIY9z-0002mp-MU for qemu-devel@nongnu.org; Thu, 30 Apr 2026 16:39:00 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wIY9v-0000tM-Ay for qemu-devel@nongnu.org; Thu, 30 Apr 2026 16:38:58 -0400 Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 63UI9fLQ1988268 for ; Thu, 30 Apr 2026 20:38:54 GMT Received: from mail-dy1-f198.google.com (mail-dy1-f198.google.com [74.125.82.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dvc458mg6-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 30 Apr 2026 20:38:53 +0000 (GMT) Received: by mail-dy1-f198.google.com with SMTP id 5a478bee46e88-2bda35eab74so1169716eec.0 for ; Thu, 30 Apr 2026 13:38:53 -0700 (PDT) Received: from hu-pbouvier-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2ee3889d628sm2202341eec.6.2026.04.30.13.38.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Apr 2026 13:38:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= wSZ/Spf9jTX5omsj1ryEHouCjhpkZKbrn85CwyPrVfE=; b=b8Dk3zsLGhijR8oD zFLtlJ4VzJR9cQrYWpSLrm0VmREebOYDV4opK2eZUxmnJ2AM1Wxg8zpzh+zMNY60 AT3uWLWcaFcmfPoEEB51NF+OiuWK9HcYTVpmLnmxZOGeKhutCB4UOmSt50/qvew0 Gq1JO90Rb6rZq7po+lCB9canGCTS22WIft/dU9DujUR8XghlAHc+WCm/a9dgfVV8 m3N5NcDIrXYT7pmtoi56Jlgai8Ctzes1lqfTLkm2AHX7/VYlTyMhlLDECuSFM80n bexj2/0R2Wgw6BIcv72ZTEwJmRh2TKu9EWgL7xCVVUWPqbt98UeFJvY45dzvauKD 88pcBQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1777581533; x=1778186333; 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=wSZ/Spf9jTX5omsj1ryEHouCjhpkZKbrn85CwyPrVfE=; b=X+eRSDFCBC4EcOWXIqRyXWSOZCwKfx3gqAv587ZQENuFx8z16Fw/pQxg3E2Hljr/Bb 9WGNl1mdkPJtS81U0R1/2v/OQjNIhD2RgZxvuadK9IJAkntYkhzXrzrbj0zZkg5cwxLs rqvS4/pRlmqaFgCFiK5pbaQJ/adfn+OeXU/y72eZK8UEwnwqQspeBlvEpm0mLovw6Oaz 8lVQoy+nYAFuQuuES3lyPAwGybWGQHLYx4+GC4Syyt9BZRnXHQsZ9J/c4XZdZfBbhdYL HeIIAd0sri0QMraSciR9Ye5Oo83we/7LLu/k8UR2BY9z7iCueatHUWYnTPjjbHocl56t UPIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777581533; x=1778186333; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=wSZ/Spf9jTX5omsj1ryEHouCjhpkZKbrn85CwyPrVfE=; b=QXohenI+hk4qPhLiEcIphniaE27v0AoU5qzs4zoF4HEDtpKdCyUd+JZYbVg/c5XlM1 PHZZ+oMVqqO4L7kBhT1fjegqx62nNb1AMND5ByAXEVRJ7S4RAhQ9lwGOBy8O8LgUM50Q EfgzWTOucr89IBz5cW1FMw5vqoApFh98ytsLW3VeYS6z/wRVyXhlsFXkSXf/1EyVIQK/ 7jslVNtWnmXe22NO8UNWSpNsVaVjOeYGPCXvYgrH6RMy9prV3XwwXQJcWlIlJAjf43xY IDdU7w7k19RD1yTVDrxSHLllwDlipGsI9Mm+WRSSMMA4F+uiJCcLtQVroo92eqlR5v4C lajw== X-Gm-Message-State: AOJu0YzjTI2fn1VKmxtY76g9vMUtxim9FQPAazw2vU6hGQRZ8KZwsyvb fM8NLFN7BdzFErXToTG3PLxK9AEmekbNOqf70ItYfSqF+hlZaql7VKHPZe11iyYq3gZIxd2VLt3 2tBAVAnR0+q2C1zmfyk4/ygkZ/2G8UW2ajeogemQH8S6j94jnq6+zx5LYxLJgrJtXx1fm X-Gm-Gg: AeBDietSgnX3kAz4kcmCIlefk2X5To1ie8DSlcdAsyI08Ng6OuFZel9WirrLxlTRbU3 Y3MhhYXlYiaXt0dwCq19pxSLsR+QlJjfIQqqq/MeMv+Clfqsgq2ld3N4GPN4+czDwAsLZ22eK0X TC1l+T505HzPJ6Zx8rpOoOzpI8b+gaen8cfnnA+ldl8jLXiWSTKxNDD+cRM88CITB7zKyeLu1Vs RtPVepFZa6UGtcI+bWv73cBN3UG42vz2HFuKQYwwjI5DC5g9IfeHsAdHAg/vsDWbI/DAU1n00yn o+Sxc6lgP8aMg11qfmDrzza5TaLYRYPcrtL+eSfZ/JMf4QBqkmw7uy86qqzUUr3WH49swMFyDfW aA2movoCRtdiF45zkHsXzgfoGex46f+ukch/qn1mvRuR3We3whztupW65cWsj846LZo+FvXd8EG QVf2kgpyTlOhJ3MwuY X-Received: by 2002:a05:693c:3618:b0:2de:c709:3bc3 with SMTP id 5a478bee46e88-2ed508bc481mr1548484eec.19.1777581532856; Thu, 30 Apr 2026 13:38:52 -0700 (PDT) X-Received: by 2002:a05:693c:3618:b0:2de:c709:3bc3 with SMTP id 5a478bee46e88-2ed508bc481mr1548464eec.19.1777581532190; Thu, 30 Apr 2026 13:38:52 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , marcandre.lureau@redhat.com, Markus Armbruster , Pierrick Bouvier , Paolo Bonzini , Anton Johansson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Max Filippov , Richard Henderson Subject: [PATCH v3 3/8] target/xtensa/core: register types using type_init Date: Thu, 30 Apr 2026 13:38:37 -0700 Message-ID: <20260430203842.29156-4-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260430203842.29156-1-pierrick.bouvier@oss.qualcomm.com> References: <20260430203842.29156-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDMwMDIxMyBTYWx0ZWRfXxR+dVYkxVlS7 j0bCXipso+pdhwxt0Nwa6ErZLEUZMcZQGdKZ5HWL3jTa5siqaABBXsJiYl5+pxBNJ4ndzTn27b+ si0ZA74/8jbRE15DP46eJ6UjCgDALYZValr5F0i2Ev5ibsLvMyIQR0lOSNlV2RpdkrVmR2s02EB cVP9AJji99X8bsZqktkx2qmWFclMkqAJJFQvJ3EKhjewsk+Ei3R0XQmF19av/byqX50S0apDKAB eze5NbiTJ++ZBIf0p3zNGR7qFGoHkz1puJ8sqH4u5aGCMDx7sBSXSp+jKw7rgvez1e5VFMusY01 /zd/e0lZLCrG/niQdR3y2m3DnJXS/8WYk4fYN43Rwta0D6MRuMsKg3AaSgKWhJPjCAxlfyXkQov jiIALk8cONzvDy80gUDgywYnWJ1hMGsukgE/86n8ovMCkaYxcR2EIi63eZN//hs1mroN1vE0t2d Unz/cKANKMZ3McdqoWg== X-Authority-Analysis: v=2.4 cv=DP+/JSNb c=1 sm=1 tr=0 ts=69f3bddd cx=c_pps a=wEP8DlPgTf/vqF+yE6f9lg==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=KKAkSRfTAAAA:8 a=EUspDBNiAAAA:8 a=W37sF3GUcAVBL6lWIEgA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=bBxd6f-gb0O0v-kibOvt:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-ORIG-GUID: 4wOaFA82bcYNyfdXePBDD-H8YOINklP1 X-Proofpoint-GUID: 4wOaFA82bcYNyfdXePBDD-H8YOINklP1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-04-30_06,2026-04-30_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 phishscore=0 malwarescore=0 lowpriorityscore=0 impostorscore=0 adultscore=0 suspectscore=0 priorityscore=1501 clxscore=1015 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2604300213 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=pierrick.bouvier@oss.qualcomm.com; helo=mx0b-0031df01.pphosted.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, SPF_HELO_NONE=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: qemu development 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 @qualcomm.com) X-ZM-MESSAGEID: 1777581584128158500 Instead of using a static constructor, delay registering those types until we call module_init(MODULE_INIT_QOM). This is not yet a problem, but since we will start initializing target-info types before any other, without this patch qemu-system-xtensa* fails with: Type 'dsp3400-xtensa-cpu' is missing its parent 'xtensa-cpu' Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Pierrick Bouvier --- target/xtensa/overlay_tool.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/target/xtensa/overlay_tool.h b/target/xtensa/overlay_tool.h index 701c00eed20..b9eaffa4871 100644 --- a/target/xtensa/overlay_tool.h +++ b/target/xtensa/overlay_tool.h @@ -451,13 +451,14 @@ =20 #if TARGET_BIG_ENDIAN =3D=3D (XCHAL_HAVE_BE !=3D 0) #define REGISTER_CORE(core) \ - static void __attribute__((constructor)) register_core(void) \ + static void register_core(void) \ { \ static XtensaConfigList node =3D { \ .config =3D &core, \ }; \ xtensa_register_core(&node); \ - } + } \ + type_init(register_core) #else #define REGISTER_CORE(core) #endif --=20 2.43.0 From nobody Thu May 28 00:44:24 2026 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=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1777581600; cv=none; d=zohomail.com; s=zohoarc; b=VNFrpb3+hblKmhkIPOn3qaEOjLSXijMcMatRbA6DK5aQkcfKYM2YtPYCA8MNUw7zrwGd3onJuSuvQcFw4aZ6LJ+MqMEEe8VBaxXrZHaOYqcu00NbEjm7mdVTepypzeh9jP5biFT7+pE0EYzvWhs+s7YzsgJk/5H4LpMzt+rrqPo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1777581600; 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=54T5hcINubNCcwaMGkVx4ajHGLNd1sHSAIGwNUp8J0A=; b=IPHfKgiW6WpEPFuYhQOOZJvZsYsp5FnD7Jcs91mxFZ8KOFwUWKgD82mm8Ji7cdfn4Dmr19vJimJfGot1ileFKArK2oK3jdEx6bH7SoSAlfkASJg119PrH1RityUIwWrWHfUPfTupSrXDqRNHizenGTMAwXZLxAQnNfglclFf1fU= 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=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1777581600486272.7181376173007; Thu, 30 Apr 2026 13:40:00 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wIYA7-0002tA-B0; Thu, 30 Apr 2026 16:39:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wIYA1-0002nC-Fr for qemu-devel@nongnu.org; Thu, 30 Apr 2026 16:39:02 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wIY9x-0000th-Dj for qemu-devel@nongnu.org; Thu, 30 Apr 2026 16:39:00 -0400 Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 63UITrSQ563955 for ; Thu, 30 Apr 2026 20:38:55 GMT Received: from mail-dy1-f197.google.com (mail-dy1-f197.google.com [74.125.82.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dv7wut3s1-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 30 Apr 2026 20:38:55 +0000 (GMT) Received: by mail-dy1-f197.google.com with SMTP id 5a478bee46e88-2bdf6fe90a9so2869506eec.1 for ; Thu, 30 Apr 2026 13:38:54 -0700 (PDT) Received: from hu-pbouvier-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2ee3889d628sm2202341eec.6.2026.04.30.13.38.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Apr 2026 13:38:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= 54T5hcINubNCcwaMGkVx4ajHGLNd1sHSAIGwNUp8J0A=; b=g3s8C3diLIOaWa3i sjbEI/FZzvsmK1i5LulMoxiGP+qOWJwqYK+3ZzyvGGWYckJb10q3qEO7dDIAdRE2 AlNVFCuJ49TTqmxpUHizIvg4+VYDyWnbYLtht/X+NRocYgCooVusGgoP18MDUUJ1 Q9JS8EeAPY66sZL05pctO72LYh5ATjrqC+HGvVmSCZxxaRLzhQIMRUeCk4K+ZZh6 W4akyI7bVXn2/H47s6tMci+F5o1MbM1saKs1yot360gvJrGGKB7GwM6hiopAv/UU sLg2rjYUt/E3W1rlieNmd4jEVVYmw1vbi1fQq9FlnFj5W0ZlW3Toog9CCiMdcvdK Jjcp8Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1777581534; x=1778186334; 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=54T5hcINubNCcwaMGkVx4ajHGLNd1sHSAIGwNUp8J0A=; b=d25h2+MAf7TUaF4+0rQ9wFMwHTatGC7qzqYH4OOlXwrWCUX9c4w7Aci2p5Epgjib8f vNKqYFuAV1JmfhnNqVjwFyUCJ1RzfUnUFb2J4Q+USTK+Wo4YHSkcm36QMrc6bkb5Toa9 SWl3014ClbxtnnmhMs9qwLXaCAYtEWt7NCVyveLeUlEGWDYBppxVRjBa63hygfh56sCV hC7RbmE5eiu1hNOvSWLONi25LA1CkmJtSP5B+EEyk/LuIDqIJ75+OnSmIKbKJpu/rvm3 gHgrDiqkoU7ykRhufTfNHinpYVkt/hWyjhqIJNnAVGIkqCoDhe68dELPBtlAKdkPkFQa HLpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777581534; x=1778186334; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=54T5hcINubNCcwaMGkVx4ajHGLNd1sHSAIGwNUp8J0A=; b=Y7HAHGyu4o3uMJgDUjE15+wQoaD00sbV3mbFjh9CzofXwsy/rf3bYtYJ7gHhnXkV68 Oup93zPZVVVMeq1opZiihw0gTYH3zdsca3zDSfg29WBhUg4gdSec4lF8Ao8H5Yr2u3QZ 3/GBkTF+XT8uZmkziSM2wAJ8hLF4kb6OlRyb2b7/QD14H1ahYyTOFNXUC7sWBCwkFQSR OZ0Pk0Ee415Va1U1ePLaADfwmOLVvIg2rivbQK+QH4zVH0LccDXQr8iZFD3h0DzdYodZ 7D1XSGFTkgOl3soCoqJ6g6eV+jo3eg4qZhINGvy7/Q2V3lKnu5cy1X1Tpqsaz7iJloZG DNBw== X-Gm-Message-State: AOJu0YxkpcPlBfynjYROcTWmKkPJARgXjGWz89sLXfTn3v2Wm/cFRPnS sMM++3lR1J34fDLk4GE0m/R24+ovrmFJ8PMkxGHRNHFptF27XIYEOPXKLIDU6HYVzG7fWOFyRqa kUku5luKPjXnAPU/fwj2PZCsjPbHOvDsD4OOy3K01cB1OVlv4DMG9upuO2obwAlgiI2nX X-Gm-Gg: AeBDietzegLF/NcI2JyDvRn8KX2jIlcvGIxJIxbqD2sc0+R0WK+Ekd15Qi/Ul5GLxGl A4x3b6lhhRPB/9TP/oGjKnxoLGNctyabbeAcgRUrGVYPGVb4zXNaQan7337DcVCDrhuf6BHM5Bx GaJekrdEFQQgvN38J/AOAvvgupuku/r1k/2G/02OHxOW0nbEG7GX8vlYhf3wPBA8ooW5GPIML6E 5jnyv2ApHsqU+5OIUgJTbB9wZd+s5yBDieRyma7N1y0RjV0xiUinWwn7wCI9XFcTtNjX3QTl0ta FuOC+BC3pxPGh7xnEgKcqZV+Dl7w3rPT2lO/GBNgi018h4vghjc7jKzj/ViNr5hrrHdpBSJ0CwR 88W7E0XCpGSP1eRfUVmF3pvoeLOqyRX8kv6mgdPwWu47n0frPLwsWY8bKp4Rzxn86p40I9GjNmh L1M6cBOs+l/PnkgGNR X-Received: by 2002:a05:7300:5411:b0:2d1:e92c:f7ff with SMTP id 5a478bee46e88-2ed3c5c9e16mr2196138eec.1.1777581533626; Thu, 30 Apr 2026 13:38:53 -0700 (PDT) X-Received: by 2002:a05:7300:5411:b0:2d1:e92c:f7ff with SMTP id 5a478bee46e88-2ed3c5c9e16mr2196122eec.1.1777581533119; Thu, 30 Apr 2026 13:38:53 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , marcandre.lureau@redhat.com, Markus Armbruster , Pierrick Bouvier , Paolo Bonzini , Anton Johansson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Max Filippov , Richard Henderson Subject: [PATCH v3 4/8] target-info: extract target_info() definition in target-info-init.h Date: Thu, 30 Apr 2026 13:38:38 -0700 Message-ID: <20260430203842.29156-5-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260430203842.29156-1-pierrick.bouvier@oss.qualcomm.com> References: <20260430203842.29156-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDMwMDIxMyBTYWx0ZWRfX4S8a3OkR5SI2 JOMs2YPnPvjjxkLHLPcYaTzhXFoPlPz67kWvHd17o+5SAyD61mpQ6XURUNcafQkJUiynR0rQdte dXPMFga10M1D/ebaQpM4Pa3Lkz9IY4F1yw4QnG/MasU48tvvoqfPswm2EjZ2ncYH54n9hshx9qy JM9p3by05hGShVLZJ9oyDyytIAs1JB0KdkFoVkc+5TcWp+VE8BIvVu5G9R+usBQYzbt95cqXSxV 1xN+xBpnEj8qF9nRzAMgjaclffWNlJSC7GotmXjgO4FYi6JU/u8bhl1ISLvPQhEHe2Ywub68/eM cDCZPfRNFiPUzzVET7U6E5cNa5NjJmYxU2uYk3QkQq7CpTWsq+hVu+oWSt4NxDz1fqryjax0O0h jYr8cjmU967ScwSj1jURlb3/ydf7My7+e9QMcZiwL14r0bjuKEuA8oM/OV42i8TdoZPuZOVwVJ5 fwX2sDXfnS5EbEUk6/w== X-Proofpoint-ORIG-GUID: tcp0dW_brYjFam10FaHr1rGJHOvwztjC X-Proofpoint-GUID: tcp0dW_brYjFam10FaHr1rGJHOvwztjC X-Authority-Analysis: v=2.4 cv=GMk41ONK c=1 sm=1 tr=0 ts=69f3bddf cx=c_pps a=Uww141gWH0fZj/3QKPojxA==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=20KFwNOVAAAA:8 a=EUspDBNiAAAA:8 a=090slgBn3MrHMI8nANcA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=PxkB5W3o20Ba91AHUih5:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-04-30_06,2026-04-30_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 impostorscore=0 priorityscore=1501 adultscore=0 lowpriorityscore=0 phishscore=0 malwarescore=0 bulkscore=0 clxscore=1015 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2604300213 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=pierrick.bouvier@oss.qualcomm.com; helo=mx0b-0031df01.pphosted.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, SPF_HELO_NONE=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: qemu development 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 @qualcomm.com) X-ZM-MESSAGEID: 1777581601414154100 This allows us to prepare next commits, which will introduce qom registration for system mode. Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Pierrick Bouvier --- configs/targets/aarch64-softmmu.c | 6 ++---- configs/targets/arm-softmmu.c | 6 ++---- include/qemu/target-info-init.h | 21 +++++++++++++++++++++ target-info-stub.c | 6 ++---- 4 files changed, 27 insertions(+), 12 deletions(-) create mode 100644 include/qemu/target-info-init.h diff --git a/configs/targets/aarch64-softmmu.c b/configs/targets/aarch64-so= ftmmu.c index 82ccb575759..75d95b0e743 100644 --- a/configs/targets/aarch64-softmmu.c +++ b/configs/targets/aarch64-softmmu.c @@ -8,6 +8,7 @@ =20 #include "qemu/osdep.h" #include "qemu/target-info-impl.h" +#include "qemu/target-info-init.h" #include "hw/arm/machines-qom.h" #include "target/arm/cpu-qom.h" #include "target/arm/cpu-param.h" @@ -23,7 +24,4 @@ static const TargetInfo target_info_aarch64_system =3D { .page_bits_init =3D TARGET_PAGE_BITS_LEGACY, }; =20 -const TargetInfo *target_info(void) -{ - return &target_info_aarch64_system; -} +target_info_init(target_info_aarch64_system) diff --git a/configs/targets/arm-softmmu.c b/configs/targets/arm-softmmu.c index 18940e51e55..73546fa5737 100644 --- a/configs/targets/arm-softmmu.c +++ b/configs/targets/arm-softmmu.c @@ -8,6 +8,7 @@ =20 #include "qemu/osdep.h" #include "qemu/target-info-impl.h" +#include "qemu/target-info-init.h" #include "hw/arm/machines-qom.h" #include "target/arm/cpu-qom.h" #include "target/arm/cpu-param.h" @@ -23,7 +24,4 @@ static const TargetInfo target_info_arm_system =3D { .page_bits_init =3D TARGET_PAGE_BITS_LEGACY, }; =20 -const TargetInfo *target_info(void) -{ - return &target_info_arm_system; -} +target_info_init(target_info_arm_system) diff --git a/include/qemu/target-info-init.h b/include/qemu/target-info-ini= t.h new file mode 100644 index 00000000000..c781cfc0590 --- /dev/null +++ b/include/qemu/target-info-init.h @@ -0,0 +1,21 @@ +/* + * QEMU target info initialization + * + * Copyright (c) Qualcomm + * + * SPDX-License-Identifier: GPL-2.0-or-later + * + * This file is included by each file defining a TargetInfo structure and = is + * responsible for registering it. + */ + +#ifndef TARGET_INFO_DEF_H +#define TARGET_INFO_DEF_H + +#define target_info_init(ti_var) \ +const TargetInfo *target_info(void) \ +{ \ + return &ti_var; \ +} + +#endif /* TARGET_INFO_DEF_H */ diff --git a/target-info-stub.c b/target-info-stub.c index f5896a72621..af7cdc5e67a 100644 --- a/target-info-stub.c +++ b/target-info-stub.c @@ -9,6 +9,7 @@ #include "qemu/osdep.h" #include "qemu/target-info.h" #include "qemu/target-info-impl.h" +#include "qemu/target-info-init.h" #include "hw/core/boards.h" #include "cpu.h" #include "exec/page-vary.h" @@ -40,7 +41,4 @@ static const TargetInfo target_info_stub =3D { #endif }; =20 -const TargetInfo *target_info(void) -{ - return &target_info_stub; -} +target_info_init(target_info_stub) --=20 2.43.0 From nobody Thu May 28 00:44:24 2026 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=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1777581574; cv=none; d=zohomail.com; s=zohoarc; b=jhr4syVxn6VfgLbe0cx3Ys7Y30iBWzNYKs80yavgITPbxUYtlyQcB9G2NQE2YAC8bypn5WwIPT9fUP4yTMzjFCOsdsobtR7ooX/q7YdBfa86ChzIP5YFDTazK2JWF6Drjnmc5uutwtYty1SpmHM+EFKbdnaHCRttDXfrr1EUShU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1777581574; h=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=kdYb4dp22kfFuJHASL+X2gyJ+4ROfhuXXuPO3RoA9Zc=; b=Ms0UVp8/PrrlK0dje6AcvvBKLoW4wq+yvVo+37BQI6S41NtoBS+1LyazsP8punUrUgTqU65BRXDZsgqqGcZ7+YB9JeQbl/gY0uHeOoxbsc1Ah1g1NxMMG4BAi8cPt5gocH4Ig8ifetMGSmrc9tBsVznlxrQADufJYmwRYNodTHk= 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=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1777581574334850.0179156318227; Thu, 30 Apr 2026 13:39:34 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wIYA8-0002ud-8Q; Thu, 30 Apr 2026 16:39:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wIYA1-0002nB-FW for qemu-devel@nongnu.org; Thu, 30 Apr 2026 16:39:02 -0400 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wIY9x-0000u5-Dt for qemu-devel@nongnu.org; Thu, 30 Apr 2026 16:39:00 -0400 Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 63UKIDvp1854109 for ; Thu, 30 Apr 2026 20:38:55 GMT Received: from mail-dy1-f198.google.com (mail-dy1-f198.google.com [74.125.82.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dve0g01ww-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 30 Apr 2026 20:38:55 +0000 (GMT) Received: by mail-dy1-f198.google.com with SMTP id 5a478bee46e88-2cc75e79b97so4724770eec.1 for ; Thu, 30 Apr 2026 13:38:55 -0700 (PDT) Received: from hu-pbouvier-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2ee3889d628sm2202341eec.6.2026.04.30.13.38.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Apr 2026 13:38:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=kdYb4dp22kf FuJHASL+X2gyJ+4ROfhuXXuPO3RoA9Zc=; b=FmsCf6ixyVtWfqLjCPR+oGwIVkv dhb4fFgmacULvCKbhofb04OtuRZ+UXXKUUP1+Qb6iNawwTdL8HYZG9t8vHbIg0nq 3SId9gtJ/3AFwXfb8xw0Oh0FD7hZcbzYM4+rd9yJlIXSgyTZJL0jeD5yygmYB4uY gb8YJl3batf9a4fKKy4P+FbRUBi+MLAttmnHQfBjw/1e8mBODtW0DdqMvtsYjLwa w14cGtEKSzj7C2YnHdz+ygFmZl3nGEjXCndchVsAOcRBx2HR7Z8SYnerBKwrRZyv ojXwNJtYfwWND90jrhPJ0SNeAopSKeIqZwXG4Pa0XKRtT1hdiXG15AfcU3Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1777581535; x=1778186335; 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=kdYb4dp22kfFuJHASL+X2gyJ+4ROfhuXXuPO3RoA9Zc=; b=Hd/6cy6yMyDeBpWhjLVZb9RUUuwgYgIy5e2nMmGAfMVMRv8NeDjn1ceH5x/Y4C2js9 bWzjDRy5AApPnHV6OAZRCiq3WA3NXkiEma0I2fUbLrkktQ3ua0kCXmT84fk3WG1Cz9th /yY4lrr36kYANdiKTX8fXu2gGVX6zGKs+JQHtwwS1ymBHqPYj4pTLTAkijcR+WN+EiYK QWvybjWbuNRr9qQ8Q+6zZ/FueG8NrStaK9Knc6o9AOU2m6uj2m7KRG6sMsT8pyGUOvuO 0479LcNuKI91Ta3WTDGicCDcYtOLFUXPfvquD82B39vGz9VVsimOE6a/enAcfs7M0fGz 1D2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777581535; x=1778186335; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=kdYb4dp22kfFuJHASL+X2gyJ+4ROfhuXXuPO3RoA9Zc=; b=hncGwvHylRbBNo4qahTilBryuqjDxIqptI0uReZTyNnuKy9D/OsrrjgeL5oGs8d+24 1eqfHC3xnGHEu0e+5TPbvPOU+u17aMT+eaaD0QHSfo79ABGVgHmNs1Xmu5Apa/ldC2hg 4tg5QxZH4CKc0aP2omH6yGZJ4O7A6hfs/r78ItmHHKpb0Mw621CYAm2Evzy2VQv05IMe uzzA3nZ5KvkT5df66JC/3TMcsvSAH/ULYeR/0EqWkERIL1anRZnz6/oJK87IjUfCH7eA +5N8JZ0ai7hELADsBPH9Fygb9Iq9jgtkLYzJrWp9siMv4pDKR0VpDbKiVhN41HERpc8X NKoQ== X-Gm-Message-State: AOJu0YyqwAr46EuDDQup7OvlIs9O6YE4kH+AbAFQi8AEw3SRie21fKPy 5HWULjnJvpSB794vlwRGMl/voFzQb2lU1jsEbrXnTFMYyACNmlxngIlETubKSUgpSGnd3Yg+EGq 9/o+ZjirnDIo96UffOo0EqIHc/wNrJH3abOdG0VLrtOOuRu/pJ2iwo/OKsZZkIPndnWak X-Gm-Gg: AeBDievjr6mPY/1cd0PTT6if2cQ06UeihH7eDIJlep25E0+WjnoAv/5A58064Du243r ngHz56Crvn9n2BEzy6N9f8LAd+QZbed648FMOLrQMxs6Nt8Q1xQouloAEF+bMbjXb0bxHZHUCBg 40rXdQ9nUZfFUI3KYQGEWi7vtYxO5teLSUl2X2zMTbff6xI7BABgDvBiO2wYpt2Uuz9n3PQWjOs RYs1zoUNvnSFFjWW1nEgXNV74iG3Fsv/aIeL/Z8uXisw1MevVYYZvJtthBAU0YqVReHflk0IFVp tn8XLDfanoiGoLC7UqylYYlVKIGY4pZOgrV44G0BjGdEO5NFWYlEaxXI5V/nSyTlwrvG+lkfpi0 18wjiRgQbf/PnTl839ksxQInXuww8Mb8sA460173AIcJn03JZwBc4E5NbK29I/wFabGp5vzbe1b YsPfX0hV6CT5FxnhBn X-Received: by 2002:a05:7300:e827:b0:2ea:5057:a304 with SMTP id 5a478bee46e88-2ed3ba12a42mr2501600eec.2.1777581534547; Thu, 30 Apr 2026 13:38:54 -0700 (PDT) X-Received: by 2002:a05:7300:e827:b0:2ea:5057:a304 with SMTP id 5a478bee46e88-2ed3ba12a42mr2501577eec.2.1777581533978; Thu, 30 Apr 2026 13:38:53 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , marcandre.lureau@redhat.com, Markus Armbruster , Pierrick Bouvier , Paolo Bonzini , Anton Johansson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Max Filippov , Richard Henderson Subject: [PATCH v3 5/8] target-info: introduce TargetInfo in QOM Date: Thu, 30 Apr 2026 13:38:39 -0700 Message-ID: <20260430203842.29156-6-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260430203842.29156-1-pierrick.bouvier@oss.qualcomm.com> References: <20260430203842.29156-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Authority-Analysis: v=2.4 cv=EpHiaycA c=1 sm=1 tr=0 ts=69f3bddf cx=c_pps a=wEP8DlPgTf/vqF+yE6f9lg==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yOCtJkima9RkubShWh1s:22 a=EUspDBNiAAAA:8 a=ifg725Mek7oY8M_gCSsA:9 a=bBxd6f-gb0O0v-kibOvt:22 X-Proofpoint-GUID: i475GTnKDvddYBwN1qyxIa0B4dQRCNHt X-Proofpoint-ORIG-GUID: i475GTnKDvddYBwN1qyxIa0B4dQRCNHt X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDMwMDIxMyBTYWx0ZWRfX9LYGdDCxNjBA edu1QZTJoFw0sQJyDUAsRpnRIRW67m0QMgTOoeOwBPjBxqrHdxjmxRKPUMTljZUoqACuReq1urR RVx2vq8gfTdHSxC/rRDdfaYVvgvCBMK2u9PSAT7IaNqXJhT/E5QnT605kP6t/MvGVT7gO3iILnp lB92KGu3IxLAOQgpXH2SYQ6EKlunRdqbj6hjCAN1oZMAzqTHAa9GcH4pZX9DjSTlMVlhZ8D90Ww a+ChAMDPeDbGRACF+ENuEQUak5f+z89wGWgxxlcmbztuz2Q9PFBseWF7ke5CKiEuNtsnRkCU0rw 1Nbf/XzubxDC81oQ61mHECLlgmrcVhmDcuIVkWFhlrECK/3hau2uhSxLxU75vzZt+YQdkutVVQo Yo2hzt68mkyE+prszFmA+k4+EZzS6Wvmiy2i5A1HidH2WYcFE3LwB4SSUWt/BejjoHG79+khKyk bw+eGDja986yFHJdI3A== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-04-30_06,2026-04-30_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 clxscore=1015 impostorscore=0 bulkscore=0 suspectscore=0 adultscore=0 phishscore=0 lowpriorityscore=0 priorityscore=1501 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2604300213 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=pierrick.bouvier@oss.qualcomm.com; helo=mx0a-0031df01.pphosted.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, SPF_HELO_NONE=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: qemu development 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 @qualcomm.com) X-ZM-MESSAGEID: 1777581577289154100 Content-Type: text/plain; charset="utf-8" For the single-binary, we want to be able to retrieve at runtime the current target among the different ones available. A consequence is that we can't rely on existing target_info() definition since it will create a conflict once more than one target is available. To solve this, we add TargetInfo in QOM, with this hierarchy. We define one class "target-info-X" per target, that inherits from abstract class "target-info". Using concrete vs abstract class ensure we can easily filter "target-info-X" from all QOM types. Associated TargetInfo is directly set through class initialization, without relying on any instance. For user mode, we simply define target_info() like it was done previously. In this patch, we keep the same definition for system-mode also, and it will be replaced in next commits. We will introduce detection of target from QOM, so we need to make sure those types are registered early. Signed-off-by: Pierrick Bouvier --- include/qemu/target-info-init.h | 57 +++++++++++++++++++++++++++++++++ include/qemu/target-info-qom.h | 28 ++++++++++++++++ target-info-qom.c | 14 ++++++++ 3 files changed, 99 insertions(+) create mode 100644 include/qemu/target-info-qom.h diff --git a/include/qemu/target-info-init.h b/include/qemu/target-info-ini= t.h index c781cfc0590..7e6f5d90ec4 100644 --- a/include/qemu/target-info-init.h +++ b/include/qemu/target-info-init.h @@ -12,10 +12,67 @@ #ifndef TARGET_INFO_DEF_H #define TARGET_INFO_DEF_H =20 +#define DEFINE_TARGET_INFO_TYPE(info) = \ +static void do_qemu_init_target_info(void) = \ +{ = \ + type_register_static(&info); = \ +} = \ +type_init_early(do_qemu_init_target_info) + +#ifdef COMPILING_PER_TARGET +#ifdef CONFIG_USER_ONLY + +/* + * User mode does not support multiple targets in the same binary, so just + * define target_info(). + */ #define target_info_init(ti_var) \ const TargetInfo *target_info(void) \ { \ return &ti_var; \ } =20 +#else /* CONFIG_USER_ONLY */ + +#include "qemu/target-info-qom.h" +#include "qom/object.h" + +#define TYPE_TARGET_INFO_TARGET TYPE_TARGET_INFO"-"TARGET_NAME + +typedef struct TargetInfoQomTarget { + TargetInfoQom parent; +} TargetInfoQomTarget; + +typedef struct TargetInfoQomTargetClass { + TargetInfoQomClass parent_class; +} TargetInfoQomTargetClass; + +OBJECT_DECLARE_TYPE(TargetInfoQomTarget, TargetInfoQomTargetClass, TARGET_= INFO_TARGET) + +#define target_info_init(ti_var) = \ +const TargetInfo *target_info(void) = \ +{ = \ + return &ti_var; = \ +} = \ + = \ +static void target_info_qom_class_init(ObjectClass *oc, const void * data)= \ +{ = \ + TargetInfoQomTargetClass *klass =3D TARGET_INFO_TARGET_CLASS(oc); = \ + klass->parent_class.target_info =3D &ti_var; = \ +} = \ + = \ +static const TypeInfo target_info_qom_target_type_info =3D { = \ + .name =3D TYPE_TARGET_INFO_TARGET, = \ + .parent =3D TYPE_TARGET_INFO, = \ + .instance_size =3D sizeof(TargetInfoQomTarget), = \ + .class_size =3D sizeof(TargetInfoQomTargetClass), = \ + .class_init =3D target_info_qom_class_init, = \ + .abstract =3D false, = \ +}; = \ + = \ +DEFINE_TARGET_INFO_TYPE(target_info_qom_target_type_info) + +#endif /* CONFIG_USER_ONLY */ +#endif /* COMPILING_PER_TARGET */ + #endif /* TARGET_INFO_DEF_H */ diff --git a/include/qemu/target-info-qom.h b/include/qemu/target-info-qom.h new file mode 100644 index 00000000000..585995c7ad0 --- /dev/null +++ b/include/qemu/target-info-qom.h @@ -0,0 +1,28 @@ +/* + * QEMU target info QOM types + * + * Copyright (c) Qualcomm + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#ifndef QEMU_TARGET_INFO_QOM_H +#define QEMU_TARGET_INFO_QOM_H + +#include "qemu/target-info-impl.h" +#include "qom/object.h" + +#define TYPE_TARGET_INFO "target-info" + +typedef struct TargetInfoQom { + Object parent_obj; +} TargetInfoQom; + +typedef struct TargetInfoQomClass { + ObjectClass parent_class; + const TargetInfo *target_info; +} TargetInfoQomClass; + +OBJECT_DECLARE_TYPE(TargetInfoQom, TargetInfoQomClass, TARGET_INFO) + +#endif /* QEMU_TARGET_INFO_QOM_H */ diff --git a/target-info-qom.c b/target-info-qom.c index 7fd58d24818..ba2c7923760 100644 --- a/target-info-qom.c +++ b/target-info-qom.c @@ -7,7 +7,11 @@ */ =20 #include "qemu/osdep.h" +#include "qapi/error.h" #include "qom/object.h" +#include "qemu/target-info-impl.h" +#include "qemu/target-info-init.h" +#include "qemu/target-info-qom.h" #include "hw/arm/machines-qom.h" =20 static const TypeInfo target_info_types[] =3D { @@ -22,3 +26,13 @@ static const TypeInfo target_info_types[] =3D { }; =20 DEFINE_TYPES(target_info_types) + +static const TypeInfo target_info_parent_type =3D { + .name =3D TYPE_TARGET_INFO, + .parent =3D TYPE_OBJECT, + .instance_size =3D sizeof(TargetInfoQom), + .class_size =3D sizeof(TargetInfoQomClass), + .abstract =3D true, +}; + +DEFINE_TARGET_INFO_TYPE(target_info_parent_type) --=20 2.43.0 From nobody Thu May 28 00:44:24 2026 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=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1777581568; cv=none; d=zohomail.com; s=zohoarc; b=dlwtsjMzEhja1K5DL+CLx9cTXtsWkOMZmwOjC6ao0zPAz4Wz6VTutCZ5l1JZEhStQYnGCxFK6HkGmIcDuy+fucyv8oy7qLZo6Cvhsn2Jz2sWlrZTvmEBmIHNd8Lfx+XBImkqYgBli4H1xF0XTw3FXL8w+8ZT7rvIkzTj3ZssWEg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1777581568; h=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=fnfFf6Kq30cUnyav6D8h/SBee1wOqNfpsYYXewcNm5I=; b=M9KaqJIak02bQyP1utKg0WiCiE6YXuL/JubwyDipYk4NSw+jiTZCv51hHxd1fk8yeZU3+Yv169dVzI27HBWt5JlYZ2LdIrAcDhmrL1XCCHqtECWFG9JxrH573CT36tJyawuoTwgrJPAOULJbPQlh3xf72iUaQqmJPSyN+89Ubgk= 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=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1777581568748357.8040779727627; Thu, 30 Apr 2026 13:39:28 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wIYA5-0002pw-Oj; Thu, 30 Apr 2026 16:39:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wIYA1-0002nD-GP for qemu-devel@nongnu.org; Thu, 30 Apr 2026 16:39:02 -0400 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wIY9x-0000ul-MH for qemu-devel@nongnu.org; Thu, 30 Apr 2026 16:39:00 -0400 Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 63UI9o511988442 for ; Thu, 30 Apr 2026 20:38:56 GMT Received: from mail-dy1-f198.google.com (mail-dy1-f198.google.com [74.125.82.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dvc458mgc-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 30 Apr 2026 20:38:56 +0000 (GMT) Received: by mail-dy1-f198.google.com with SMTP id 5a478bee46e88-2da19227bc1so6073657eec.1 for ; Thu, 30 Apr 2026 13:38:56 -0700 (PDT) Received: from hu-pbouvier-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2ee3889d628sm2202341eec.6.2026.04.30.13.38.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Apr 2026 13:38:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=fnfFf6Kq30c Unyav6D8h/SBee1wOqNfpsYYXewcNm5I=; b=bTWi9Vil7ZbZcUAeJBYd3mDaeJe 3zuCaSWYXPu2U3rSIJ3f9jfTzPDs450FNcZjxODtJYz5p0xNlm2iKUgGRR/q0Ss7 3FdY4NH4ls2VuYEV87nK8aEDsFBNTwwwldKGZzpd4m0TQMfoshOTjxqRZJDaiNOk UZ6tMpZOSoN+acjgD6gWTGIc7FNYIU3CM9H50mRZIf8iRPzbT+n/i1FiVQDDXR8s sEA2+9dhr/Y+A9wYyw8PF/0h6kDIPoOUlzHpd5m70GhmZPd+t5/pgQa4JAtnFTXQ nylfnwv/y7u78FKpnq5jSKJrKoJcWU6MgIbGCc4otIK+cQdU0uq9jJtXmlg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1777581535; x=1778186335; 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=fnfFf6Kq30cUnyav6D8h/SBee1wOqNfpsYYXewcNm5I=; b=i3F0MxH4dVQcETE+YPbzoAVH0UW6plkyFrDPcMdvJILkPfnulVBySe+LPDjX4/IoF2 6qYbWO/f1qa2pr1d+PQfV1B5hawb1zmRmyE52IqlUN7YSlg1KpMrFO+3nVTg3aumWsHZ 0pWyRjl8NAoB4Jy/pz6SYSqs+YdsZCTV5dvZ5yLuv8WbxyLr9Lz56NoJh24FHOzbgHm9 ie8G//En0AqsV4w6Ue87LLufNRjUA97RlBZibaXUwuZnJVj/OpeA6/RZ9wyPpGJyVVNx IJFKjgvyeVzQ7EUgqfvHdfRoi/l0KVJ5hUQtfytn1tX5oPSNRF213tkWQ32Ih7HtMkQy zpQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777581535; x=1778186335; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=fnfFf6Kq30cUnyav6D8h/SBee1wOqNfpsYYXewcNm5I=; b=Zc8EGD7N3SSvmF6MUGiT2xowo73MKAkfPI124zfZ9FGVrK48QN+NhK7Cf5UacaEk+8 iFRw6BlPIir5htrsIWtOUhrAhasHUeSraCdLtphBhX8Mj5VP77d4i4s+3ZgunHpp/kBD gUNLGgVMpl/i6tQAtLS3/yc7IPDWjSC01f1gqap7ZUb9JYDP2jSFrd2nAEthVWlcEAvO WaG17wTYkxZG6+2dNlDyb+GEpxennT0SmStt3aGEFxmm1axKdaEUyPxbVUV0GfVENln3 KDdd5K6rzMJDxdXfwovarnfkz+Jw3DezAdRaMx6dO6z6U8FvvnKFHmITUGIgm96VnfQ4 0dkQ== X-Gm-Message-State: AOJu0YxMsTLzeYPQlyMzZkr57oZoqZ0xAbul24Dh9zim4RXBC2REt7bL hoCstp0l8uFYbzT7cqic4ZgML6XCPtV+GVVt471P7stontICL6GWLyWGJV0aD4MgNV1CwQ6GOvp Gj1WO0bU+MXAFY7orlaDKTvFiR6QLkWYCi9qV3Zt4jVrUwWcCqfj7DVMXF88izoMQIfgz X-Gm-Gg: AeBDievzLlRZmzynXaws0odSHDNO+vpjuafLv4KmDkJAwdDwUW6qmgg4kx9z9ZZDVHs P8cWp4xfaVKLwG67sYS2DJ3A6I5agTDEwgjrGAUUBe0kKxMRiv8ZSL4myuFL53j7K/B+o+rub+6 T8/I6Yod7fQKknbHASE2Q5oABxCS0sD+ZbWkR8TLugfq03GtJOKch/fMrsQot4SEekU5kWDnu34 BUHWPNKMOsiuiES4mZFO1EUFOtvUqh4rmXj5YPE33sONvh5cpwlZZKavgC9IrtdzlC5tDdJnjt+ lC3ZdntqY1wlp+V3HHHLUN/lDGxGSZpbwwNdvSC2fvvfWq2lDVWnaFIsgMJXQGos7ySTWkU5HR8 FIIPSJplOkD/39MHD3+4eevqpu//+aSM3I8sMPbsYzBS2iKNN728i6MZ+h9SUYJf7EYY+p0p0KN SYlhMXzc46pcNUH9hT X-Received: by 2002:a05:7300:818a:b0:2dd:c066:bfe with SMTP id 5a478bee46e88-2ed3dea53c3mr2194579eec.21.1777581535411; Thu, 30 Apr 2026 13:38:55 -0700 (PDT) X-Received: by 2002:a05:7300:818a:b0:2dd:c066:bfe with SMTP id 5a478bee46e88-2ed3dea53c3mr2194559eec.21.1777581534884; Thu, 30 Apr 2026 13:38:54 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , marcandre.lureau@redhat.com, Markus Armbruster , Pierrick Bouvier , Paolo Bonzini , Anton Johansson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Max Filippov , Richard Henderson Subject: [PATCH v3 6/8] system/vl: init module QOM_EARLY earlier than QOM Date: Thu, 30 Apr 2026 13:38:40 -0700 Message-ID: <20260430203842.29156-7-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260430203842.29156-1-pierrick.bouvier@oss.qualcomm.com> References: <20260430203842.29156-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDMwMDIxMyBTYWx0ZWRfX5/urYiyCP6m+ Q3Ka1rZ9PncvaoGWHcSNhg2TekQdnRraRVxkbVyWS97px5CoAKosjG6jr07VxSiEY3kdiFbOWyd L5KKI+iVZfry4Z8iRHd75rTgoUzfJ6HrPwpuSMaC5vtYc+Ht94dzqTF8+M5/TSryBEUt3ojRk+D k0lWGNwucMWHHSnsWI3i6fkWXnzkCKrV49va+CRJTeC/z93JnIZ3FjdhSmBmLK3DPOWpr6N+IWl IO/Xc1cEH93A5EjoYs86FpEuCvsDuCYd5p05fjPOLFDpr+D9ucAMA+urkOeheLOEALXm1TPkj/h Zk5bSSyCrVRyTO8SW+Xp8YGIMCVU0UUqDv4dzrJ+Y98w7366CBR+eAe6D7NVU4F62WGf42TlGI0 794Zlqmlz0/MuWmWmKRBecAGl7wmbJ6oPwzP0Bv4Z/Z4S6TnixEZU9pYe9Ciq3XDK07KatFdlrO SHxtJ7St728iLaJh9Mw== X-Authority-Analysis: v=2.4 cv=DP+/JSNb c=1 sm=1 tr=0 ts=69f3bde0 cx=c_pps a=wEP8DlPgTf/vqF+yE6f9lg==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=EUspDBNiAAAA:8 a=C-Hl0FBBUL-qwPW0LAkA:9 a=bBxd6f-gb0O0v-kibOvt:22 X-Proofpoint-ORIG-GUID: _AR9kPOSomq1j7fwgh42pgpm65G-Qkti X-Proofpoint-GUID: _AR9kPOSomq1j7fwgh42pgpm65G-Qkti X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-04-30_06,2026-04-30_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 phishscore=0 malwarescore=0 lowpriorityscore=0 impostorscore=0 adultscore=0 suspectscore=0 priorityscore=1501 clxscore=1015 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2604300213 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=pierrick.bouvier@oss.qualcomm.com; helo=mx0b-0031df01.pphosted.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, SPF_HELO_NONE=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: qemu development 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 @qualcomm.com) X-ZM-MESSAGEID: 1777581571250154100 Content-Type: text/plain; charset="utf-8" It allows to access those types before all others, and especially to query target-info types in next type. Signed-off-by: Pierrick Bouvier --- system/runstate.c | 1 - system/vl.c | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/system/runstate.c b/system/runstate.c index 43d60bafedf..770253b467b 100644 --- a/system/runstate.c +++ b/system/runstate.c @@ -981,7 +981,6 @@ void qemu_init_subsystems(void) =20 atexit(qemu_run_exit_notifiers); =20 - module_call_init(MODULE_INIT_QOM_EARLY); module_call_init(MODULE_INIT_QOM); module_call_init(MODULE_INIT_MIGRATION); =20 diff --git a/system/vl.c b/system/vl.c index 0e1fc217b4f..f777a6da1ce 100644 --- a/system/vl.c +++ b/system/vl.c @@ -2888,6 +2888,9 @@ void qemu_init(int argc, char **argv) =20 os_setup_limits(); =20 + /* We initialize early QOM types, which include target-info types. */ + module_call_init(MODULE_INIT_QOM_EARLY); + module_init_info(qemu_modinfo); module_allow_arch(target_name()); =20 --=20 2.43.0 From nobody Thu May 28 00:44:24 2026 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=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1777581569; cv=none; d=zohomail.com; s=zohoarc; b=HiSHdwRJtxVzKiNawmP53iCBuYQRikzbUqYgux+rWe81uqtRxIBpBz0QcjacLorDSCS4T+8dIWAx8+Den/vGF8tgP8IZBnVvhpmsKMQkbMIE+ka2utCM/EaIJNtYjcK4amc00qvs4cEun2ZHSFFTZWW1zBTU9aPGAv0J19WUb4g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1777581569; 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=4wn6h6lW+Df2kPOULV11iyA2ydeEow8w6OKOA1pJM/s=; b=fIZ4jZtx/AlJy6OSYoPHe8uz6ZkdTAbEJ8tDsuu9ee0pjGhPNV0hX/8LSMQ/Aqlb40KhaZNg7Y8UkeXg5nZiSsPRo98lhg2ro3HeNyD1amhlrp4OBEvAIVDsJX8mWo69tpfVolC4QD5Hs8QCRf9VNBN08jHbecwfvxfKj17Q3mY= 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=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1777581569888696.4952963355233; Thu, 30 Apr 2026 13:39:29 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wIYA9-0002vT-9R; Thu, 30 Apr 2026 16:39:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wIYA1-0002nd-Vd for qemu-devel@nongnu.org; Thu, 30 Apr 2026 16:39:02 -0400 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wIY9z-0000v8-Cs for qemu-devel@nongnu.org; Thu, 30 Apr 2026 16:39:01 -0400 Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 63UHY7VT1820428 for ; Thu, 30 Apr 2026 20:38:57 GMT Received: from mail-dy1-f200.google.com (mail-dy1-f200.google.com [74.125.82.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dv6getgfw-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 30 Apr 2026 20:38:57 +0000 (GMT) Received: by mail-dy1-f200.google.com with SMTP id 5a478bee46e88-2ba8013a9e3so2171703eec.0 for ; Thu, 30 Apr 2026 13:38:57 -0700 (PDT) Received: from hu-pbouvier-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2ee3889d628sm2202341eec.6.2026.04.30.13.38.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Apr 2026 13:38:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= 4wn6h6lW+Df2kPOULV11iyA2ydeEow8w6OKOA1pJM/s=; b=GRlyk0Mtg9f7sIw1 T10Qmokj19iPK4UqC+r7/2jsRenCjJxyzohvc0qFdIaqaxeZjO5AMlDKdWDl2qHQ lhuKc+p9rOUcmYGdn/+XIzFnO5UbRqEzv/caWYpGWSw1pM3edmGGeD4UB3ymHayh s5VqQ9zqBfOoT5+eLLtQYd8cRahZxh/IcEoZnNBB0Acooz/RI/IqSj8DmKUxVnYy rrfoD2ktWn3sW2l4V7s5KQlkrC8UxUvsMPFrIlAkOjVC4kBkUa1BIgjxSoFMlpgR xlU9U8g+C4MMWzaKymU4RKp2lgrZpgMP6YXD9jUGPojVWUeSYo8SRsjEoLMdDYng ZnvhwA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1777581536; x=1778186336; 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=4wn6h6lW+Df2kPOULV11iyA2ydeEow8w6OKOA1pJM/s=; b=YO3XxeQT95lPtBMymF2eY73m+OKAncd9EA5zecOS2XxR1bOb3M+OAd++0cd0TNKwQi 6ouSPlekqRtHEkBIyErhHibm4SrKvbcBqo4nwrNZ6Csd76lLR6uYPMWuzv2yRWqGgTH8 t6sVdmhMX40MOD1VQNqTgXyiro3KV/H+4U3/aBDmR+IOOeNL5tAQHnpJa6QegRete1GN NmW9bB2rdt2rwn9RQhvbbVBDdbSOzZBKjuPJg++3qSMCUUufmAiv/osfq/63lRx1DyMv /NJ3dsCzEPpYBElQWhvBs7In96v/88lDYgpHHHdRu9+DEGmIOq/+DT2XBtDlCYzk5tM4 XLlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777581536; x=1778186336; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=4wn6h6lW+Df2kPOULV11iyA2ydeEow8w6OKOA1pJM/s=; b=PoDeKEFIgWLBU8SrH5ehqkyTDQPP8FQehiBXubM5f3dOI3DDbTEgYfRgKasnK6gApE b6ebyqtcKnXQCSHWymaxpT5xja7QVIBGxh4Cj5+E9eGnkzbgIZnxBidO9hMl95rtBSBY Xjpxkz6JQLW15aEhj/Sv3CutpZw45BhODPe2KBRHzfonpPB9xAMIth0GiPMQ9C5Na28G Zf1wW8SSIikn6MUaR1e8p+kmP6JBPJ2EXvwt68bENaVNMsTE7pkuH/Z0zH4gSNyFZI2f m7SZjpndZ58RdhQYO1tMc6TG6Cc6pHcNBrLjc8VJnOLjO4kun7Bal3KvH0aNfHMSkVVb GGcw== X-Gm-Message-State: AOJu0YwqGiCJMKoPu/3y5w0eeNss83ipBRMKcdfKMVYkMXkDMPirwAbm k/SYRaZ3w4N1QaJ3fCMzurjxIcL9Ni76Enc0ryJiYmPtU+JGZ2QLy1t4j3oEfnhDlNytZ3ZYnXV GFXDZ2Ydl12BbDrSvX8xP7b3uV8HkCfjUzh4Az1nJct9tOkv3NX15AxY/pmvPynQDMHGe X-Gm-Gg: AeBDieuZkxx8ibUd5S7DAWS1TKY404v6nLqLSFCB3aNqOuLu9mgipfWrDTZ/JcU2UTD ySGpNpu/T7gUqA+AoGtEgcmGvkXhZVXcj1aNVcYsuSx1S6IF1KT+RuFOXp+jglWPw/drlVHsyJu iNGEkvVvI2qEFupeogr/zMe2XHD1Q+lGUcqvmmw/bShO4j3IAb8TvhJGLR/lndkgE0dlWbZ66Bn 09SfBc/EKd2MpobBrW2OsPxjPNHV2xmobZ2xRNdfwk9ZvrvCUJ0GXbQnWj3luCnrsGShGK+oTzi 2E/YNtbUjTPgZ00zKcIqcfO+qMgD+f7VZhYFuRlF4CRhEDLJwG4oCXIp7N97WFpOGgELAdZuut2 /OVfbIsP673ZXjI5Dw8FGvuCmJWX7tGyEv7BYni4uYLs8dixvTahDTmWiCEO+pP+gXEEW9kljPV ScWWxD+cCXHhptIKnP X-Received: by 2002:a05:7301:4e04:b0:2ca:9b08:e7d2 with SMTP id 5a478bee46e88-2ed3e486e43mr2592732eec.22.1777581536299; Thu, 30 Apr 2026 13:38:56 -0700 (PDT) X-Received: by 2002:a05:7301:4e04:b0:2ca:9b08:e7d2 with SMTP id 5a478bee46e88-2ed3e486e43mr2592722eec.22.1777581535835; Thu, 30 Apr 2026 13:38:55 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , marcandre.lureau@redhat.com, Markus Armbruster , Pierrick Bouvier , Paolo Bonzini , Anton Johansson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Max Filippov , Richard Henderson Subject: [PATCH v3 7/8] target-info-qom: detect target from QOM Date: Thu, 30 Apr 2026 13:38:41 -0700 Message-ID: <20260430203842.29156-8-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260430203842.29156-1-pierrick.bouvier@oss.qualcomm.com> References: <20260430203842.29156-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Authority-Analysis: v=2.4 cv=f6V4wuyM c=1 sm=1 tr=0 ts=69f3bde1 cx=c_pps a=PfFC4Oe2JQzmKTvty2cRDw==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=Um2Pa8k9VHT-vaBCBUpS:22 a=20KFwNOVAAAA:8 a=EUspDBNiAAAA:8 a=0wc84GFNkZAXjcWhtbQA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=6Ab_bkdmUrQuMsNx7PHu:22 X-Proofpoint-GUID: rr4Je6_OaZr8qDwNXXJQu0FWyMAxC_ts X-Proofpoint-ORIG-GUID: rr4Je6_OaZr8qDwNXXJQu0FWyMAxC_ts X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDMwMDIxMyBTYWx0ZWRfX6ZD/MCH25dki n4BiNPS8qnUojoeSLQY0nmeueV+sqYVAqMK7BbQcYEuT/jTQopRw6RB9/UVkJLurvb5mfWpQfqd ttGTEoXRjzCMup39b0LRd+2cQHIBfFbgR1V2FHRyHtAlz35ACZeNzE69WKOEPIzVdg0vzNj02/i uu3MHcAo5pHxF6FnPRQa3irjc0mnzD/7qjBKLFE8hdTK455bTjybDA6pl+LF/w1oem+hQtXmrUW cgX98+j0WTqGs1yITJ47ymD8wXL8Y1LY3qT4KIcDwGZ55uE4xfR+2FJlcNj42okNGc22oL7glrt Y+CcIRNIHR9+NGVbjlb7UM2YuSPlFG1fUV1Ttngj9jBAOb1IjCFxL39S9K8Z0uC882BLfiylf2X FGjvSac8eeD4Re+BcxQcrdasoAF5AazRr3Di6pp5TJ+1FSVpzKwdHbcO8Va8PkmI38WCsghU/nd S+SGTk2r2XVVdQJ5FMA== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-04-30_06,2026-04-30_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 impostorscore=0 suspectscore=0 adultscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 malwarescore=0 priorityscore=1501 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2604300213 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=pierrick.bouvier@oss.qualcomm.com; helo=mx0a-0031df01.pphosted.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, SPF_HELO_NONE=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: qemu development 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 @qualcomm.com) X-ZM-MESSAGEID: 1777581596762154100 For now, we expect only one target to be available at runtime. This will change with the single-binary and we'll detect which one to use dynamically. Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Pierrick Bouvier --- include/qemu/target-info-qom.h | 2 ++ system/vl.c | 2 ++ target-info-qom.c | 16 ++++++++++++++++ 3 files changed, 20 insertions(+) diff --git a/include/qemu/target-info-qom.h b/include/qemu/target-info-qom.h index 585995c7ad0..91be415ed33 100644 --- a/include/qemu/target-info-qom.h +++ b/include/qemu/target-info-qom.h @@ -25,4 +25,6 @@ typedef struct TargetInfoQomClass { =20 OBJECT_DECLARE_TYPE(TargetInfoQom, TargetInfoQomClass, TARGET_INFO) =20 +void target_info_qom_set_target(void); + #endif /* QEMU_TARGET_INFO_QOM_H */ diff --git a/system/vl.c b/system/vl.c index f777a6da1ce..b19ea4448ab 100644 --- a/system/vl.c +++ b/system/vl.c @@ -28,6 +28,7 @@ #include "qemu/units.h" #include "qemu/module.h" #include "qemu/target-info.h" +#include "qemu/target-info-qom.h" #include "exec/cpu-common.h" #include "exec/page-vary.h" #include "hw/core/qdev-properties.h" @@ -2890,6 +2891,7 @@ void qemu_init(int argc, char **argv) =20 /* We initialize early QOM types, which include target-info types. */ module_call_init(MODULE_INIT_QOM_EARLY); + target_info_qom_set_target(); =20 module_init_info(qemu_modinfo); module_allow_arch(target_name()); diff --git a/target-info-qom.c b/target-info-qom.c index ba2c7923760..9d1f50ffcab 100644 --- a/target-info-qom.c +++ b/target-info-qom.c @@ -36,3 +36,19 @@ static const TypeInfo target_info_parent_type =3D { }; =20 DEFINE_TARGET_INFO_TYPE(target_info_parent_type) + +static const TargetInfo *target_info_ptr; + +void target_info_qom_set_target(void) +{ + g_autoptr(GSList) targets =3D object_class_get_list(TYPE_TARGET_INFO, = false); + + size_t num_found =3D g_slist_length(targets); + if (num_found !=3D 1) { + error_setg(&error_fatal, num_found =3D=3D 0 ? + "no target-info is available" : + "more than one target-info is available"); + } + + target_info_ptr =3D TARGET_INFO_CLASS(targets->data)->target_info; +} --=20 2.43.0 From nobody Thu May 28 00:44:24 2026 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=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1777581569; cv=none; d=zohomail.com; s=zohoarc; b=IcZK5P+wnpVxgwyDN2LCDob+hU+0OrCG9keujO5Wg1n8gdLfpbwqe/YjlFmJuDLqetulFkw5zWbiF9+vUQGfjI5Tbm51bmfc1UNbRti7qP0SpwMCX9xyaDAcrvw8rvmZPe2kAq2NEY54o8gvdmnmqAJ+DJRt1lRzgmmoamASFww= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1777581569; 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=hZes4Iz/n2z3PSgBJPJ4zqNyNDt9ZVsJJimlYuxnvug=; b=gx1Piws26631lI5fcyHV2Bz/UXxAQ0++n2EEiy2LZ6LfG/2kkqFcFlz0WV/e4M22TgIRbMixQCChQyG0mRI/jvyv3WSmljOH7/K4j8jGbs5PEP+dbDGghpaEfs7X2s5pl2g5OqxHKXOybtuEwIpk/8hOoqBWbMJg3Ih/i8tafCY= 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=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1777581569806752.2534566240718; Thu, 30 Apr 2026 13:39:29 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wIYA5-0002px-TH; Thu, 30 Apr 2026 16:39:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wIYA1-0002nc-QR for qemu-devel@nongnu.org; Thu, 30 Apr 2026 16:39:02 -0400 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wIY9z-0000vT-Rr for qemu-devel@nongnu.org; Thu, 30 Apr 2026 16:39:01 -0400 Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 63UIVwxM2481136 for ; Thu, 30 Apr 2026 20:38:58 GMT Received: from mail-dy1-f198.google.com (mail-dy1-f198.google.com [74.125.82.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dv7x6j2y0-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 30 Apr 2026 20:38:58 +0000 (GMT) Received: by mail-dy1-f198.google.com with SMTP id 5a478bee46e88-2c0f6593ef5so2083318eec.1 for ; Thu, 30 Apr 2026 13:38:58 -0700 (PDT) Received: from hu-pbouvier-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2ee3889d628sm2202341eec.6.2026.04.30.13.38.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Apr 2026 13:38:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= hZes4Iz/n2z3PSgBJPJ4zqNyNDt9ZVsJJimlYuxnvug=; b=BchcbsPfMpZP+Sid 99c7B6PMRTOpAaOuQdOpqomphl6C9qbR2BHw1seiKjKhoVHYvKHYTZwH4DpkA/kg xd4oNBpSSuRPYxNHkHDscl/Nou1/1uSPSFO6+1hZkYWpdT0Fn5rUVbw37nUP/s76 OwynRmCPK1AEAin9l0C+CAB1nxQHwiKCRv/XAu9igJAH+rVonBU2IDNlDSjgBmi1 D36/Tsrn7aDUcXqqhhHuop9VxEbTr/Z/spf942VKh8HffW+SfZeldCPdNj7TnRaq /B4YhXuZ+3bnrUk8ZCQQSBULwNKefv/yb4zjk8qa0CMoq/E+kGktj9IUHdzzP3tK BMZe4Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1777581537; x=1778186337; 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=hZes4Iz/n2z3PSgBJPJ4zqNyNDt9ZVsJJimlYuxnvug=; b=Zn2KlbCpHnpMhYZRXmQ15VdOySAH8RjjR3tPNw00n6ByIyQo0HmyosHdNm5IgRPMhq C5uGijdX8IEOOVnUMXnjSUzO4m+gsLNBEGFcmBh6rZUFh13H2DgHBLzMEwRkWI2AGKO6 SSwH25QQ4wUIo8Xf4HL3iDfynrCjR9AtsxR7Nl0XbxIakBoKjN4+QNX4nXsPZAdM1uyU ez7wP1sYaNg1oO9H+m6AGrvFYR79RV6BzfEzNWswiT5u5FssmNZ56aERoKF1mGQlGdtu /2oPuwJ3btcuz9HVaNlOHvn0u/IBuFPjjE6F4nvXJl66E7nfQg6SXdDgqErdwtq6Q6g4 Kf+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777581537; x=1778186337; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=hZes4Iz/n2z3PSgBJPJ4zqNyNDt9ZVsJJimlYuxnvug=; b=DkQ6id4AfPVHvdH4kM78lzSfs9JZMZ/UnXtywrXcGecfYVTdBtJrSAB8ahEpg+zfb3 0eYke/j72d/eOrzFSvwlylsfDL5MaCQMIh8flrD3Pc/fYbkj2Ei6Il0pAGvDTn7y5bhA tQZ498b1LIJH7vQ/KLCXvwWWirblW3H40g/qctRXlbUiKXY+9UpabId/4szZEhfrQZI4 VB1eOCDoN2UgDLe7e5MeK/K1Sl221GQZ2e/fgAKSlpAMz3p0HKiZlFr+ekjk72twJryl 8A4/1FjZzYJal/tH4FAHW7WwRavwe4lBu1YSesYE8EY2o0bJCLDDkKkQR/oq5mtoWKZj lslQ== X-Gm-Message-State: AOJu0YxEMUYHqB/qFCG/QS6p7jkqsbxBFc1FV4iBewOJTILkOosTkebf Iudfx7G2INPW5GZqOrJLmH/Z+Qm8v4V9RVTQT4eabdep7vwdcUq1I2K0Zx7VgXmeHSbsyCdjcnb j4lqrurqgcVA4sKxUKb4B9GWXYa3Fa1WCJMO/XrZZtkC06gLc6AJMRxcs0kBDTmNPxub1 X-Gm-Gg: AeBDievfgF8Ol3walHH2U2o+u8s3BkYqF7Lo3WmJGOlhrsdyGnrh5ZfJD4GB7GoxpOX KOo2LmgrrkvRw1XuwwLbZrP1VLBRe0qV2sJfNu8Pb+5WbxgTyUnlsK4ze7piNM2H7kLNTzEe+XR UJ7wE8eba3xId0Ej5TxqDFdlf8gvqjn4Y0oCQl09Y4IcMX735JdZ2kbN5Megb2sB/q86PEtrbV/ WQxQDxwcq4Ouef2TvLP15aOn9qmaB0ugZ29Z+lV9IYzhroksVw83AqZp7xp6jMsSbEtfSDQbnBm tMboT8SBWSshbqAAkAoHwNQ8ngoZXzCK7w4bWJfFonNIyhHL/HbXtFNbQZIH7+BNcb3QHXHlOkl lyK9IW1S9Pj9tZQc85y6gqzCnvnNVXw/aCMkdSEArwB10KCWR2sfWn6RYqb5Iw7OKW6sk7Sscn0 a8Ck7kP5+Hho6nxljb X-Received: by 2002:a05:7300:7c10:b0:2dd:6937:79d6 with SMTP id 5a478bee46e88-2ed3bef2dfcmr2469460eec.7.1777581537320; Thu, 30 Apr 2026 13:38:57 -0700 (PDT) X-Received: by 2002:a05:7300:7c10:b0:2dd:6937:79d6 with SMTP id 5a478bee46e88-2ed3bef2dfcmr2469434eec.7.1777581536815; Thu, 30 Apr 2026 13:38:56 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , marcandre.lureau@redhat.com, Markus Armbruster , Pierrick Bouvier , Paolo Bonzini , Anton Johansson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Max Filippov , Richard Henderson Subject: [PATCH v3 8/8] target-info: replace target_info() in system-mode Date: Thu, 30 Apr 2026 13:38:42 -0700 Message-ID: <20260430203842.29156-9-pierrick.bouvier@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260430203842.29156-1-pierrick.bouvier@oss.qualcomm.com> References: <20260430203842.29156-1-pierrick.bouvier@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: 8w7WoVRMN0pp-ij5Ee9V_kDBPcWF9HYr X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDMwMDIxMyBTYWx0ZWRfXwywCYK21FPlt wlKv5frJcNq94EC5DSDH4LxSIxW8VMEJ4nlE8zSEQH7y8DiYlkZyG/IZiWXJg5NzoHMAwlTGtgR QlUhT/Kp4iPJ2+pXnIeqqgeqMYdgSz4PnTfe+u5I3Ev7Dsx3i8wZfuOs+LuvjWQFL18OPmlQvw6 bzRMbN3cCvdeKH2yjRgmAMO3Uk7WHm8uXJfYGpgWHRS+WSEELI8WTpAVgbE8o0kXohm6jgFMDgX UacZ4D3MH+wSFllAM9ECtszduQqcwG8XSWffG1uzTqs2Sf1tTY47eA73h44G5OURd6YDRbZ6zxK r8rl+xnhX3jrvP1asqJ2XYJ26ktVqgMYwf1kanBluC7XyFm+Qo1KFyCsbInFGcA+XOPFi74ghZS Ws838XujHksNduhlUWIIjEv/oxC8A3fFtlPGUv4ujD+XnCmTzgcbrvpQMugWF0YHJTiR1qZ1m7g ezXJvKOHhnHibscTXaw== X-Authority-Analysis: v=2.4 cv=XoTK/1F9 c=1 sm=1 tr=0 ts=69f3bde2 cx=c_pps a=wEP8DlPgTf/vqF+yE6f9lg==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_K5XuSEh1TEqbUxoQ0s3:22 a=20KFwNOVAAAA:8 a=EUspDBNiAAAA:8 a=Ar47GhOyGom1hrc3c0YA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=bBxd6f-gb0O0v-kibOvt:22 X-Proofpoint-ORIG-GUID: 8w7WoVRMN0pp-ij5Ee9V_kDBPcWF9HYr X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-04-30_06,2026-04-30_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 adultscore=0 bulkscore=0 clxscore=1015 phishscore=0 lowpriorityscore=0 malwarescore=0 impostorscore=0 spamscore=0 priorityscore=1501 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2604300213 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=pierrick.bouvier@oss.qualcomm.com; helo=mx0a-0031df01.pphosted.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, SPF_HELO_NONE=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: qemu development 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 @qualcomm.com) X-ZM-MESSAGEID: 1777581596742154100 We now can use TargetInfo information available from QOM, and remove duplicated target_info() symbol. Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Pierrick Bouvier --- include/qemu/target-info-init.h | 5 ----- target-info-qom.c | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/qemu/target-info-init.h b/include/qemu/target-info-ini= t.h index 7e6f5d90ec4..9f91fc64d1f 100644 --- a/include/qemu/target-info-init.h +++ b/include/qemu/target-info-init.h @@ -50,11 +50,6 @@ typedef struct TargetInfoQomTargetClass { OBJECT_DECLARE_TYPE(TargetInfoQomTarget, TargetInfoQomTargetClass, TARGET_= INFO_TARGET) =20 #define target_info_init(ti_var) = \ -const TargetInfo *target_info(void) = \ -{ = \ - return &ti_var; = \ -} = \ - = \ static void target_info_qom_class_init(ObjectClass *oc, const void * data)= \ { = \ TargetInfoQomTargetClass *klass =3D TARGET_INFO_TARGET_CLASS(oc); = \ diff --git a/target-info-qom.c b/target-info-qom.c index 9d1f50ffcab..cc470b3b4d6 100644 --- a/target-info-qom.c +++ b/target-info-qom.c @@ -39,6 +39,11 @@ DEFINE_TARGET_INFO_TYPE(target_info_parent_type) =20 static const TargetInfo *target_info_ptr; =20 +const TargetInfo *target_info(void) +{ + return target_info_ptr; +} + void target_info_qom_set_target(void) { g_autoptr(GSList) targets =3D object_class_get_list(TYPE_TARGET_INFO, = false); --=20 2.43.0