Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2230796/?format=api
{ "id": 2230796, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2230796/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260430035626.3511676-3-pierrick.bouvier@oss.qualcomm.com/", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/1.1/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": "" }, "msgid": "<20260430035626.3511676-3-pierrick.bouvier@oss.qualcomm.com>", "date": "2026-04-30T03:56:21", "name": "[v2,2/7] target-info: introduce TargetInfo in QOM", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "15cc4a523e65c8817f654c35ebf2ea36b0b62748", "submitter": { "id": 93152, "url": "http://patchwork.ozlabs.org/api/1.1/people/93152/?format=api", "name": "Pierrick Bouvier", "email": "pierrick.bouvier@oss.qualcomm.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260430035626.3511676-3-pierrick.bouvier@oss.qualcomm.com/mbox/", "series": [ { "id": 502185, "url": "http://patchwork.ozlabs.org/api/1.1/series/502185/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=502185", "date": "2026-04-30T03:56:26", "name": "single-binary: deduplicate target_info()", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/502185/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2230796/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2230796/checks/", "tags": {}, "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=G9wuj7rj;\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=YLJP1vOv;\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 4g5gzB36Srz1yHZ\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 30 Apr 2026 14:23:50 +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 1wIIw1-0007K7-0u; Thu, 30 Apr 2026 00:23:33 -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 1wIIw0-0007Jw-16\n for qemu-devel@nongnu.org; Thu, 30 Apr 2026 00:23:32 -0400", "from mx0a-0031df01.pphosted.com ([205.220.168.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 1wIIvy-0002F3-74\n for qemu-devel@nongnu.org; Thu, 30 Apr 2026 00:23:31 -0400", "from pps.filterd (m0279866.ppops.net [127.0.0.1])\n by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id\n 63TKbLCw1809063\n for <qemu-devel@nongnu.org>; Thu, 30 Apr 2026 03:56:35 GMT", "from mail-dl1-f69.google.com (mail-dl1-f69.google.com\n [74.125.82.69])\n by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4duj6tb04y-1\n (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT)\n for <qemu-devel@nongnu.org>; Thu, 30 Apr 2026 03:56:35 +0000 (GMT)", "by mail-dl1-f69.google.com with SMTP id\n a92af1059eb24-12dbf4f678eso2193358c88.0\n for <qemu-devel@nongnu.org>; Wed, 29 Apr 2026 20:56:35 -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 a92af1059eb24-12de32173acsm7159443c88.5.2026.04.29.20.56.33\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 29 Apr 2026 20:56:33 -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=xfLeX6nDP2/\n hjLdoKs0SPJ5/YVK0jgrqpGAQdDj4cIQ=; b=G9wuj7rjzq+U71GY7nH2E3TasjZ\n TgHw5brOlW2RRKz28a+lwuPGhfN4DeM5ZOsMfMSQg5EQjjDU2uHC0Kr12KZsthaY\n 72nhvLCWivFIc4DMCEL5wicyAZooQprp7CARDqzXUGahevd3RYG1nc//s6p7xQhm\n mAwg5rLAPlrga79oYujzzZ7iL1VvVUIw5y1bwuq9kJxyk8nsIpmuc8RxJl09S0Zn\n npSq0i6rtFn7qlvD8YUF+VItbXCHQ3yFo2rjrF7ca36WBgWvXdcvAg3A/hy7gBat\n 6uVL9GQBJkHJYtFmTnJ0L6oCxXxklXJdJLtncRPhemk8e9NK5w4LIJVSc3Q==", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=oss.qualcomm.com; s=google; t=1777521394; x=1778126194; 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=xfLeX6nDP2/hjLdoKs0SPJ5/YVK0jgrqpGAQdDj4cIQ=;\n b=YLJP1vOvqXZ80vV5sMi9JjwXzyz3gLWCTFiMjgofjm2XxVsudNWZcTCJMBPnVJVMLY\n ZEAyGuDmsVGPPVX3U9reTeQXPQ2VowqTufzEmMyxN+Zy8iPCBSCKfuuiqfg7C5j5B/+4\n AHgyhaHn03vWE2t/mo21ScEn5QDWRsCHua/I98gKhKj4T/R8e2Xsby8b0+w/SnjdxY4v\n ZCzqkmT8a4HO366WY2ksOXi3zRKQdkU75w/wi24cMSvGmtUWNghcZnikQ1MDA63cFTjU\n rKKfvzNqfNp214NaMLUfyTHBJoi0TAbjRsrpzZD/suSdigMRrr/LSDYfHGZmutt0u/ww\n 8koQ==" ], "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777521394; x=1778126194;\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=xfLeX6nDP2/hjLdoKs0SPJ5/YVK0jgrqpGAQdDj4cIQ=;\n b=a0rmmFe68T25w3f0Fdx24ygl+gnHsiUawogaZh0KWbp5/61pi1t5qq9B1e2Jh20Jpe\n 7hbW2WkHo2S3XZZve4ifqQqJjFsYWQiRGW/N5GXP8ZqZOlz+hCj9zEAm/3InQvk+OdD2\n ErmH8IFAyg1Bnge5ZR9ao3y7dHZVPsIRpvSvu/4deIPz1nq3HSY28N5LmfaNWpGdpDoF\n u/Zo00aAY899FcLel3Oko1N694hrlaVrK2a9qvGrUONvQg8o+9FXC/yxzZMB/nXS+/sJ\n zhnFztL8pQFOPZEC99+Ol1QWrkYw3LZs+IRcZmpDD7BTOUzu2vgWt/fipNnpuMRbxjFk\n Fgqg==", "X-Gm-Message-State": "AOJu0YyMplZMI6Gv1CasXgpbHA+PCBT4ApAt2mYz1WxXM1q4JWru95Lz\n XNjSteZAZJwFSK4spbeKFXlRn1+uiesPra0OjCYH13Q4iJvL3e2YzZiEwNwUsmvgz4GfGFUCK7x\n HwtK+UkfphezShzPkv1I2RYRyqTSfXSapWJV+ILQZY9x9KbS7V4en33bpKfa47n9bU6NW", "X-Gm-Gg": "AeBDiev6c7F0HYOncpT1gv+ZRL+A/vit+9qqOSNEmcCbiRuWTt8ZXX0bC2ZNCxkUMGS\n PAp8GSUEYFVJiMiOVu643jSZOYIhb2J1YXvzvgDJRTnztkxT+U3Jir2LujmaIBA3j1HXo66V4Fe\n EaKt8j6Byd+dY27z2BbpJSZtdc7+N1pgP30ARHs/3UjA645xOqsKptzErrLwpfKPSLl9XByBRsb\n XJtqKi5DU9jSxLcHdsgbzhGZSJuVhpUdjX+nmDLXnEIDiMIDHU+Gwa3WK8XxiZQ4Zl2QrLhc+9p\n S5jBzBTf+P1kpEWxmDbY9NaT0sglrDIa3f3jGcm+SZa1wmYJepDyrlOhZe06hrEmOfYXMUYwGGa\n LQk24LrnSi2Cq6iY91Oy6r6yf77ZfBpWa1HzX97c940+banTyhzheLBBL6+uZJgFkGZcMrt8mPR\n 9SdixH1p0RG2KRK8E2", "X-Received": [ "by 2002:a05:7022:986:b0:11b:ec5f:1c37 with SMTP id\n a92af1059eb24-12deb01bca8mr649428c88.18.1777521394422;\n Wed, 29 Apr 2026 20:56:34 -0700 (PDT)", "by 2002:a05:7022:986:b0:11b:ec5f:1c37 with SMTP id\n a92af1059eb24-12deb01bca8mr649416c88.18.1777521393912;\n Wed, 29 Apr 2026 20:56:33 -0700 (PDT)" ], "From": "Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>", "To": "qemu-devel@nongnu.org", "Cc": "Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>, =?utf-8?q?Philippe?=\n\t=?utf-8?q?_Mathieu-Daud=C3=A9?= <philmd@linaro.org>,\n Richard Henderson <richard.henderson@linaro.org>,\n Markus Armbruster <armbru@redhat.com>, Anton Johansson <anjo@rev.ng>,\n marcandre.lureau@redhat.com, Paolo Bonzini <pbonzini@redhat.com>,\n Max Filippov <jcmvbkbc@gmail.com>,\n =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= <berrange@redhat.com>", "Subject": "[PATCH v2 2/7] target-info: introduce TargetInfo in QOM", "Date": "Wed, 29 Apr 2026 20:56:21 -0700", "Message-ID": "<20260430035626.3511676-3-pierrick.bouvier@oss.qualcomm.com>", "X-Mailer": "git-send-email 2.43.0", "In-Reply-To": "<20260430035626.3511676-1-pierrick.bouvier@oss.qualcomm.com>", "References": "<20260430035626.3511676-1-pierrick.bouvier@oss.qualcomm.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-Proofpoint-GUID": "7UOZkDwVkLN8nBxHmm9GvHK_VMpf_CnX", "X-Authority-Analysis": "v=2.4 cv=KcHidwYD c=1 sm=1 tr=0 ts=69f2d2f3 cx=c_pps\n a=kVLUcbK0zfr7ocalXnG1qA==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17\n a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22\n a=u7WPNUs3qKkmUXheDGA7:22 a=YMgV9FUhrdKAYTUUvYB2:22 a=EUspDBNiAAAA:8\n a=957eaOmehK1HrViG9FMA:9 a=vr4QvYf-bLy2KjpDp97w:22", "X-Proofpoint-ORIG-GUID": "7UOZkDwVkLN8nBxHmm9GvHK_VMpf_CnX", "X-Proofpoint-Spam-Details-Enc": "AW1haW4tMjYwNDMwMDAzNiBTYWx0ZWRfX8mc6aC9z15tw\n wxKWo+/zzRbWMNEnaK7AujnpNcZquuc0XXSdC0kQa38tmRxUYHvqmNmf/XvQ81vSe72XVc7Pgay\n 3S28u7KrWT17b9W5ddrzkswoldkzL74JTlGsBHeIxVBv6MDKAVUoh15mg72CL55z4VC2xjMgVK2\n AQYDHrYA5Sg8d+WXjROU0cIUXxblp00ppMRolvYbXbPl+CgI8AwRMbAvzOpV6QcjEwBPaBEtlsi\n +N2WJGkkQzT41av/drybz0csHZeqcetuQThaLFEFscSt7UKIyA5sYdQW4KZPWcPiSV1O3YGy4gh\n RiZfjh5nKJsxbfdJh40Mj2Grw/u/TCKRyhbwwA77JIsiIZRWlpmr//dP1WpzVBSebGFNw2Kj/EK\n FOetOW6l7SrmVG1YDcgKpjVSOZAYGCj9HRcvZdiXoTlPncjxSLJWxghlYaxUl0AkafVwX+UaJlT\n TV+/hp542a4fRj5qd0A==", "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-04-30_01,2026-04-28_01,2025-10-01_01", "X-Proofpoint-Spam-Details": "rule=outbound_notspam policy=outbound score=0\n impostorscore=0 spamscore=0 phishscore=0 bulkscore=0 suspectscore=0\n malwarescore=0 lowpriorityscore=0 clxscore=1015 adultscore=0\n priorityscore=1501 classifier=typeunknown authscore=0 authtc= authcc=\n route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000\n definitions=main-2604300036", "Received-SPF": "pass client-ip=205.220.168.131;\n envelope-from=pierrick.bouvier@oss.qualcomm.com;\n 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,\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\nSigned-off-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>\n---\n include/qemu/target-info-init.h | 49 +++++++++++++++++++++++++++++++++\n include/qemu/target-info-qom.h | 28 +++++++++++++++++++\n target-info-qom.c | 10 +++++++\n 3 files changed, 87 insertions(+)\n create mode 100644 include/qemu/target-info-qom.h", "diff": "diff --git a/include/qemu/target-info-init.h b/include/qemu/target-info-init.h\nindex 9be06d8523a..1e52ad62820 100644\n--- a/include/qemu/target-info-init.h\n+++ b/include/qemu/target-info-init.h\n@@ -10,11 +10,60 @@\n */\n \n #ifndef TARGET_INFO_DEF_H\n+#define TARGET_INFO_DEF_H\n \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+{ \\\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+DEFINE_TYPES(target_info_qom_target_type_info)\n+\n+#endif /* CONFIG_USER_ONLY */\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/target-info-qom.c b/target-info-qom.c\nindex 7fd58d24818..5ce29f80301 100644\n--- a/target-info-qom.c\n+++ b/target-info-qom.c\n@@ -7,10 +7,20 @@\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-qom.h\"\n #include \"hw/arm/machines-qom.h\"\n \n static const TypeInfo target_info_types[] = {\n+ {\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 .name = TYPE_TARGET_ARM_MACHINE,\n .parent = TYPE_INTERFACE,\n", "prefixes": [ "v2", "2/7" ] }