[{"id":3684490,"web_url":"http://patchwork.ozlabs.org/comment/3684490/","msgid":"<afMA8SCcF9XJ8VUe@redhat.com>","list_archive_url":null,"date":"2026-04-30T07:12:49","subject":"Re: [PATCH v2 3/7] qom/object: register OBJECT and INTERFACE QOM\n types before main","submitter":{"id":2694,"url":"http://patchwork.ozlabs.org/api/people/2694/","name":"Daniel P. Berrangé","email":"berrange@redhat.com"},"content":"On Wed, Apr 29, 2026 at 08:56:22PM -0700, Pierrick Bouvier wrote:\n> Those types are special, as they are the base of all other QOM types. In\n> next commit, we'll introduce an extra step in module initialization for\n> target-info-* types.\n> \n> However, those types depend on TYPE_OBJECT, which is only registered\n> at MODULE_INIT_QOM step.\n> \n> To avoid having to introduce another step, and modify all code calling\n> module_call_init(MODULE_INIT_QOM), we simply register those base types\n> directly in the static constructor, before anything else.\n> \n> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>\n> ---\n>  qom/object.c | 4 +---\n>  1 file changed, 1 insertion(+), 3 deletions(-)\n> \n> diff --git a/qom/object.c b/qom/object.c\n> index f981e270440..a5d268d0722 100644\n> --- a/qom/object.c\n> +++ b/qom/object.c\n> @@ -2839,7 +2839,7 @@ static void object_class_init(ObjectClass *klass, const void *data)\n>                                    NULL);\n>  }\n>  \n> -static void register_types(void)\n> +static void __attribute__((constructor)) register_types(void)\n>  {\n>      static const TypeInfo interface_info = {\n>          .name = TYPE_INTERFACE,\n> @@ -2857,5 +2857,3 @@ static void register_types(void)\n>      type_interface = type_register_internal(&interface_info);\n>      type_register_internal(&object_info);\n>  }\n> -\n> -type_init(register_types)\n\nIMHO this should have been done using the MODULE_INIT_QOM_EARLY\napproach that I suggested on v1, rather than special casing both\nthe base classes and MODULE_INIT_TARGET_INFO\n\nWith regards,\nDaniel","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 (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=TFzqG6e2;\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 4g5lm61Pcmz1yHv\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 30 Apr 2026 17:14:08 +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 1wILa7-00054F-Ma; Thu, 30 Apr 2026 03:13:07 -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 <berrange@redhat.com>)\n id 1wILa6-00053r-1a\n for qemu-devel@nongnu.org; Thu, 30 Apr 2026 03:13:06 -0400","from us-smtp-delivery-124.mimecast.com ([170.10.129.124])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <berrange@redhat.com>)\n id 1wILa4-000896-I4\n for qemu-devel@nongnu.org; Thu, 30 Apr 2026 03:13:05 -0400","from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-589-EBvcFiVmNma3TTvPqtczpw-1; Thu,\n 30 Apr 2026 03:12:59 -0400","from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id 3D5821956056; Thu, 30 Apr 2026 07:12:57 +0000 (UTC)","from redhat.com (unknown [10.44.48.62])\n by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with\n ESMTPS\n id EA56C1800446; Thu, 30 Apr 2026 07:12:52 +0000 (UTC)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1777533182;\n h=from:from:reply-to:reply-to:subject:subject:date:date:\n message-id:message-id:to:to:cc:cc:mime-version:mime-version:\n content-type:content-type:in-reply-to:in-reply-to:  references:references;\n bh=c/tw+9Eqi6d9lbQRH7vlzkki2m4ZK89cLoQe2J20B7M=;\n b=TFzqG6e21hP9/9lGLcTNU6gf41ZUObf+3TKjiNDgj8R2bcUweljMn4Fz/LAG39kfATagnQ\n HLGTTI5rSqYObTHpl/v7J2xrLMhtt6b28J7e3HU97O6/t3NOxLyeaoz7fg6vddDqGM9qDa\n +FN5yVS4foQDazytzEX8I36Is4tY7UU=","X-MC-Unique":"EBvcFiVmNma3TTvPqtczpw-1","X-Mimecast-MFC-AGG-ID":"EBvcFiVmNma3TTvPqtczpw_1777533178","Date":"Thu, 30 Apr 2026 08:12:49 +0100","From":"Daniel =?utf-8?b?UC4gQmVycmFuZ8Op?= <berrange@redhat.com>","To":"Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>","Cc":"qemu-devel@nongnu.org,\n Philippe =?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>","Subject":"Re: [PATCH v2 3/7] qom/object: register OBJECT and INTERFACE QOM\n types before main","Message-ID":"<afMA8SCcF9XJ8VUe@redhat.com>","References":"<20260430035626.3511676-1-pierrick.bouvier@oss.qualcomm.com>\n <20260430035626.3511676-4-pierrick.bouvier@oss.qualcomm.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20260430035626.3511676-4-pierrick.bouvier@oss.qualcomm.com>","User-Agent":"Mutt/2.3.1 (2026-03-20)","X-Scanned-By":"MIMEDefang 3.4.1 on 10.30.177.111","Received-SPF":"pass client-ip=170.10.129.124;\n envelope-from=berrange@redhat.com;\n helo=us-smtp-delivery-124.mimecast.com","X-Spam_score_int":"12","X-Spam_score":"1.2","X-Spam_bar":"+","X-Spam_report":"(1.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001,\n DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001,\n RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001,\n SPF_PASS=-0.001 autolearn=no 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>","Reply-To":"Daniel =?utf-8?b?UC4gQmVycmFuZ8Op?= <berrange@redhat.com>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org"}},{"id":3684817,"web_url":"http://patchwork.ozlabs.org/comment/3684817/","msgid":"<d95d58da-764d-4967-ae93-2cb7418d8c5d@oss.qualcomm.com>","list_archive_url":null,"date":"2026-04-30T16:03:52","subject":"Re: [PATCH v2 3/7] qom/object: register OBJECT and INTERFACE QOM\n types before main","submitter":{"id":93152,"url":"http://patchwork.ozlabs.org/api/people/93152/","name":"Pierrick Bouvier","email":"pierrick.bouvier@oss.qualcomm.com"},"content":"On 4/30/2026 12:12 AM, Daniel P. Berrangé wrote:\n> On Wed, Apr 29, 2026 at 08:56:22PM -0700, Pierrick Bouvier wrote:\n>> Those types are special, as they are the base of all other QOM types. In\n>> next commit, we'll introduce an extra step in module initialization for\n>> target-info-* types.\n>>\n>> However, those types depend on TYPE_OBJECT, which is only registered\n>> at MODULE_INIT_QOM step.\n>>\n>> To avoid having to introduce another step, and modify all code calling\n>> module_call_init(MODULE_INIT_QOM), we simply register those base types\n>> directly in the static constructor, before anything else.\n>>\n>> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>\n>> ---\n>>  qom/object.c | 4 +---\n>>  1 file changed, 1 insertion(+), 3 deletions(-)\n>>\n>> diff --git a/qom/object.c b/qom/object.c\n>> index f981e270440..a5d268d0722 100644\n>> --- a/qom/object.c\n>> +++ b/qom/object.c\n>> @@ -2839,7 +2839,7 @@ static void object_class_init(ObjectClass *klass, const void *data)\n>>                                    NULL);\n>>  }\n>>  \n>> -static void register_types(void)\n>> +static void __attribute__((constructor)) register_types(void)\n>>  {\n>>      static const TypeInfo interface_info = {\n>>          .name = TYPE_INTERFACE,\n>> @@ -2857,5 +2857,3 @@ static void register_types(void)\n>>      type_interface = type_register_internal(&interface_info);\n>>      type_register_internal(&object_info);\n>>  }\n>> -\n>> -type_init(register_types)\n> \n> IMHO this should have been done using the MODULE_INIT_QOM_EARLY\n> approach that I suggested on v1, rather than special casing both\n> the base classes and MODULE_INIT_TARGET_INFO\n>\n\nI'm ok to follow your approach if you really prefer it.\nHowever, can you specify what should be the semantic to put in comment\nfor it? I have trouble finding to explain what is early vs non early,\nwhile it's clear for me what is TARGET_INFO vs REST_OF_QOM.\n\nAs well, adding a INIT_QOM_EARLY implies we need to call it in all\nlocations where we already call INIT_QOM for future-proofing, which\nseems very redundant. Should we had it or not?\n\nWhat do you think about these two points?\n\n> With regards,\n> Daniel\n> \n\nRegards,\nPierrick","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=dOTMuZlt;\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=Ku3cQv5w;\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 4g5zYb4jr7z1yJr\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 01 May 2026 02:06:11 +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 1wITsn-0003KB-BB; Thu, 30 Apr 2026 12:04:57 -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 1wITrv-0000fP-CF\n for qemu-devel@nongnu.org; Thu, 30 Apr 2026 12:04:04 -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 1wITrs-0007NK-FK\n for qemu-devel@nongnu.org; Thu, 30 Apr 2026 12:04:02 -0400","from pps.filterd (m0279868.ppops.net [127.0.0.1])\n by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id\n 63UCGpvC830496\n for <qemu-devel@nongnu.org>; Thu, 30 Apr 2026 16:03:59 GMT","from mail-dy1-f198.google.com (mail-dy1-f198.google.com\n [74.125.82.198])\n by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dv2cq2cw5-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 16:03:58 +0000 (GMT)","by mail-dy1-f198.google.com with SMTP id\n 5a478bee46e88-2ba9a744f7dso1857522eec.0\n for <qemu-devel@nongnu.org>; Thu, 30 Apr 2026 09:03:58 -0700 (PDT)","from [192.168.1.170] (216-71-219-44.dyn.novuscom.net.\n [216.71.219.44]) by smtp.gmail.com with ESMTPSA id\n 5a478bee46e88-2ee38e71bccsm415800eec.11.2026.04.30.09.03.53\n (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n Thu, 30 Apr 2026 09:03:54 -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:in-reply-to\n :message-id:mime-version:references:subject:to; s=qcppdkim1; bh=\n 55a4laP/nZU51is1w/ijrGovlectmTRWl7X667u7dG8=; b=dOTMuZlt3+7FAP43\n fHQ51rVz+oUFoempRXv8qRxy6UgGAUeiORm0QFb/bLDo9/YTL7m5u3fTqxQ9yx55\n Dec+ewNtCZ5FSD5/eWlsAT720nf/GRoUpytizQMw1kZUZPvRg/iIdu0i3df8q7yt\n 7HFulHRjc3LyGCVNt9UHTaOdnlpilchaLgt6LFUb+rO8itON6GbDk8EgbsSlf5aE\n bARgWp4p2529zCJPgsgxqEPNOKKxeY/65C4VZaaFJ1vkdKiLmBCYl3KrJcmtCyg+\n KdD8jFrPfGjP3OMHMNRFW+HJxteOY2Nb9uA7dPFo7ma3Lx8tBJAiXyEtaSINAq2C\n 4KpHUg==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=oss.qualcomm.com; s=google; t=1777565038; x=1778169838; darn=nongnu.org;\n h=content-transfer-encoding:in-reply-to:content-language:from\n :references:cc:to:subject:user-agent:mime-version:date:message-id\n :from:to:cc:subject:date:message-id:reply-to;\n bh=55a4laP/nZU51is1w/ijrGovlectmTRWl7X667u7dG8=;\n b=Ku3cQv5w5AggxQ/AJZvi94mHaVJSmtwpMb07E+oNTi+9oNqyj8CRwthYPliKKDGaD/\n PBMPwDu3iicvaLi5KNmj1TLlp+u2qYTCwI3AW6FvebWEup+ZdJp3YLp6xumRC+3fs/li\n QAXB1p74vWM/UM1PSM8g+/0/T0ruY2228+cFcaz/dg4hcZV12VNzeDtsFzGiKmRvpTnr\n bqoUJ6L3P+XcP6ouR4D10yYBtt1mtIDdHYKapivmwZsfMJH+gp/LAfJ7FwKBhV7b3J14\n g8j4UVHJgA7Ue58dEIYl03pa5uRP9zxuSSXQlaoK6//zcViR5gSb2t2mamRjY08Bw4zw\n wfCg=="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777565038; x=1778169838;\n h=content-transfer-encoding:in-reply-to:content-language:from\n :references:cc:to:subject:user-agent:mime-version:date:message-id\n :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id\n :reply-to;\n bh=55a4laP/nZU51is1w/ijrGovlectmTRWl7X667u7dG8=;\n b=ieKa51Z2OFHqgW22uqtkrq7+j3c1SwmKFs95o64oj1KG0aqJhK/vIHjwtY0xxxK23A\n n4t33H3h9Nyiw4r1IvdzkLAsm9gsi0wMTmkcbMqJORZKD85hKo3ViwRyVj64PyJXxOj2\n /GKcrqjiOXkw6kKuc5zCaip95oyU/mu+C5H4xT2cpvGkIcVI+81+e2XgsJ757s2aDchB\n Ptwxd42xFX6aTjsQRdpJspV/XrQzYCtwB1+m3MCudIB7D/+AuEf2ntHRPsph7TVgLy66\n N6WbfBhM7UoKR4S4+Evkt7xwFCUtPUBEPWEYUjXEwHnKmn8ZP7DwshKkvQ3MrW9fa5R4\n VMqg==","X-Gm-Message-State":"AOJu0YyzYuW/xhMbZTn0Q5+rDXWu7T9bK/QJibcejg/JxRMt7tUaMKZh\n tqiRN324nhwb1hyLqiu6dDmmol+ORsleF1R2aWeFyPOAZmP8L8GFW8fQ3LdmXqvV0XhS0AeDShn\n vrV5clQNyt4FlYYSSvtwwzd+gmHyWL7hDZym/gX8++MqP1HS941Wu/wvVMw==","X-Gm-Gg":"AeBDievVqU/oXcR3Cz2phiuzGtvY04iw7tZS3OXYymEKlvt3rpWr8UAalufm98ebny5\n zdEXt8TFax0xUcQPb4NKLsK7pixGTuk52V9da6AwJjI+0U3JB8sszMGzAigrfmlFZkPFVHhjtu7\n 3+77SGjRMmOuWoa1rA9T0VstCvIqER5Uh4yYO5bd1IXy8vSrmB4dEM0dDjX/jFAaoQ085ZVinKb\n lnCkTFHrxOmlafTDTTFeJl3FUtuJ3mXWXcMgx14yIDDK3UVFfr3jujhNselWZz4pPMNJJ2iMBVb\n y0eMYIrYJO3XYO9QFcjQpgjVpvIM0z1zAIfyeTaa/RboihGF1q4rfUuLnhR4PPj3DbvBoyvMBHb\n pW+aj3MVLdBTxkUlR6t2Gmufo79s901rJyQqWZHhw6qrGZAA+lUuN+CJhEG8iDgwCDA3jykUcVq\n wT/D9l4mYfSIGx6/Es5Nrt7KNJ","X-Received":["by 2002:a05:7300:df4c:b0:2c1:6cfd:73ee with SMTP id\n 5a478bee46e88-2ed3dcb58bemr1818092eec.24.1777565037399;\n Thu, 30 Apr 2026 09:03:57 -0700 (PDT)","by 2002:a05:7300:df4c:b0:2c1:6cfd:73ee with SMTP id\n 5a478bee46e88-2ed3dcb58bemr1817842eec.24.1777565034965;\n Thu, 30 Apr 2026 09:03:54 -0700 (PDT)"],"Message-ID":"<d95d58da-764d-4967-ae93-2cb7418d8c5d@oss.qualcomm.com>","Date":"Thu, 30 Apr 2026 09:03:52 -0700","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v2 3/7] qom/object: register OBJECT and INTERFACE QOM\n types before main","To":"=?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= <berrange@redhat.com>","Cc":"qemu-devel@nongnu.org,\n =?utf-8?q?Philippe_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>","References":"<20260430035626.3511676-1-pierrick.bouvier@oss.qualcomm.com>\n <20260430035626.3511676-4-pierrick.bouvier@oss.qualcomm.com>\n <afMA8SCcF9XJ8VUe@redhat.com>","From":"Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>","Content-Language":"en-US","In-Reply-To":"<afMA8SCcF9XJ8VUe@redhat.com>","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","X-Proofpoint-GUID":"A3MKNk81txQ1hRziGrYcT8wHsI0TneAm","X-Authority-Analysis":"v=2.4 cv=aYRRWxot c=1 sm=1 tr=0 ts=69f37d6e cx=c_pps\n a=wEP8DlPgTf/vqF+yE6f9lg==:117 a=iLqgmErQAxjCjdq5jj1Aqg==:17\n a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10\n a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=ZpdpYltYx_vBUK5n70dp:22\n a=EUspDBNiAAAA:8 a=cilDik7dx2sqUwjTVvYA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10\n a=bBxd6f-gb0O0v-kibOvt:22","X-Proofpoint-Spam-Details-Enc":"AW1haW4tMjYwNDMwMDE2NiBTYWx0ZWRfX3Is5mxTcLdM8\n JKRdNtkuzhd1eL810iJPjPn9fgMhnuxGeI2EFMzH+dfnkchmAg0A530LF/0PDuGFhQwXE+15Nwe\n q3uyIX1Mnv0IgV2JXpHjkyPYqJhhEUtc3pJky3yoQczHOgOJiEDRfiRe3Dr13uBSYBourcT0Fwv\n fYLzjjef1DzlGtiHIMLCDH4hwbmkU6a33N2EOOOEP2gE1OG6dwdSwOc1yQ7fXw+mY2FCm6OqUw8\n 6CMMGwHotNdZo88D1K5GlT4KDLKunWusgJUErjU+as6b+yTrvklyx16IjKkwBf4ts3vQIXK840i\n ohdh8QxX9bbiRFsK/HujQq9YNJfDj7QKAl+xe/qH0WGhgG6MEyyqPdlMxwzeYJp1zEadD4u4OPR\n 48CSKXCdb3G8VRFzQmUARwl99Rdii3DTySDfccCxELLxLYODaLJXyYuU4W3kP5ReohINJcxJYWW\n qMvLs2BtzV2X/tpOhYQ==","X-Proofpoint-ORIG-GUID":"A3MKNk81txQ1hRziGrYcT8wHsI0TneAm","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_04,2026-04-30_02,2025-10-01_01","X-Proofpoint-Spam-Details":"rule=outbound_notspam policy=outbound score=0\n bulkscore=0 malwarescore=0 clxscore=1015 phishscore=0 spamscore=0\n priorityscore=1501 lowpriorityscore=0 suspectscore=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-2604300166","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"}},{"id":3684856,"web_url":"http://patchwork.ozlabs.org/comment/3684856/","msgid":"<afOMOcbpEnjzfyj6@redhat.com>","list_archive_url":null,"date":"2026-04-30T17:07:05","subject":"Re: [PATCH v2 3/7] qom/object: register OBJECT and INTERFACE QOM\n types before main","submitter":{"id":2694,"url":"http://patchwork.ozlabs.org/api/people/2694/","name":"Daniel P. Berrangé","email":"berrange@redhat.com"},"content":"On Thu, Apr 30, 2026 at 09:03:52AM -0700, Pierrick Bouvier wrote:\n> On 4/30/2026 12:12 AM, Daniel P. Berrangé wrote:\n> > On Wed, Apr 29, 2026 at 08:56:22PM -0700, Pierrick Bouvier wrote:\n> >> Those types are special, as they are the base of all other QOM types. In\n> >> next commit, we'll introduce an extra step in module initialization for\n> >> target-info-* types.\n> >>\n> >> However, those types depend on TYPE_OBJECT, which is only registered\n> >> at MODULE_INIT_QOM step.\n> >>\n> >> To avoid having to introduce another step, and modify all code calling\n> >> module_call_init(MODULE_INIT_QOM), we simply register those base types\n> >> directly in the static constructor, before anything else.\n> >>\n> >> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>\n> >> ---\n> >>  qom/object.c | 4 +---\n> >>  1 file changed, 1 insertion(+), 3 deletions(-)\n> >>\n> >> diff --git a/qom/object.c b/qom/object.c\n> >> index f981e270440..a5d268d0722 100644\n> >> --- a/qom/object.c\n> >> +++ b/qom/object.c\n> >> @@ -2839,7 +2839,7 @@ static void object_class_init(ObjectClass *klass, const void *data)\n> >>                                    NULL);\n> >>  }\n> >>  \n> >> -static void register_types(void)\n> >> +static void __attribute__((constructor)) register_types(void)\n> >>  {\n> >>      static const TypeInfo interface_info = {\n> >>          .name = TYPE_INTERFACE,\n> >> @@ -2857,5 +2857,3 @@ static void register_types(void)\n> >>      type_interface = type_register_internal(&interface_info);\n> >>      type_register_internal(&object_info);\n> >>  }\n> >> -\n> >> -type_init(register_types)\n> > \n> > IMHO this should have been done using the MODULE_INIT_QOM_EARLY\n> > approach that I suggested on v1, rather than special casing both\n> > the base classes and MODULE_INIT_TARGET_INFO\n> >\n> \n> I'm ok to follow your approach if you really prefer it.\n> However, can you specify what should be the semantic to put in comment\n> for it? I have trouble finding to explain what is early vs non early,\n> while it's clear for me what is TARGET_INFO vs REST_OF_QOM.\n\nI don't think we need to set our strong rules. It is just an early\nstartup hook to be used by classes which are a dependency of other\ninitialization code.  Conceptually this is similar to what we did\nin system/vl.c, where we have various stages for creating -object\nargs. What goes in each stage is simply determined by a functional\nneed at the point in time.\n\n> As well, adding a INIT_QOM_EARLY implies we need to call it in all\n> locations where we already call INIT_QOM for future-proofing, which\n> seems very redundant. Should we had it or not?\n\nYep, that's true, but not the end of the world imho.\n\nUltimately an solution is a bit of a hack. Long term what we need\nto do is follow glib's approach from GType and have \"just in time\"\ninitialization on first use which will make everything \"just work\"\nwithout having to think about ordering. I didn't want to suggest\nthat now though, as it has potential to be a can of worms.","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 (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=MKvG0q7i;\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 4g60x64gv1z1xqf\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 01 May 2026 03:08:08 +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 1wIUrG-0001F4-ME; Thu, 30 Apr 2026 13:07:26 -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 <berrange@redhat.com>)\n id 1wIUrE-0001Dk-KC\n for qemu-devel@nongnu.org; Thu, 30 Apr 2026 13:07:24 -0400","from us-smtp-delivery-124.mimecast.com ([170.10.129.124])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <berrange@redhat.com>)\n id 1wIUrA-00082t-Vz\n for qemu-devel@nongnu.org; Thu, 30 Apr 2026 13:07:24 -0400","from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-203-lCVHPJLUPU-Ira2B64bjjg-1; Thu,\n 30 Apr 2026 13:07:14 -0400","from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id 2DDEE19560B7; Thu, 30 Apr 2026 17:07:13 +0000 (UTC)","from redhat.com (unknown [10.44.48.62])\n by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with\n ESMTPS\n id 74A2C300019F; Thu, 30 Apr 2026 17:07:09 +0000 (UTC)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1777568838;\n h=from:from:reply-to:reply-to:subject:subject:date:date:\n message-id:message-id:to:to:cc:cc:mime-version:mime-version:\n content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=neqj4Fgl2AnLiL3xT3MAZ7r0NKcfxOW0iMB97X1Jk+Y=;\n b=MKvG0q7icm8JAvlxNv8UNV0JhFtFGWMFabonx6HjUV1MRA07L5a7zUDqKrygru7UV83RG6\n SLGkTVDvlS56NUy3pdnGw9y7SEfiewqPlKhIyMfZro2rUaTnCXZACS8JcfgwDGhyHhHGZ7\n 6yKc1K5dKBHfWCJlltUmEShsO4kV0Qk=","X-MC-Unique":"lCVHPJLUPU-Ira2B64bjjg-1","X-Mimecast-MFC-AGG-ID":"lCVHPJLUPU-Ira2B64bjjg_1777568833","Date":"Thu, 30 Apr 2026 18:07:05 +0100","From":"Daniel =?utf-8?b?UC4gQmVycmFuZ8Op?= <berrange@redhat.com>","To":"Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>","Cc":"qemu-devel@nongnu.org,\n Philippe =?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>","Subject":"Re: [PATCH v2 3/7] qom/object: register OBJECT and INTERFACE QOM\n types before main","Message-ID":"<afOMOcbpEnjzfyj6@redhat.com>","References":"<20260430035626.3511676-1-pierrick.bouvier@oss.qualcomm.com>\n <20260430035626.3511676-4-pierrick.bouvier@oss.qualcomm.com>\n <afMA8SCcF9XJ8VUe@redhat.com>\n <d95d58da-764d-4967-ae93-2cb7418d8c5d@oss.qualcomm.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<d95d58da-764d-4967-ae93-2cb7418d8c5d@oss.qualcomm.com>","User-Agent":"Mutt/2.3.1 (2026-03-20)","X-Scanned-By":"MIMEDefang 3.4.1 on 10.30.177.4","Received-SPF":"pass client-ip=170.10.129.124;\n envelope-from=berrange@redhat.com;\n helo=us-smtp-delivery-124.mimecast.com","X-Spam_score_int":"-20","X-Spam_score":"-2.1","X-Spam_bar":"--","X-Spam_report":"(-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001,\n DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001,\n SPF_HELO_PASS=-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 <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>","Reply-To":"Daniel =?utf-8?b?UC4gQmVycmFuZ8Op?= <berrange@redhat.com>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org"}},{"id":3684865,"web_url":"http://patchwork.ozlabs.org/comment/3684865/","msgid":"<727834b3-b4be-47b4-a14b-22473118dcca@oss.qualcomm.com>","list_archive_url":null,"date":"2026-04-30T17:28:06","subject":"Re: [PATCH v2 3/7] qom/object: register OBJECT and INTERFACE QOM\n types before main","submitter":{"id":93152,"url":"http://patchwork.ozlabs.org/api/people/93152/","name":"Pierrick Bouvier","email":"pierrick.bouvier@oss.qualcomm.com"},"content":"On 4/30/2026 10:07 AM, Daniel P. Berrangé wrote:\n> On Thu, Apr 30, 2026 at 09:03:52AM -0700, Pierrick Bouvier wrote:\n>> On 4/30/2026 12:12 AM, Daniel P. Berrangé wrote:\n>>> On Wed, Apr 29, 2026 at 08:56:22PM -0700, Pierrick Bouvier wrote:\n>>>> Those types are special, as they are the base of all other QOM types. In\n>>>> next commit, we'll introduce an extra step in module initialization for\n>>>> target-info-* types.\n>>>>\n>>>> However, those types depend on TYPE_OBJECT, which is only registered\n>>>> at MODULE_INIT_QOM step.\n>>>>\n>>>> To avoid having to introduce another step, and modify all code calling\n>>>> module_call_init(MODULE_INIT_QOM), we simply register those base types\n>>>> directly in the static constructor, before anything else.\n>>>>\n>>>> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>\n>>>> ---\n>>>>  qom/object.c | 4 +---\n>>>>  1 file changed, 1 insertion(+), 3 deletions(-)\n>>>>\n>>>> diff --git a/qom/object.c b/qom/object.c\n>>>> index f981e270440..a5d268d0722 100644\n>>>> --- a/qom/object.c\n>>>> +++ b/qom/object.c\n>>>> @@ -2839,7 +2839,7 @@ static void object_class_init(ObjectClass *klass, const void *data)\n>>>>                                    NULL);\n>>>>  }\n>>>>  \n>>>> -static void register_types(void)\n>>>> +static void __attribute__((constructor)) register_types(void)\n>>>>  {\n>>>>      static const TypeInfo interface_info = {\n>>>>          .name = TYPE_INTERFACE,\n>>>> @@ -2857,5 +2857,3 @@ static void register_types(void)\n>>>>      type_interface = type_register_internal(&interface_info);\n>>>>      type_register_internal(&object_info);\n>>>>  }\n>>>> -\n>>>> -type_init(register_types)\n>>>\n>>> IMHO this should have been done using the MODULE_INIT_QOM_EARLY\n>>> approach that I suggested on v1, rather than special casing both\n>>> the base classes and MODULE_INIT_TARGET_INFO\n>>>\n>>\n>> I'm ok to follow your approach if you really prefer it.\n>> However, can you specify what should be the semantic to put in comment\n>> for it? I have trouble finding to explain what is early vs non early,\n>> while it's clear for me what is TARGET_INFO vs REST_OF_QOM.\n> \n> I don't think we need to set our strong rules. It is just an early\n> startup hook to be used by classes which are a dependency of other\n> initialization code.  Conceptually this is similar to what we did\n> in system/vl.c, where we have various stages for creating -object\n> args. What goes in each stage is simply determined by a functional\n> need at the point in time.\n>\n\nOk!\n\n>> As well, adding a INIT_QOM_EARLY implies we need to call it in all\n>> locations where we already call INIT_QOM for future-proofing, which\n>> seems very redundant. Should we had it or not?\n> \n> Yep, that's true, but not the end of the world imho.\n>\n\nI'll go this route then, and initialize TYPE_OBJECT and TYPE_INTERFACE\nin QOM_INIT_EARLY step along with target info.\n\n> Ultimately an solution is a bit of a hack. Long term what we need\n> to do is follow glib's approach from GType and have \"just in time\"\n> initialization on first use which will make everything \"just work\"\n> without having to think about ordering. I didn't want to suggest\n> that now though, as it has potential to be a can of worms.\n> \n\nThis is kind of what we do already. First time we access a type, it's\ninitialized. The only thing done statically is registering types, which\ndoes not trigger anything except adding them to the global type table.\n\nThe current issue is more a dependency issue between target-info VS\nother types, which is why I thought Marc-André suggestion was better\nthan a generic QOM_INIT_EARLY. But I don't mind following this approach,\nmy goal is just to have something that works for our need.\n\nRegards,\nPierrick","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=pbIoKAm9;\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=h7iXhFXF;\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 4g61Rw293Nz1yGq\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 01 May 2026 03:31:24 +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 1wIVBU-0006b4-4n; Thu, 30 Apr 2026 13:28:20 -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 1wIVBO-0006Kp-0G\n for qemu-devel@nongnu.org; Thu, 30 Apr 2026 13:28:14 -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 1wIVBL-0006Dc-Gw\n for qemu-devel@nongnu.org; Thu, 30 Apr 2026 13:28:13 -0400","from pps.filterd (m0279869.ppops.net [127.0.0.1])\n by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id\n 63UFN26E2941670\n for <qemu-devel@nongnu.org>; Thu, 30 Apr 2026 17:28:10 GMT","from mail-dl1-f71.google.com (mail-dl1-f71.google.com\n [74.125.82.71])\n by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4duyr43aw6-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 17:28:09 +0000 (GMT)","by mail-dl1-f71.google.com with SMTP id\n a92af1059eb24-12dece274b1so1340338c88.1\n for <qemu-devel@nongnu.org>; Thu, 30 Apr 2026 10:28:09 -0700 (PDT)","from [192.168.1.170] (216-71-219-44.dyn.novuscom.net.\n [216.71.219.44]) by smtp.gmail.com with ESMTPSA id\n a92af1059eb24-12de3216e81sm11192808c88.4.2026.04.30.10.28.06\n (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n Thu, 30 Apr 2026 10:28:07 -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:in-reply-to\n :message-id:mime-version:references:subject:to; s=qcppdkim1; bh=\n yoNygasC9LjDWqdRHBUJ1NtfRqsJp5lAdI/QnXT327w=; b=pbIoKAm9BmFyYbvP\n TfpreUNpVwXUA73a1TMPfKFRiukQKSLBRiNbzu/e4qdLf8uulwaYYX9rK5LLWxwc\n 7TfDdGsfr8PTlSs9V2wzGw8wdj5cCSO+/L4BPK/yXLDlybdIfP1eGt3iatdk8kk6\n M52iWT0OalTyrW5TcAAS8qXNVe/UQztQ1EvtBGf/ubh+AckYyxpuY/CSJBHPxs7Q\n KwpKT1bUK9ds00x8mDqE7d9f9eoKjhJIUPDOYvxOiqL3+t7uVA2R7jdKxn8W6ki1\n 5WRNUeigEIEltwg1U4u9J+2F4Xx03aY0OACaj2Kxc2P+XFfzVABK6dO0xheqXG0j\n TbOVuw==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=oss.qualcomm.com; s=google; t=1777570089; x=1778174889; darn=nongnu.org;\n h=content-transfer-encoding:in-reply-to:content-language:from\n :references:cc:to:subject:user-agent:mime-version:date:message-id\n :from:to:cc:subject:date:message-id:reply-to;\n bh=yoNygasC9LjDWqdRHBUJ1NtfRqsJp5lAdI/QnXT327w=;\n b=h7iXhFXFldmNOhws/19tNesUg9HVDwKw+hP2CfsTWmM0i+FU304RNgYSvECDF3ULnX\n QeZqObOV60Mu+q9yF7A/GipK/wVXMrt8dp2+AHPT1fuIlaAJ34nurs2MJUPD3WljdjS7\n EdyOoPvyCro2Bw7FD8HVxf1SJTIY87BQ/D2GopXIX/4Ze2exmrF6JCAgcrPGa4ulQU6F\n fBWy7ou2Ypn1Ikkg0eBhseleg+hNCjEsVWCeMP36gzaDNB2bs8E3LO8PuPHmgezHzU5s\n z9YUroN6q7cTO2/i3EJYXM6O/WMeujDP15h1iMWTF7CnIs11T2Ds7wbP7FZnLyb5Yafx\n MVGg=="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777570089; x=1778174889;\n h=content-transfer-encoding:in-reply-to:content-language:from\n :references:cc:to:subject:user-agent:mime-version:date:message-id\n :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id\n :reply-to;\n bh=yoNygasC9LjDWqdRHBUJ1NtfRqsJp5lAdI/QnXT327w=;\n b=Crprvph+z9xuhtVAkvtkMMS1VaPZUIl3fkafQFKeEg+0gindo18vpLtUfZKNNruOv3\n Szpq6c+67fvTYcPu7gYHZ9Ta40yMnpStr9dM9+JpYCcG5hSZ/gxtZJfrmgqZFAIFLIEu\n +6alQ84ONMZeHjcnlXJJpFi1KdfVYAuCTOKQWCbn2v73B3iefG52aPl+0F9mH/63pKvs\n AtEfJ5yInJ1kHGlYWxUDg8FIvsEDEicZBPkas+Uv8z281uywPjWFfQw93KUD6IUCKvLQ\n qc6vPEk/hGtS/2sdwmSROkxt7Y+eC2pgx2/X5+wNSUeAYibMNYkKAJScg57fFSV8j8sd\n iTYg==","X-Gm-Message-State":"AOJu0Ywex/L8RKMaUNDCs2wIjKn+geV1uD231z/1MmOjXwvi0+Dwqw5o\n xVrvPEipTlXBs1ucbAWc059Svt4zGf+cUzZnjOGcNAWtgPHCoOzrhpwKYuRc7MQBHKuSDjFZa4Z\n aMHygclHaYhMOp/Ekn4ffGRhyCVi1YeKnalvx241kJeOMmnYFtYXxQZcPGw==","X-Gm-Gg":"AeBDiet+AD7S6ckqwvcyuIwh30EasrQh3DmduWHk3UO9kpYVGhSEcVyqhXY0BiIMAd/\n xjoEzWU/zTPfyGNUl8LomHKGxmknhVq2a7m5H4cHHMcBZQbXxErYvfPux5c+rebGE9Vh7je2rjY\n kNYs+5g22KaTnWxIY/+WyjaehU3a9v+1Acsu00u8P2r41KlldoVKNlhGfnbILsbbp9cOHEZ9YIO\n klblCmYFVfrE9dDmQ6qGp+9Nqu71jYqKZTs5r8xuHawiZbS3hwUxalLt7tth5UlIWtXaWs+1Sh2\n 5zRHhp4uYeI3LTBIj8scCsu7PCTS1YddNLUWSW3+I0zdUy6T7XuKpgT4YUwhUXZKVxU/9ZsJvQN\n 3DpuH68/EL+NZWS9+LUbQ9KkPpQVAVPGKKMuetaZ2AKVerM+zTFsqpfbjX6XeVlML4nhZzOgOwe\n NXvMUCMG7vvTbEyAfE0ektZwR5","X-Received":["by 2002:a05:7022:1a85:b0:128:d752:e074 with SMTP id\n a92af1059eb24-12deac47e83mr1744801c88.1.1777570088661;\n Thu, 30 Apr 2026 10:28:08 -0700 (PDT)","by 2002:a05:7022:1a85:b0:128:d752:e074 with SMTP id\n a92af1059eb24-12deac47e83mr1744769c88.1.1777570087947;\n Thu, 30 Apr 2026 10:28:07 -0700 (PDT)"],"Message-ID":"<727834b3-b4be-47b4-a14b-22473118dcca@oss.qualcomm.com>","Date":"Thu, 30 Apr 2026 10:28:06 -0700","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v2 3/7] qom/object: register OBJECT and INTERFACE QOM\n types before main","To":"=?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= <berrange@redhat.com>","Cc":"qemu-devel@nongnu.org,\n =?utf-8?q?Philippe_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>","References":"<20260430035626.3511676-1-pierrick.bouvier@oss.qualcomm.com>\n <20260430035626.3511676-4-pierrick.bouvier@oss.qualcomm.com>\n <afMA8SCcF9XJ8VUe@redhat.com>\n <d95d58da-764d-4967-ae93-2cb7418d8c5d@oss.qualcomm.com>\n <afOMOcbpEnjzfyj6@redhat.com>","From":"Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>","Content-Language":"en-US","In-Reply-To":"<afOMOcbpEnjzfyj6@redhat.com>","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","X-Authority-Analysis":"v=2.4 cv=bJcm5v+Z c=1 sm=1 tr=0 ts=69f39129 cx=c_pps\n a=JYo30EpNSr/tUYqK9jHPoA==:117 a=iLqgmErQAxjCjdq5jj1Aqg==:17\n a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10\n a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_glEPmIy2e8OvE2BGh3C:22\n a=EUspDBNiAAAA:8 a=AlKH_gnXchsMo-B4ZccA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10\n a=Fk4IpSoW4aLDllm1B1p-:22","X-Proofpoint-Spam-Details-Enc":"AW1haW4tMjYwNDMwMDE4MCBTYWx0ZWRfXxD26u7HaDfoN\n lQh38mp5/v4WV7zuvkW5netIRkOMGEqvzoSLYpXjzVX0Tnjt3JmIPFk1qlBG5DvLv4AY3CuU8HP\n AXQbQ4fu5ilhrdmGhwCEG3LsBTG7X82EtzRGJOoG0HVLguKfwNB3nxe0TZRTIIWTGPQiJloR6sA\n DlWraXrVJv+0T0DpDDqTsJmiDQ5KP6x5i1O3bEPUc+7zQazGMn3RqybUCjhinJsZOre2S49TEAc\n 6BtS1rOTk3QU/i0cAooTcWsQUqcwGhXoUDHas4I6Jy98y6eZn5/8ENt86E1zeT8b/1q0vHROdkg\n Q68sXS1ulmz2UmeYVSofXoUwiTd4fZxEmrzpLur6PKuB80v/3XJAtoV/rnl6eRy/glIz6h4Ufwj\n zqzPpfSgkwALmJ0Zg5tyBtPcKd3FpvAzKXqV63pdUocVHQQYligZ194dsu3y2Z3HPI3joF2d6Le\n xvmJON3aKyf+hVJdtew==","X-Proofpoint-GUID":"HEf4e2FSAGWFhe01x_r6hWlOFjlsTJr6","X-Proofpoint-ORIG-GUID":"HEf4e2FSAGWFhe01x_r6hWlOFjlsTJr6","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_05,2026-04-30_02,2025-10-01_01","X-Proofpoint-Spam-Details":"rule=outbound_notspam policy=outbound score=0\n spamscore=0 bulkscore=0 clxscore=1015 suspectscore=0 adultscore=0\n lowpriorityscore=0 impostorscore=0 phishscore=0 malwarescore=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-2604300180","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"}},{"id":3684873,"web_url":"http://patchwork.ozlabs.org/comment/3684873/","msgid":"<c237e91f-8293-4455-b087-3e6dac4e1fde@oss.qualcomm.com>","list_archive_url":null,"date":"2026-04-30T17:37:04","subject":"Re: [PATCH v2 3/7] qom/object: register OBJECT and INTERFACE QOM\n types before main","submitter":{"id":93152,"url":"http://patchwork.ozlabs.org/api/people/93152/","name":"Pierrick Bouvier","email":"pierrick.bouvier@oss.qualcomm.com"},"content":"On 4/30/2026 10:28 AM, Pierrick Bouvier wrote:\n> On 4/30/2026 10:07 AM, Daniel P. Berrangé wrote:\n>> On Thu, Apr 30, 2026 at 09:03:52AM -0700, Pierrick Bouvier wrote:\n>>> On 4/30/2026 12:12 AM, Daniel P. Berrangé wrote:\n>>>> On Wed, Apr 29, 2026 at 08:56:22PM -0700, Pierrick Bouvier wrote:\n>>>>> Those types are special, as they are the base of all other QOM types. In\n>>>>> next commit, we'll introduce an extra step in module initialization for\n>>>>> target-info-* types.\n>>>>>\n>>>>> However, those types depend on TYPE_OBJECT, which is only registered\n>>>>> at MODULE_INIT_QOM step.\n>>>>>\n>>>>> To avoid having to introduce another step, and modify all code calling\n>>>>> module_call_init(MODULE_INIT_QOM), we simply register those base types\n>>>>> directly in the static constructor, before anything else.\n>>>>>\n>>>>> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>\n>>>>> ---\n>>>>>  qom/object.c | 4 +---\n>>>>>  1 file changed, 1 insertion(+), 3 deletions(-)\n>>>>>\n>>>>> diff --git a/qom/object.c b/qom/object.c\n>>>>> index f981e270440..a5d268d0722 100644\n>>>>> --- a/qom/object.c\n>>>>> +++ b/qom/object.c\n>>>>> @@ -2839,7 +2839,7 @@ static void object_class_init(ObjectClass *klass, const void *data)\n>>>>>                                    NULL);\n>>>>>  }\n>>>>>  \n>>>>> -static void register_types(void)\n>>>>> +static void __attribute__((constructor)) register_types(void)\n>>>>>  {\n>>>>>      static const TypeInfo interface_info = {\n>>>>>          .name = TYPE_INTERFACE,\n>>>>> @@ -2857,5 +2857,3 @@ static void register_types(void)\n>>>>>      type_interface = type_register_internal(&interface_info);\n>>>>>      type_register_internal(&object_info);\n>>>>>  }\n>>>>> -\n>>>>> -type_init(register_types)\n>>>>\n>>>> IMHO this should have been done using the MODULE_INIT_QOM_EARLY\n>>>> approach that I suggested on v1, rather than special casing both\n>>>> the base classes and MODULE_INIT_TARGET_INFO\n>>>>\n>>>\n>>> I'm ok to follow your approach if you really prefer it.\n>>> However, can you specify what should be the semantic to put in comment\n>>> for it? I have trouble finding to explain what is early vs non early,\n>>> while it's clear for me what is TARGET_INFO vs REST_OF_QOM.\n>>\n>> I don't think we need to set our strong rules. It is just an early\n>> startup hook to be used by classes which are a dependency of other\n>> initialization code.  Conceptually this is similar to what we did\n>> in system/vl.c, where we have various stages for creating -object\n>> args. What goes in each stage is simply determined by a functional\n>> need at the point in time.\n>>\n> \n> Ok!\n> \n>>> As well, adding a INIT_QOM_EARLY implies we need to call it in all\n>>> locations where we already call INIT_QOM for future-proofing, which\n>>> seems very redundant. Should we had it or not?\n>>\n>> Yep, that's true, but not the end of the world imho.\n>>\n> \n> I'll go this route then, and initialize TYPE_OBJECT and TYPE_INTERFACE\n> in QOM_INIT_EARLY step along with target info.\n> \n>> Ultimately an solution is a bit of a hack. Long term what we need\n>> to do is follow glib's approach from GType and have \"just in time\"\n>> initialization on first use which will make everything \"just work\"\n>> without having to think about ordering. I didn't want to suggest\n>> that now though, as it has potential to be a can of worms.\n>>\n> \n> This is kind of what we do already. First time we access a type, it's\n> initialized. The only thing done statically is registering types, which\n> does not trigger anything except adding them to the global type table.\n>\n\nMore exactly, we statically register the function registration, and then\nthe module_init \"orders\" calling them at different chosen steps.\n\n> The current issue is more a dependency issue between target-info VS\n> other types, which is why I thought Marc-André suggestion was better\n> than a generic QOM_INIT_EARLY. But I don't mind following this approach,\n> my goal is just to have something that works for our need.\n> \n> Regards,\n> Pierrick\n>","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=MKiT08KH;\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=iIL9s7ZR;\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 4g61gQ2Nqdz1xqf\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 01 May 2026 03:41:22 +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 1wIVKa-0004aX-S4; Thu, 30 Apr 2026 13:37:45 -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 1wIVK3-0004My-3P\n for qemu-devel@nongnu.org; Thu, 30 Apr 2026 13:37:13 -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 1wIVK1-0000Ok-2B\n for qemu-devel@nongnu.org; Thu, 30 Apr 2026 13:37:10 -0400","from pps.filterd (m0279872.ppops.net [127.0.0.1])\n by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id\n 63UFQ2SH811044\n for <qemu-devel@nongnu.org>; Thu, 30 Apr 2026 17:37:07 GMT","from mail-dy1-f198.google.com (mail-dy1-f198.google.com\n [74.125.82.198])\n by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4duv3q43wd-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 17:37:07 +0000 (GMT)","by mail-dy1-f198.google.com with SMTP id\n 5a478bee46e88-2ee1da7a13fso544130eec.1\n for <qemu-devel@nongnu.org>; Thu, 30 Apr 2026 10:37:07 -0700 (PDT)","from [192.168.1.170] (216-71-219-44.dyn.novuscom.net.\n [216.71.219.44]) by smtp.gmail.com with ESMTPSA id\n 5a478bee46e88-2ee3b29b1a4sm796349eec.18.2026.04.30.10.37.04\n (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n Thu, 30 Apr 2026 10:37:05 -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:in-reply-to\n :message-id:mime-version:references:subject:to; s=qcppdkim1; bh=\n JX1Ldo/qkpoO6LVqki3sM59jKBrokdWMjgkHb3FbB1o=; b=MKiT08KHYMn9/oFH\n biIwzTaaONjzzi/QTJiYC0xBUMV/FZd3qST2U/gavhhNY0ubyFXOxomJ2OVOdHTS\n scdpHrrxG9+BrtXrAPOVMBFuQITEMPUKq9K7fR3OYvkCmun+YwDe6dfR4Grjrqpt\n roFizepSYkxd7ceGC7Z0Ol5pOfc7GGEnUPV+i+WP7QwYIXbgsGqRqFZwRpU71/qh\n kIYFnGoLCx1XzOUqp3ejG6V05Nxy84opO2LAGBVHmhhNtZZP9AbD95YOMvqpxjTp\n TNMxT9Gd9Vot+JitFdei7ms7jVarQS+RiybN6eSPBNYqQ2AvfMFDs2tVMe0kLnwB\n /tvrYA==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=oss.qualcomm.com; s=google; t=1777570626; x=1778175426; darn=nongnu.org;\n h=content-transfer-encoding:in-reply-to:content-language:references\n :cc:to:from:subject:user-agent:mime-version:date:message-id:from:to\n :cc:subject:date:message-id:reply-to;\n bh=JX1Ldo/qkpoO6LVqki3sM59jKBrokdWMjgkHb3FbB1o=;\n b=iIL9s7ZRAjb7bVj0bkaVuFfpvgwQVNll9UUS0pM7cDUx7pv6u43sPjugDOOjtye7Lw\n LPRwjZMHD9q7o4GT9ANlyh6g/zbPNv4HfhT77UXAXcc8VoeYtq0bbTKaqqmI2U7gCdQc\n JxWwXy2LNJadwLIx3kUXotdACTUhgKxPSTU6WtIoBKRGoUNHGVCAfatm6lRmu1kZxVFJ\n ctmCz5Tmd1zCoP/5qx2/JOTJqXIuqFQjt4TSmcamnJbe1RBjGZa4dJXh1bO2GqKfCbB4\n ArWmghgJt7805ZnkwJ4cQpG6Vwfla3nsfq4NBYd3bFQKWp7kz7U8kod4kiunuQ0XCeel\n hIbQ=="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777570626; x=1778175426;\n h=content-transfer-encoding:in-reply-to:content-language:references\n :cc:to:from:subject:user-agent:mime-version:date:message-id:x-gm-gg\n :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;\n bh=JX1Ldo/qkpoO6LVqki3sM59jKBrokdWMjgkHb3FbB1o=;\n b=Jx7MHr73eDX3Kyvshk/CxHAuGab2QOn4YsqhFmog6+J0iAqpAAQYe6yn43Q2ZQxb0O\n ZmC5yQmw/DlKHD7zznfw4MKuFv4AUpNEyddAOvvLFP+8Bh1k1G6OPdA9kZ9JbHip/GvU\n UK8O3ZE8nyGWDJWXldMbvCvjGbI735nHCDiThYo5IE3wCho81RoKGDvDP3bfkpaVwd6E\n yEiHoVds+KV9XHnNyOFpFVgwoK3u+sxOyXsbJV2Iw91h7Yl6j4RNu3p3lvaESm4psmBO\n mwB6Wi+8dh4WZHrEoGXIJgiou/M6O6m+CX++/3URfKjJLvp80MYZa1+rdfEYaaBmcTQS\n 7CWg==","X-Gm-Message-State":"AOJu0YwUbCZseEBYHhvJdEN6h7LLdjqkCsCIuZajYSGD/XIGuG97NcGF\n acT0gW9hNbdY0sNLt8lz2D7dcGet2mu6j//lBqNbq1xa5bgmrUMGoVaZdCLaa8+QfBbfqNi1H76\n maUhAvuS3nujrTz0d+YJSrk3A9y2fYjzS0AzqZO8wce7PL31DEzLUGHKOAg==","X-Gm-Gg":"AeBDieuzWCsiBR2JF/ZMDTKQ6ES1X5yjmTTPZDBC1xEZfgz7uLAVr5AaQwgv9HtHALI\n +id99eiKc7OVOOTy/zd1OC4NxTlTJOCbQ+jHbWv12FEVw8qi6Q6PegZdxhw/Nr2/zLSUWmAKB6U\n GsL04z8zQjXrReN5wPD6EsqcSGS6mJVLBwUA63NEtW5lHErXGfP0HL2M72gGdq4cKKr2CfAqNW6\n wznffYLJGO7lBoB+kmk15qtSOTKQRDvPo5UsPrDQ/qaHXYPr7unzE7jIhBUQOED682Z8KzAJzd9\n vC7nJVQv39i8ohsQlpP7FiusDaocQRvk+RALJSUdf7qm07A3ZpfOGN5Ptf8OwxOjcGeDopMAauA\n oGpW+3raoNml2u49elXTHvbu9ys43jLrzy/L6Z98rCJFF+LK5laj2vtjBm4OFxHi/oXMu6TQ9bx\n Gxom0tnje9e541tJWAvisrilF8","X-Received":["by 2002:a05:693c:2d8f:b0:2c4:61be:1d33 with SMTP id\n 5a478bee46e88-2ed3bdfb209mr2105915eec.6.1777570626340;\n Thu, 30 Apr 2026 10:37:06 -0700 (PDT)","by 2002:a05:693c:2d8f:b0:2c4:61be:1d33 with SMTP id\n 5a478bee46e88-2ed3bdfb209mr2105876eec.6.1777570625696;\n Thu, 30 Apr 2026 10:37:05 -0700 (PDT)"],"Message-ID":"<c237e91f-8293-4455-b087-3e6dac4e1fde@oss.qualcomm.com>","Date":"Thu, 30 Apr 2026 10:37:04 -0700","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v2 3/7] qom/object: register OBJECT and INTERFACE QOM\n types before main","From":"Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>","To":"=?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= <berrange@redhat.com>","Cc":"qemu-devel@nongnu.org,\n =?utf-8?q?Philippe_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>","References":"<20260430035626.3511676-1-pierrick.bouvier@oss.qualcomm.com>\n <20260430035626.3511676-4-pierrick.bouvier@oss.qualcomm.com>\n <afMA8SCcF9XJ8VUe@redhat.com>\n <d95d58da-764d-4967-ae93-2cb7418d8c5d@oss.qualcomm.com>\n <afOMOcbpEnjzfyj6@redhat.com>\n <727834b3-b4be-47b4-a14b-22473118dcca@oss.qualcomm.com>","Content-Language":"en-US","In-Reply-To":"<727834b3-b4be-47b4-a14b-22473118dcca@oss.qualcomm.com>","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","X-Proofpoint-GUID":"8kVaVQQYKYAeEnVSSycQFxKIk2ZsNPuz","X-Authority-Analysis":"v=2.4 cv=dOyWXuZb c=1 sm=1 tr=0 ts=69f39343 cx=c_pps\n a=wEP8DlPgTf/vqF+yE6f9lg==:117 a=iLqgmErQAxjCjdq5jj1Aqg==:17\n a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10\n a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yx91gb_oNiZeI1HMLzn7:22\n a=EUspDBNiAAAA:8 a=idz6DIzpsbBe8igxbM8A:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10\n a=bBxd6f-gb0O0v-kibOvt:22","X-Proofpoint-Spam-Details-Enc":"AW1haW4tMjYwNDMwMDE4MiBTYWx0ZWRfX0yYtbf4JYuHJ\n KnCzDllb/zlnoJ6uWQFTqrlJdFvcB9OfQGWYFF06uWH8RzCwAyiwCK9nYGExnWfwitT2go4pwul\n J7sPkl0wZADh/bhsxYWm3hoAs7cyrZZsCuLJHpqmq62qzVHlhN0jOafl7CrQqoFC3Atu2zi766F\n 4Bu4qnBvd3NeRmzNxRZ5YRfC2qCw7e0O303lYvWiU0dx6R19+CKTnhnh30uV4L9I7YgG0C6vhKw\n BGVCw57ilQiHuwuxnYbeN3qAqmMkDI/IxfxnT7ysLc0GknBB/ubmxE4PDHECo6OS7ZDkclZpHvI\n Y8F+r/J/JtsogTFp8m8m69fO2E84YmNsIKq4jFvu1o/ZhksV3ulxOkxgmLpzVXR2wvw7CDJ1fTm\n G3TKMjUfeMLmy1VwE/SWlEHjgLAfVn/JoYvxp+QLKbgC2JHjfX95fS0b4Jb8tKLue1o9hjhzMZT\n Ri3MAg5KG9Gpxrcmnvw==","X-Proofpoint-ORIG-GUID":"8kVaVQQYKYAeEnVSSycQFxKIk2ZsNPuz","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_05,2026-04-30_02,2025-10-01_01","X-Proofpoint-Spam-Details":"rule=outbound_notspam policy=outbound score=0\n impostorscore=0 malwarescore=0 adultscore=0 spamscore=0 lowpriorityscore=0\n bulkscore=0 suspectscore=0 priorityscore=1501 phishscore=0 clxscore=1015\n classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0\n reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2604300182","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"}}]