Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/2233250/?format=api
{ "id": 2233250, "url": "http://patchwork.ozlabs.org/api/1.2/patches/2233250/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260505224826.2698753-5-pierrick.bouvier@oss.qualcomm.com/", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/1.2/projects/14/?format=api", "name": "QEMU Development", "link_name": "qemu-devel", "list_id": "qemu-devel.nongnu.org", "list_email": "qemu-devel@nongnu.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260505224826.2698753-5-pierrick.bouvier@oss.qualcomm.com>", "list_archive_url": null, "date": "2026-05-05T22:48:24", "name": "[v4,4/6] target-info: introduce TargetInfo in QOM", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "bdfa200087de8c306d0f19cbd1352fb83ada1b59", "submitter": { "id": 93152, "url": "http://patchwork.ozlabs.org/api/1.2/people/93152/?format=api", "name": "Pierrick Bouvier", "email": "pierrick.bouvier@oss.qualcomm.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260505224826.2698753-5-pierrick.bouvier@oss.qualcomm.com/mbox/", "series": [ { "id": 502907, "url": "http://patchwork.ozlabs.org/api/1.2/series/502907/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=502907", "date": "2026-05-05T22:48:20", "name": "single-binary: deduplicate target_info()", "version": 4, "mbox": "http://patchwork.ozlabs.org/series/502907/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2233250/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2233250/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256\n header.s=qcppdkim1 header.b=g4FXS12S;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com\n header.a=rsa-sha256 header.s=google header.b=izTk8+N7;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists1p.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g9DGr6CjMz1yJq\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 06 May 2026 08:49:40 +1000 (AEST)", "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists1p.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1wKOZC-0006Pd-KL; Tue, 05 May 2026 18:48:38 -0400", "from eggs.gnu.org ([2001:470:142:3::10])\n by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <pierrick.bouvier@oss.qualcomm.com>)\n id 1wKOZB-0006P0-FC\n for qemu-devel@nongnu.org; Tue, 05 May 2026 18:48:37 -0400", "from mx0b-0031df01.pphosted.com ([205.220.180.131])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <pierrick.bouvier@oss.qualcomm.com>)\n id 1wKOZ9-0006A9-N6\n for qemu-devel@nongnu.org; Tue, 05 May 2026 18:48:37 -0400", "from pps.filterd (m0279873.ppops.net [127.0.0.1])\n by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id\n 645LxGnR3502578\n for <qemu-devel@nongnu.org>; Tue, 5 May 2026 22:48:34 GMT", "from mail-dy1-f199.google.com (mail-dy1-f199.google.com\n [74.125.82.199])\n by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dyhqfa28n-1\n (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT)\n for <qemu-devel@nongnu.org>; Tue, 05 May 2026 22:48:34 +0000 (GMT)", "by mail-dy1-f199.google.com with SMTP id\n 5a478bee46e88-2f2d983d109so1920444eec.0\n for <qemu-devel@nongnu.org>; Tue, 05 May 2026 15:48:34 -0700 (PDT)", "from hu-pbouvier-lv.qualcomm.com (Global_NAT1.qualcomm.com.\n [129.46.96.20]) by smtp.gmail.com with ESMTPSA id\n 5a478bee46e88-2f56d4cf2fdsm898953eec.8.2026.05.05.15.48.32\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 05 May 2026 15:48:32 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h=\n cc:content-transfer-encoding:date:from:in-reply-to:message-id\n :mime-version:references:subject:to; s=qcppdkim1; bh=AhTTTeOqFwk\n W4Zdn/+Bo3rQ7uW49WhpNkEu1S14lZqM=; b=g4FXS12SE9m4pId1ae2+f5UsSNg\n B4uTcGifBFxUPV8BBb09y6yjJfxSRMxH9F19UEePof39QH0OD+fRVe6lhmIVREnj\n awegfQ+BCa6gobQqq1UEQWhFimkII44jT6Su6nu8X9bTQpgoWNeV2qcFlBlUogXw\n GexBch8Y38TyO0PwbGiCktyv1c4lWC5ZbuBoYkw4yqES5gax4EFHgwguGBYSOsKp\n d7i8nQFmK0ILKZ/0ezVaIBrQfcxlCK+c+JhZRdUvRoSf5DcVtF5H0iAHudonTXrn\n FuRjCnXbREonQjrOPuSbgpno/31V8qKZfwT2WWIpyuhqca8nFrE1iq+QjOA==", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=oss.qualcomm.com; s=google; t=1778021314; x=1778626114; darn=nongnu.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=AhTTTeOqFwkW4Zdn/+Bo3rQ7uW49WhpNkEu1S14lZqM=;\n b=izTk8+N7DjH2ni/I6ru4Hb7Btzt8Lc6QTYwFXQpF35CXY2Z5Sd4tEW9cs7gK2eh+4O\n EtYK8ji4OdzcyDhllwpdR8rEmdyifGtlNhcosaTfE3lXMA3+7etJBkWA1vUcLY5PLxKk\n YowD/9eCoXhot0Hs19WlbOGmV53vjiJ7Y5Dc4Jlb+DO597vrNsNSvbdMQ8tyUkAF87XX\n ux28qihaIVgi42J54QA3IAPDABrm/NY/p++aoyyuZInSol0oWg/5LxCgaVWcGmSbZRq/\n WyXkHAd8I7Qexg52RZW+yRQIHanOJZzZnkqzHo5sx2fpjGAfdBWIAdbCEkLzCg86lQ4G\n a9FA==" ], "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1778021314; x=1778626114;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=AhTTTeOqFwkW4Zdn/+Bo3rQ7uW49WhpNkEu1S14lZqM=;\n b=PywRAFfQGCfLKVjonnBR1KLlbdIk0kEqA89+OG4cJ4sMTl2GqLPQ34etb0mjjhEdWr\n E593kTJGouY+jXw+rNQWLDMYBKWM4D70v3qZ+Zqp6aokLKI6KXLln2hDA65p8DNgey0p\n /N4wZxi8hTBtzgdoS2ck2JG8mCTSXL2DleRYabq8RUwFIfpZ+bPDJmt8Yk3RnnWprMCc\n XxWWcsHFKzmzyGkmY8acT74n5hhbtuKJPWdKT4HA8rsYKo/8HCy9mRN+NwlfYimZ8OeP\n eUbXIx/ZNxJq0nymQgewsA6lYnXniuMq+V/BY9jfKZZPSYsNZc6XMqDQ4Kcpqjr/Q/Fc\n awlA==", "X-Gm-Message-State": "AOJu0Yw5kRaczRDCXX4ID9rwVNaCIMI+oEjrJSrgmOE9rZFXzn4WQNUw\n 1kEm4sbWNIy7o7NKdgBSfZBHNvSngKw+R1+LxhpP8JCExaAwxYxN6EjpsgdeKT4qeCc/c8/KjDN\n ugOLGdUwTrSKUZM3JE8bcdcpjGMHPP1mNYj9z/DjX61V+fq+mVH0yTzQODC3MxJwqehYb", "X-Gm-Gg": "AeBDievrA0ZdWEz2t2L9AlAEQHB5QIGk+zvHCHRVUfJx4SJHVm/QzhjtoligcZQdjiZ\n dNlQDcCQL3snqSATCFu6p46+EX70x9SusGv6TMgiBbvOFQN65GBSgHS6O6G5r95Nks1ocEsM/0/\n qZDSKTYDkCdkUrwsPkZ2tWZRMOf3DKCQ/U7XQFBF8RlUR5iooB+s+SpymRpXrbWPoMITW4jPPCx\n QkGHCiYe8jZlMc4HbMz8HHjJhu0cWGsvUOm2eyKpcNnXgbyuqgGbr/nXyK188HoufF+jDnx1PW6\n tKHxd9+lr1cfjiYgrarED9RyMqrc4P5awPSM15nEcEVQgFG6BnpFIQ7Z6HBmdSY4GF0/cZeNxM1\n TbXjsVS7MKOPsvWYpCLlJSKHh1d4XOxTtQwar9RZZ91oAtpnSR1v1X6kW18H71FcYcRO8c/7NWg\n Jm3fJB1bViZAyorDKE", "X-Received": [ "by 2002:a05:693c:3013:b0:2e7:af57:3b72 with SMTP id\n 5a478bee46e88-2f54b89a18bmr639800eec.29.1778021313543;\n Tue, 05 May 2026 15:48:33 -0700 (PDT)", "by 2002:a05:693c:3013:b0:2e7:af57:3b72 with SMTP id\n 5a478bee46e88-2f54b89a18bmr639781eec.29.1778021312890;\n Tue, 05 May 2026 15:48:32 -0700 (PDT)" ], "From": "Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>", "To": "qemu-devel@nongnu.org", "Cc": "Anton Johansson <anjo@rev.ng>, marcandre.lureau@redhat.com,\n Markus Armbruster <armbru@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>,\n Richard Henderson <richard.henderson@linaro.org>,\n Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>,\n Max Filippov <jcmvbkbc@gmail.com>,\n =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>, =?utf-8?q?Dani?=\n\t=?utf-8?q?el_P=2E_Berrang=C3=A9?= <berrange@redhat.com>", "Subject": "[PATCH v4 4/6] target-info: introduce TargetInfo in QOM", "Date": "Tue, 5 May 2026 15:48:24 -0700", "Message-ID": "<20260505224826.2698753-5-pierrick.bouvier@oss.qualcomm.com>", "X-Mailer": "git-send-email 2.43.0", "In-Reply-To": "<20260505224826.2698753-1-pierrick.bouvier@oss.qualcomm.com>", "References": "<20260505224826.2698753-1-pierrick.bouvier@oss.qualcomm.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-Proofpoint-Spam-Details-Enc": "AW1haW4tMjYwNTA1MDIyMiBTYWx0ZWRfX6Vv1fgSu6DkO\n BdXI44o/iWx4Y9jYGsgIRWkyPvHMjUjVq3DMQ0tbk2gnN78PmsxM8p7u2yCe3XfW1N/B/Xrrt8B\n ceWyI/b7qVkUxC1zJLiZW4ujArvSI8De1Bugm5+ynEZnnznw/EZKCJlsWtD0MbBOvh/O/EguOza\n SfUirxEupA0XMxy08Khg17bXIDt4vcGfax8znG70Zn4VxnuComxMdeN1NTQFcWJbUL6O+Jh0dUN\n qvDYdEXes5JAL1sHprieYmlx74JSMXqMB92Oq4+ia//Ms+auWeMJl6bVlbmW6TAV1DBDm4Ab6Ny\n ILk9QdpRYCWr77YDRxOjz8zEpXxEeUaFBa2uhsmKvwB7Tli0QX2AtQYu/hZI5qSi1a5ZVEtZXlo\n /cZ9XKcf0DdeWvm1UUAp5aA/lRERffuOXyQqXoXcc1mcHo8iH3SGyaLtIlKa7AH+vWfqCTGOE3Q\n UND9g+WJs0OgZM/nGbw==", "X-Proofpoint-ORIG-GUID": "iSTjazkW4zrmfIqkbHYR7DMtAbHZ6uXq", "X-Proofpoint-GUID": "iSTjazkW4zrmfIqkbHYR7DMtAbHZ6uXq", "X-Authority-Analysis": "v=2.4 cv=NPvlPU6g c=1 sm=1 tr=0 ts=69fa73c2 cx=c_pps\n a=cFYjgdjTJScbgFmBucgdfQ==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17\n a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22\n a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=EUspDBNiAAAA:8\n a=ifg725Mek7oY8M_gCSsA:9 a=scEy_gLbYbu1JhEsrz4S:22", "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49\n definitions=2026-05-05_02,2026-04-30_02,2025-10-01_01", "X-Proofpoint-Spam-Details": "rule=outbound_notspam policy=outbound score=0\n malwarescore=0 lowpriorityscore=0 spamscore=0 priorityscore=1501\n clxscore=1015 suspectscore=0 phishscore=0 bulkscore=0 adultscore=0\n impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc=\n route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000\n definitions=main-2605050222", "Received-SPF": "pass client-ip=205.220.180.131;\n envelope-from=pierrick.bouvier@oss.qualcomm.com;\n 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,\n DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001,\n 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 <qemu-devel.nongnu.org>", "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>", "List-Archive": "<https://lists.nongnu.org/archive/html/qemu-devel>", "List-Post": "<mailto:qemu-devel@nongnu.org>", "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>", "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>", "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org", "Sender": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org" }, "content": "For the single-binary, we want to be able to retrieve at runtime the\ncurrent target among the different ones available.\nA consequence is that we can't rely on existing target_info() definition\nsince it will create a conflict once more than one target is available.\n\nTo solve this, we add TargetInfo in QOM, with this hierarchy.\nWe define one class \"target-info-X\" per target, that inherits from\nabstract class \"target-info\". Using concrete vs abstract class ensure we\ncan easily filter \"target-info-X\" from all QOM types.\nAssociated TargetInfo is directly set through class initialization,\nwithout relying on any instance.\n\nFor user mode, we simply define target_info() like it was done\npreviously. In this patch, we keep the same definition for system-mode\nalso, and it will be replaced in next commits.\n\nWe will introduce detection of target from QOM, so we need to make sure\nthose types are registered early.\n\nSigned-off-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>\n---\n include/qemu/module.h | 1 +\n include/qemu/target-info-init.h | 57 +++++++++++++++++++++++++++++++++\n include/qemu/target-info-qom.h | 28 ++++++++++++++++\n system/vl.c | 2 ++\n target-info-qom.c | 14 ++++++++\n 5 files changed, 102 insertions(+)\n create mode 100644 include/qemu/target-info-qom.h", "diff": "diff --git a/include/qemu/module.h b/include/qemu/module.h\nindex 9885ac9afb3..fccf017bf9e 100644\n--- a/include/qemu/module.h\n+++ b/include/qemu/module.h\n@@ -43,6 +43,7 @@ typedef enum {\n MODULE_INIT_MIGRATION,\n MODULE_INIT_BLOCK,\n MODULE_INIT_OPTS,\n+ MODULE_INIT_TARGET_INFO,\n MODULE_INIT_QOM,\n MODULE_INIT_TRACE,\n MODULE_INIT_XEN_BACKEND,\ndiff --git a/include/qemu/target-info-init.h b/include/qemu/target-info-init.h\nindex c781cfc0590..859451c672e 100644\n--- a/include/qemu/target-info-init.h\n+++ b/include/qemu/target-info-init.h\n@@ -12,10 +12,67 @@\n #ifndef TARGET_INFO_DEF_H\n #define TARGET_INFO_DEF_H\n \n+#define DEFINE_TARGET_INFO_TYPE(info) \\\n+static void do_qemu_init_target_info(void) \\\n+{ \\\n+ type_register_static(&info); \\\n+} \\\n+module_init(do_qemu_init_target_info, MODULE_INIT_TARGET_INFO)\n+\n+#ifdef COMPILING_PER_TARGET\n+#ifdef CONFIG_USER_ONLY\n+\n+/*\n+ * User mode does not support multiple targets in the same binary, so just\n+ * define target_info().\n+ */\n #define target_info_init(ti_var) \\\n const TargetInfo *target_info(void) \\\n { \\\n return &ti_var; \\\n }\n \n+#else /* CONFIG_USER_ONLY */\n+\n+#include \"qemu/target-info-qom.h\"\n+#include \"qom/object.h\"\n+\n+#define TYPE_TARGET_INFO_TARGET TYPE_TARGET_INFO\"-\"TARGET_NAME\n+\n+typedef struct TargetInfoQomTarget {\n+ TargetInfoQom parent;\n+} TargetInfoQomTarget;\n+\n+typedef struct TargetInfoQomTargetClass {\n+ TargetInfoQomClass parent_class;\n+} TargetInfoQomTargetClass;\n+\n+OBJECT_DECLARE_TYPE(TargetInfoQomTarget, TargetInfoQomTargetClass, TARGET_INFO_TARGET)\n+\n+#define target_info_init(ti_var) \\\n+const TargetInfo *target_info(void) \\\n+{ \\\n+ return &ti_var; \\\n+} \\\n+ \\\n+static void target_info_qom_class_init(ObjectClass *oc, const void * data) \\\n+{ \\\n+ TargetInfoQomTargetClass *klass = TARGET_INFO_TARGET_CLASS(oc); \\\n+ klass->parent_class.target_info = &ti_var; \\\n+} \\\n+ \\\n+static const TypeInfo target_info_qom_target_type_info = { \\\n+ .name = TYPE_TARGET_INFO_TARGET, \\\n+ .parent = TYPE_TARGET_INFO, \\\n+ .instance_size = sizeof(TargetInfoQomTarget), \\\n+ .class_size = sizeof(TargetInfoQomTargetClass), \\\n+ .class_init = target_info_qom_class_init, \\\n+ .abstract = false, \\\n+}; \\\n+ \\\n+DEFINE_TARGET_INFO_TYPE(target_info_qom_target_type_info)\n+\n+#endif /* CONFIG_USER_ONLY */\n+#endif /* COMPILING_PER_TARGET */\n+\n #endif /* TARGET_INFO_DEF_H */\ndiff --git a/include/qemu/target-info-qom.h b/include/qemu/target-info-qom.h\nnew file mode 100644\nindex 00000000000..585995c7ad0\n--- /dev/null\n+++ b/include/qemu/target-info-qom.h\n@@ -0,0 +1,28 @@\n+/*\n+ * QEMU target info QOM types\n+ *\n+ * Copyright (c) Qualcomm\n+ *\n+ * SPDX-License-Identifier: GPL-2.0-or-later\n+ */\n+\n+#ifndef QEMU_TARGET_INFO_QOM_H\n+#define QEMU_TARGET_INFO_QOM_H\n+\n+#include \"qemu/target-info-impl.h\"\n+#include \"qom/object.h\"\n+\n+#define TYPE_TARGET_INFO \"target-info\"\n+\n+typedef struct TargetInfoQom {\n+ Object parent_obj;\n+} TargetInfoQom;\n+\n+typedef struct TargetInfoQomClass {\n+ ObjectClass parent_class;\n+ const TargetInfo *target_info;\n+} TargetInfoQomClass;\n+\n+OBJECT_DECLARE_TYPE(TargetInfoQom, TargetInfoQomClass, TARGET_INFO)\n+\n+#endif /* QEMU_TARGET_INFO_QOM_H */\ndiff --git a/system/vl.c b/system/vl.c\nindex 516ed7890b4..2b6739271ba 100644\n--- a/system/vl.c\n+++ b/system/vl.c\n@@ -2890,6 +2890,8 @@ void qemu_init(int argc, char **argv)\n \n os_setup_limits();\n \n+ module_call_init(MODULE_INIT_TARGET_INFO);\n+\n module_init_info(qemu_modinfo);\n module_allow_arch(target_name());\n \ndiff --git a/target-info-qom.c b/target-info-qom.c\nindex 7fd58d24818..ba2c7923760 100644\n--- a/target-info-qom.c\n+++ b/target-info-qom.c\n@@ -7,7 +7,11 @@\n */\n \n #include \"qemu/osdep.h\"\n+#include \"qapi/error.h\"\n #include \"qom/object.h\"\n+#include \"qemu/target-info-impl.h\"\n+#include \"qemu/target-info-init.h\"\n+#include \"qemu/target-info-qom.h\"\n #include \"hw/arm/machines-qom.h\"\n \n static const TypeInfo target_info_types[] = {\n@@ -22,3 +26,13 @@ static const TypeInfo target_info_types[] = {\n };\n \n DEFINE_TYPES(target_info_types)\n+\n+static const TypeInfo target_info_parent_type = {\n+ .name = TYPE_TARGET_INFO,\n+ .parent = TYPE_OBJECT,\n+ .instance_size = sizeof(TargetInfoQom),\n+ .class_size = sizeof(TargetInfoQomClass),\n+ .abstract = true,\n+};\n+\n+DEFINE_TARGET_INFO_TYPE(target_info_parent_type)\n", "prefixes": [ "v4", "4/6" ] }