{"id":2229955,"url":"http://patchwork.ozlabs.org/api/1.1/covers/2229955/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/cover/20260428234519.1812371-1-pierrick.bouvier@oss.qualcomm.com/","project":{"id":14,"url":"http://patchwork.ozlabs.org/api/1.1/projects/14/?format=json","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":"<20260428234519.1812371-1-pierrick.bouvier@oss.qualcomm.com>","date":"2026-04-28T23:45:13","name":"[0/6] single-binary: deduplicate target_info()","submitter":{"id":93152,"url":"http://patchwork.ozlabs.org/api/1.1/people/93152/?format=json","name":"Pierrick Bouvier","email":"pierrick.bouvier@oss.qualcomm.com"},"mbox":"http://patchwork.ozlabs.org/project/qemu-devel/cover/20260428234519.1812371-1-pierrick.bouvier@oss.qualcomm.com/mbox/","series":[{"id":501963,"url":"http://patchwork.ozlabs.org/api/1.1/series/501963/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/list/?series=501963","date":"2026-04-28T23:45:13","name":"single-binary: deduplicate target_info()","version":1,"mbox":"http://patchwork.ozlabs.org/series/501963/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/covers/2229955/comments/","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=o9pwOT2g;\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=iqQwUHW2;\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 4g4xsw2K5tz1yHX\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 29 Apr 2026 09:46:42 +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 1wHs7k-00033t-Bi; Tue, 28 Apr 2026 19:45:53 -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 1wHs7h-00033Z-G4\n for qemu-devel@nongnu.org; Tue, 28 Apr 2026 19:45:50 -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 1wHs7f-0000S7-RB\n for qemu-devel@nongnu.org; Tue, 28 Apr 2026 19:45:49 -0400","from pps.filterd (m0279870.ppops.net [127.0.0.1])\n by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id\n 63SFsXOt862964\n for <qemu-devel@nongnu.org>; Tue, 28 Apr 2026 23:45:45 GMT","from mail-dy1-f200.google.com (mail-dy1-f200.google.com\n [74.125.82.200])\n by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dtry0kdrt-1\n (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT)\n for <qemu-devel@nongnu.org>; Tue, 28 Apr 2026 23:45:45 +0000 (GMT)","by mail-dy1-f200.google.com with SMTP id\n 5a478bee46e88-2ba8013a9e3so14794448eec.0\n for <qemu-devel@nongnu.org>; Tue, 28 Apr 2026 16:45:44 -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-2ed1bf8ddaasm345300eec.7.2026.04.28.16.45.42\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 28 Apr 2026 16:45:42 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h=\n cc:content-transfer-encoding:content-type:date:from:message-id\n :mime-version:subject:to; s=qcppdkim1; bh=5BaNj8Eb+F4Hno5h4JHtD+\n AE6cnoKER1wp5WkGh/1j8=; b=o9pwOT2gLGfzfL3iWMpO8MOBt42F5/36ndV+lr\n sEu0R8vQ7oBHKMI0wuoJUsfwWsFAb4SFPgkeZHi79KfAWvozzOTbHjV0JZCBPv+Q\n Ibihfn8r6FI49/eTbp/KBfcX+n/WTiAj1+3di2Yhfj6p59npIf1WGgE8xvH/yNFE\n ms5Xva6i9VTL8T+XL2DUaIw4UgknhAbRoAKKwRbgVtf5vHdn4eWgQvOTS9r1lzVe\n 97dPMC+XLaY2fbhhW61/6o3RzBbmX/FjDOhmKwmKW2loNmncX1CNgfBClkXYzPdj\n u98p+eHkpaBzwyaoBoAIc07G5nb6pJ5xXtfEm5OA81ecRppA==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=oss.qualcomm.com; s=google; t=1777419944; x=1778024744; darn=nongnu.org;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:from:to:cc:subject:date:message-id:reply-to;\n bh=5BaNj8Eb+F4Hno5h4JHtD+AE6cnoKER1wp5WkGh/1j8=;\n b=iqQwUHW2++R5jowgkVXqW7Y8gKdsnhmRZyvLW50xzoXyB58IUsNPU6cLDHSRsT+Qvm\n viEjSBCcgdLrgKxWRsLa1dvZbspyo9yExhLw4IdioWQX7+5hWRrRpGvW5iOdhyH/REzc\n nkteUuHhoCOKKGIiaRpbolLoZ3siWGR155lpel/EgYj7zCzVm1jjxVoa3NsMSwssEIsU\n 51LU1Vyry03cgl2IJ5VNq9vYN+Xt9zj3xy5/uQja470TMoNi9CQTBsn0c/2gpeTMQoTT\n sZhB/SWqivlQXe/IyTrBWxZyy/1h5mpbqF6d0dbnuB4DvIfiP3MTbOoRhRoxL1VFS22c\n 5faA=="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777419944; x=1778024744;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n :message-id:reply-to;\n bh=5BaNj8Eb+F4Hno5h4JHtD+AE6cnoKER1wp5WkGh/1j8=;\n b=UoBgUSdPpCNEjIGZRjDiff2Z8NS/hO6/dk2D1J/qXlq8knAV+ZzrX8q88GE8YtRKWh\n R1hanWBRHr+aNcAmczOnJDmLkBFFzO5mCP+4LEv+dRT3s6BH0OXZ7/azIPYH3nEglxfd\n SK7wI/D2J+RlyLRMDfZ+Yky4BcHRC4iyi+hFKzb5JM7Y06st4UArq8nw5PU71CT38zkH\n daXJWuUjUkWcGJN1N93y0t9sisrN1TWHTMD98/ZuE1V//v76VaRy0K2VLH6Svco7s0Hw\n UyWnJP+WoYDYZzLKLIOwO6UbwwL34/3xIjzAgsNfOnLCDMjy/YZ3/fU+u2cU1iq699dv\n JQ+g==","X-Gm-Message-State":"AOJu0YzrU3WVSXLGAoGWfcV0qjDPZe9gHGAFBBvzgpyZa7SveOQ9rsUS\n Afc9viMcarP2bQPUWCIRu9TRq3afDxxLIWQjls2mlYTF6DP++QSsYMoZ1sbdED9+c8uc5SO/+a2\n RaI1Ptw87QRz+8iHZA3od4wB9q/3AvdyyQHNT8AdocLvp2mkOl4bSu1XKzWqtStctzA==","X-Gm-Gg":"AeBDieu5PeM5NCve02ZrPA03/e4Ui7XsnJ+wBpvSqtKgBRuGIMrDdsL05u7stfK9u78\n uZY/k9S8L7O/4rKX3ApV9lgkGqdtXpG2gtuUyRXH/q44zE13vQZKTTonZ0r2hRlJrIKOJh6uzZG\n x1kFZ3PbUO6JO2hPaG6P8wX5hCRKlchM/LQOvwmR+CnJWn/Z1K/Elmkw+E600t+ZWwDTj6CE1y3\n e6sxtLkCjF0fDVv4H0ZwHwFcdO4lNNi0DUmwh8BJDtalLQkujXU+1wApbHGgfUge1omF/zj0Cjr\n CPUohg38AEp+HuO1zgTbR73koJfimtGkF/zS/UsGQ+WfLhsjsJ4v/Jb+FER/SzEH0ccUEf6/aog\n Gjg/d7XKayH7a9uW+2jXrltK6ECepSYB6v7G5Nuvt6OX/g0ysUiqyzPb4UV1LlSFGBYf6FBI3a6\n cfUS9H34kgMBgbR7uE","X-Received":["by 2002:a05:7300:6c24:b0:2dd:5641:f01 with SMTP id\n 5a478bee46e88-2ed198bf5aamr788810eec.28.1777419943590;\n Tue, 28 Apr 2026 16:45:43 -0700 (PDT)","by 2002:a05:7300:6c24:b0:2dd:5641:f01 with SMTP id\n 5a478bee46e88-2ed198bf5aamr788792eec.28.1777419943003;\n Tue, 28 Apr 2026 16:45:43 -0700 (PDT)"],"From":"Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>","To":"qemu-devel@nongnu.org","Cc":"Markus Armbruster <armbru@redhat.com>, =?utf-8?q?Daniel_P=2E_Berrang?=\n\t=?utf-8?q?=C3=A9?= <berrange@redhat.com>,\n Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>, =?utf-8?q?Philippe_Ma?=\n\t=?utf-8?q?thieu-Daud=C3=A9?= <philmd@linaro.org>,\n Anton Johansson <anjo@rev.ng>,\n Richard Henderson <richard.henderson@linaro.org>,\n Paolo Bonzini <pbonzini@redhat.com>","Subject":"[PATCH 0/6] single-binary: deduplicate target_info()","Date":"Tue, 28 Apr 2026 16:45:13 -0700","Message-ID":"<20260428234519.1812371-1-pierrick.bouvier@oss.qualcomm.com>","X-Mailer":"git-send-email 2.43.0","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","X-Authority-Analysis":"v=2.4 cv=KuJ9H2WN c=1 sm=1 tr=0 ts=69f146a9 cx=c_pps\n a=PfFC4Oe2JQzmKTvty2cRDw==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17\n a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10\n a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=gowsoOTTUOVcmtlkKump:22\n a=vL9XZpDnxUCI8HPV7P4A:9 a=QEXdDO2ut3YA:10 a=6Ab_bkdmUrQuMsNx7PHu:22","X-Proofpoint-GUID":"XvEA5JBgpzlHesP_bcMPuVJO-EoA82En","X-Proofpoint-ORIG-GUID":"XvEA5JBgpzlHesP_bcMPuVJO-EoA82En","X-Proofpoint-Spam-Details-Enc":"AW1haW4tMjYwNDI4MDIzNCBTYWx0ZWRfX54oDLLKVLpgY\n 39CQNQMz1zgfWen43SSXzAibqRoBr66eY4gYM3zKFy7/4bxPZyqTZdYPhdwcdHpI86EYJyu+ZBB\n pdVoI7o3VKQHD63XBz5BWAsMuq+xkQ0SAmaCmNXwVMAehnID+sehiCSNv5PL+rEpZLfXTNg2/ru\n 7RZTxn2VIK5oCd6pVOvRT7ZhdXi+oitdJPFmHfdgXN5KhiDRFzVCdwCpRhArPTMDVnRS4ZDDiPs\n 6NQvPcr5Ek38i/3ud9H0qpXyskvKOJRdnteSeLdBBZ0/FUh3bSsC6I0m1T6OmDHGx4dS5GFcagj\n W4wFCkz2LRN/Z+NCHbv6NuBZ7f9eXycr1umh3Q/L6fz4/YQdQo5CBlKhPzPenLpo7VfLdJ4wDvu\n EVWct00Coi3zcwoeQuqZktFAGT74GaBabGqkfpjA2qxB9DfvYcyl9skJiOO46RWlVOYgECZQxo+\n /n+5aEYR/C7DohtV6AQ==","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-28_05,2026-04-28_01,2025-10-01_01","X-Proofpoint-Spam-Details":"rule=outbound_notspam policy=outbound score=0\n priorityscore=1501 suspectscore=0 spamscore=0 clxscore=1015\n lowpriorityscore=0 phishscore=0 bulkscore=0 malwarescore=0 impostorscore=0\n adultscore=0 classifier=typeunknown authscore=0 authtc= authcc=\n route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000\n definitions=main-2604280234","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":"We are getting close to be able to link several targets in a single QEMU system\nbinary, and the last obstacle on the road is to embed several TargetInfo in the\nsame binary. The end result of this series is to have a single definition for\ntarget_info symbol.\n\nThis series adds TargetInfo types in QOM, and retrieve them dynamically(). At\nthe moment, we don't deal yet with multiple TargetInfo selection, but install\nall that is needed to be able to do it easily.\n\nBecause TargetInfo data is set through class_init, it creates an issue at\nstartup, where we may try to instantiate additional (unrelated) types just to\nretrieve the list of \"target-info-X\" types. Those other types class_init may be\nusing target information, to add target specific properties for instance.\nThis issue has been fixed by adding a new object_class_get_list_by_name_prefix\nthat does not force instantiation of all QOM types, but only those matching a\nspecific pattern. This way, we first initialize and retrieve target-info types\nbefore others.\n\nAn alternative would be to leave all this out of QOM, and use startup\ninitializer to add them in a single list. However, because all the single-binary\nwork has been using QOM where possible, it would be really sad to not use it for\nthis final step. Comments are welcome!\n\nFinally, sticking to our promise not create a special \"single-binary\nconfiguration\", the goal is to use the *exact* same codepath for normal binaries\nalso. It means that even for existing system binaries, the goal will be to use\nQOM to retrieve current target, even if there is only one.\n\nPierrick Bouvier (6):\n  target-info: extract target_info() definition in target-info-init.h\n  target-info: introduce TargetInfo in QOM\n  system/vl: initialize QOM first\n  qom/object: add object_class_get_list_by_name_prefix\n  target-info-qom: detect target from QOM\n  target-info: replace target_info() in system-mode\n\n configs/targets/aarch64-softmmu.c |  6 +--\n configs/targets/arm-softmmu.c     |  6 +--\n include/qemu/target-info-init.h   | 63 +++++++++++++++++++++++++++++++\n include/qemu/target-info-qom.h    | 25 ++++++++++++\n include/qom/object.h              | 13 +++++++\n qom/object.c                      | 40 ++++++++++++++++++++\n system/runstate.c                 |  1 -\n system/vl.c                       |  5 +++\n target-info-qom.c                 | 32 ++++++++++++++++\n target-info-stub.c                |  6 +--\n 10 files changed, 184 insertions(+), 13 deletions(-)\n create mode 100644 include/qemu/target-info-init.h\n create mode 100644 include/qemu/target-info-qom.h"}