From nobody Mon Nov 23 04:26:31 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1793874379; cv=none; d=zohomail.com; s=zohoarc; b=ICmnLj1YENfGlmCiRgyTspcoci36ys6fKz95uFXZV7TGQVKrybtu1GFIPzouDKaq6pkHeW+OKAJkE/VciQLJim8LLGLNSaTwgoqemCup/C0iZqKx0mvkhCmF1yCTJ23Z5Hjh6IIN7ic8+yWFxJLkynxKRcVXQKaUM4cL0PAJjIU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793874379; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=1eLTW+BeIuppTSYbW47mArP5MpKXOHXYwrHJZnASBqQ=; b=Ob3P8aU8JAWpSnuFLVnDTxqlp6FJsxmuJTkubqL5sfIH+rSQf5UXEk/OFIhCz3rtwHbRVByDcssKqBCSpBTYJBo5O66ccPCK83zxHwgyIF9kMSUoGrBM/Oeb/qiT9Wno9MRXmRxvXvdHhQa2zN7OJU0YXuYvYHjPToAZA+zqbxU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1793874379348432.91993842267584; Thu, 5 Nov 2026 02:26:19 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xOufb-0003DU-38; Thu, 05 Nov 2026 05:26:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xOuf7-0002tV-C8 for qemu-devel@nongnu.org; Thu, 05 Nov 2026 05:25:47 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xOuf3-0004AO-L8 for qemu-devel@nongnu.org; Thu, 05 Nov 2026 05:25:40 -0500 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-648-L86ol1DwNyu3-FT8IenpYw-1; Thu, 05 Nov 2026 05:25:34 -0500 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 17F42195605A for ; Thu, 5 Nov 2026 10:25:34 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.44.22.2]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 9141C195608B for ; Thu, 5 Nov 2026 10:25:33 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 01A8721E692D; Thu, 05 Nov 2026 11:25:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1793874337; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1eLTW+BeIuppTSYbW47mArP5MpKXOHXYwrHJZnASBqQ=; b=CZPfiYitU2+A4UswnBmGVbqvIVBWvYiVYz9sLrUpa6RMCs0KUdQSxT54css9HHKTWrLGO7 3rAT4sa45R6198mTC5eNiHSn/eoQ0WDU+sKcWjcK9m0K2Kwyzf8+Zvz5+GMMfOWWGj2Gqs mhTVI5jLp3Amt+G3YpC4JgP4DKAOQNA= X-MC-Unique: L86ol1DwNyu3-FT8IenpYw-1 X-Mimecast-MFC-AGG-ID: L86ol1DwNyu3-FT8IenpYw_1793874334 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: marcandre.lureau@redhat.com, pbonzini@redhat.com, berrange@redhat.com Subject: [PATCH v2 1/3] qdev: Convert array properties to QAPI-aware registration Date: Thu, 5 Nov 2026 11:25:28 +0100 Message-ID: <20261105102530.1848823-2-armbru@redhat.com> In-Reply-To: <20261105102530.1848823-1-armbru@redhat.com> References: <20261105102530.1848823-1-armbru@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 5 X-Spam_score: 0.5 X-Spam_bar: / X-Spam_report: (0.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1793874381639158501 From: Marc-Andr=C3=A9 Lureau Add element_info and element_size fields to PropertyInfo. Add typed array PropertyInfo definitions. Each one knows its element type at compile time through the new element_info and element_size fields of PropertyInfo. Update DEFINE_PROP_ARRAY() to use them instead of the generic qdev_prop_array. Use PropertyInfo fields element_info and element_size instead of Property fields arrayinfo and arrayfieldsize. Remove arrayinfo and arrayfieldsize. Infrastructure changes: - Make get_prop_array, set_prop_array, release_prop_array, and default_prop_array non-static so they can be used by DEFINE_PROP_ARRAY_INFO in other translation units - Add DEFINE_PROP_ARRAY_INFO macro in qdev-prop-internal.h Signed-off-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Markus Armbruster --- hw/core/qdev-prop-internal.h | 19 +++++++ hw/display/apple-gfx.h | 1 + include/hw/core/qdev-properties-system.h | 2 + include/hw/core/qdev-properties.h | 23 +++++---- hw/core/qdev-properties-system.c | 6 +++ hw/core/qdev-properties.c | 64 ++++++++++++++---------- hw/display/apple-gfx.m | 6 +++ 7 files changed, 85 insertions(+), 36 deletions(-) diff --git a/hw/core/qdev-prop-internal.h b/hw/core/qdev-prop-internal.h index d7b77844fe..4f89964c8f 100644 --- a/hw/core/qdev-prop-internal.h +++ b/hw/core/qdev-prop-internal.h @@ -25,4 +25,23 @@ void qdev_propinfo_get_int32(Object *obj, Visitor *v, co= nst char *name, void qdev_propinfo_get_size32(Object *obj, Visitor *v, const char *name, void *opaque, Error **errp); =20 +void get_prop_array(Object *obj, Visitor *v, const char *name, + void *opaque, Error **errp); +void set_prop_array(Object *obj, Visitor *v, const char *name, + void *opaque, Error **errp); +void release_prop_array(Object *obj, const char *name, void *opaque); +void default_prop_array(ObjectProperty *op, const Property *prop); + +#define DEFINE_PROP_ARRAY_INFO(_prop_info, _c_type, _type_info) \ + { \ + .type =3D "list", \ + .qapi_type =3D (_type_info), \ + .element_info =3D &(_prop_info), \ + .element_size =3D sizeof(_c_type), \ + .get =3D get_prop_array, \ + .set =3D set_prop_array, \ + .release =3D release_prop_array, \ + .set_default_value =3D default_prop_array, \ + } + #endif diff --git a/hw/display/apple-gfx.h b/hw/display/apple-gfx.h index 3197bd853d..652f158223 100644 --- a/hw/display/apple-gfx.h +++ b/hw/display/apple-gfx.h @@ -69,6 +69,7 @@ void *apple_gfx_host_ptr_for_gpa_range(uint64_t guest_phy= sical, MemoryRegion **mapping_in_region); =20 extern const PropertyInfo qdev_prop_apple_gfx_display_mode; +extern const PropertyInfo qdev_prop_apple_gfx_display_mode_array; =20 #endif =20 diff --git a/include/hw/core/qdev-properties-system.h b/include/hw/core/qde= v-properties-system.h index 2cbea16d61..b20039ae55 100644 --- a/include/hw/core/qdev-properties-system.h +++ b/include/hw/core/qdev-properties-system.h @@ -23,6 +23,8 @@ extern const PropertyInfo qdev_prop_fdc_drive_type; extern const PropertyInfo qdev_prop_drive; extern const PropertyInfo qdev_prop_drive_iothread; extern const PropertyInfo qdev_prop_netdev; +extern const PropertyInfo qdev_prop_netdev_array; +extern const PropertyInfo qdev_prop_reserved_region_array; extern const PropertyInfo qdev_prop_pci_devfn; extern const PropertyInfo qdev_prop_blocksize; extern const PropertyInfo qdev_prop_pci_host_devaddr; diff --git a/include/hw/core/qdev-properties.h b/include/hw/core/qdev-prope= rties.h index a57291a5a1..36a448be20 100644 --- a/include/hw/core/qdev-properties.h +++ b/include/hw/core/qdev-properties.h @@ -23,9 +23,7 @@ struct Property { int64_t i; uint64_t u; } defval; - const PropertyInfo *arrayinfo; int arrayoffset; - int arrayfieldsize; uint8_t bitnr; bool set_default; }; @@ -34,6 +32,8 @@ struct PropertyInfo { const char *type; const char *description; const QAPITypeInfo *qapi_type; + const struct PropertyInfo *element_info; + size_t element_size; bool realized_set_allowed; /* allow setting property on realized devic= e */ char *(*print)(Object *obj, const Property *prop); void (*set_default_value)(ObjectProperty *op, const Property *prop); @@ -73,8 +73,13 @@ extern const PropertyInfo qdev_prop_size; extern const PropertyInfo qdev_prop_string; extern const PropertyInfo qdev_prop_on_off_auto; extern const PropertyInfo qdev_prop_size32; -extern const PropertyInfo qdev_prop_array; +extern const PropertyInfo qdev_prop_uint8_array; +extern const PropertyInfo qdev_prop_uint16_array; +extern const PropertyInfo qdev_prop_uint32_array; +extern const PropertyInfo qdev_prop_uint64_array; +extern const PropertyInfo qdev_prop_string_array; extern const PropertyInfo qdev_prop_link; +extern const PropertyInfo qdev_prop_link_array; =20 #define DEFINE_PROP(_name, _state, _field, _prop, _type, ...) { \ .name =3D (_name), \ @@ -141,7 +146,9 @@ extern const PropertyInfo qdev_prop_link; * @_field: uint32_t field in @_state to hold the array length * @_arrayfield: field in @_state (of type '@_arraytype *') which * will point to the array - * @_arrayprop: PropertyInfo defining what property the array elements have + * @_arrayprop: PropertyInfo for the array elements (e.g. qdev_prop_uint32= ); + * a corresponding array PropertyInfo named @_arrayprop##_arr= ay + * must exist * @_arraytype: C type of the array elements * * Define device properties for a variable-length array _name. The array = is @@ -158,11 +165,9 @@ extern const PropertyInfo qdev_prop_link; */ #define DEFINE_PROP_ARRAY(_name, _state, _field, \ _arrayfield, _arrayprop, _arraytype) \ - DEFINE_PROP(_name, _state, _field, qdev_prop_array, uint32_t, \ + DEFINE_PROP(_name, _state, _field, _arrayprop##_array, uint32_t, \ .set_default =3D true, \ .defval.u =3D 0, \ - .arrayinfo =3D &(_arrayprop), \ - .arrayfieldsize =3D sizeof(_arraytype), \ .arrayoffset =3D offsetof(_state, _arrayfield)) =20 #define DEFINE_PROP_LINK(_name, _state, _field, _type, _ptr_type) \ @@ -187,11 +192,9 @@ extern const PropertyInfo qdev_prop_link; */ #define DEFINE_PROP_LINK_ARRAY(_name, _state, _field, _arrayfield, \ _linktype, _arraytype) \ - DEFINE_PROP(_name, _state, _field, qdev_prop_array, uint32_t, \ + DEFINE_PROP(_name, _state, _field, qdev_prop_link_array, uint32_t, \ .set_default =3D true, \ .defval.u =3D 0, \ - .arrayinfo =3D &qdev_prop_link, \ - .arrayfieldsize =3D sizeof(_arraytype), \ .arrayoffset =3D offsetof(_state, _arrayfield), \ .link_type =3D _linktype) =20 diff --git a/hw/core/qdev-properties-system.c b/hw/core/qdev-properties-sys= tem.c index 4d605c2056..923afa5cf3 100644 --- a/hw/core/qdev-properties-system.c +++ b/hw/core/qdev-properties-system.c @@ -489,6 +489,8 @@ const PropertyInfo qdev_prop_netdev =3D { .set =3D set_netdev, }; =20 +const PropertyInfo qdev_prop_netdev_array =3D + DEFINE_PROP_ARRAY_INFO(qdev_prop_netdev, NICPeers, &strList_type_info); =20 /* --- audiodev --- */ static void get_audiodev(Object *obj, Visitor *v, const char* name, @@ -840,6 +842,10 @@ const PropertyInfo qdev_prop_reserved_region =3D { .set =3D set_reserved_region, }; =20 +const PropertyInfo qdev_prop_reserved_region_array =3D + DEFINE_PROP_ARRAY_INFO(qdev_prop_reserved_region, ReservedRegion, + &strList_type_info); + /* --- pci address --- */ =20 /* diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c index e2ea894595..7152ba0d0a 100644 --- a/hw/core/qdev-properties.c +++ b/hw/core/qdev-properties.c @@ -681,7 +681,7 @@ static Property array_elem_prop(Object *obj, const Prop= erty *parent_prop, const char *name, char *elem) { return (Property) { - .info =3D parent_prop->arrayinfo, + .info =3D parent_prop->info->element_info, .name =3D name, /* * This ugly piece of pointer arithmetic sets up the offset so @@ -699,19 +699,21 @@ static Property array_elem_prop(Object *obj, const Pr= operty *parent_prop, * underlying element's property release hook for each element and free the * property array. */ -static void release_prop_array(Object *obj, const char *name, void *opaque) +void release_prop_array(Object *obj, const char *name, void *opaque) { const Property *prop =3D opaque; uint32_t *alenptr =3D object_field_prop_ptr(obj, prop); void **arrayptr =3D (void *)obj + prop->arrayoffset; char *elem =3D *arrayptr; int i; + const PropertyInfo *elem_info =3D prop->info->element_info; + size_t elem_size =3D prop->info->element_size; =20 - if (prop->arrayinfo->release) { + if (elem_info->release) { for (i =3D 0; i < *alenptr; i++) { Property elem_prop =3D array_elem_prop(obj, prop, name, elem); - prop->arrayinfo->release(obj, NULL, &elem_prop); - elem +=3D prop->arrayfieldsize; + elem_info->release(obj, NULL, &elem_prop); + elem +=3D elem_size; } } =20 @@ -725,8 +727,8 @@ static void release_prop_array(Object *obj, const char = *name, void *opaque) * (a pointer to which is stored in the additional field described by * prop->arrayoffset). */ -static void set_prop_array(Object *obj, Visitor *v, const char *name, - void *opaque, Error **errp) +void set_prop_array(Object *obj, Visitor *v, const char *name, + void *opaque, Error **errp) { ERRP_GUARD(); const Property *prop =3D opaque; @@ -734,6 +736,8 @@ static void set_prop_array(Object *obj, Visitor *v, con= st char *name, void **arrayptr =3D (void *)obj + prop->arrayoffset; ArrayElementList *list, *elem, *next; const size_t size =3D sizeof(*list); + const PropertyInfo *elem_info =3D prop->info->element_info; + size_t elem_size =3D prop->info->element_size; char *elemptr; bool ok =3D true; =20 @@ -752,9 +756,9 @@ static void set_prop_array(Object *obj, Visitor *v, con= st char *name, while (elem) { Property elem_prop; =20 - elem->value =3D g_malloc0(prop->arrayfieldsize); + elem->value =3D g_malloc0(elem_size); elem_prop =3D array_elem_prop(obj, prop, name, elem->value); - prop->arrayinfo->set(obj, v, NULL, &elem_prop, errp); + elem_info->set(obj, v, NULL, &elem_prop, errp); if (*errp) { ok =3D false; goto out_obj; @@ -776,8 +780,8 @@ out_obj: for (elem =3D list; elem; elem =3D next) { Property elem_prop =3D array_elem_prop(obj, prop, name, elem->value); - if (prop->arrayinfo->release) { - prop->arrayinfo->release(obj, NULL, &elem_prop); + if (elem_info->release) { + elem_info->release(obj, NULL, &elem_prop); } next =3D elem->next; g_free(elem->value); @@ -790,19 +794,19 @@ out_obj: * Now that we know how big the array has to be, move the data over to= a * linear array and free the temporary list. */ - *arrayptr =3D g_malloc_n(*alenptr, prop->arrayfieldsize); + *arrayptr =3D g_malloc_n(*alenptr, elem_size); elemptr =3D *arrayptr; for (elem =3D list; elem; elem =3D next) { - memcpy(elemptr, elem->value, prop->arrayfieldsize); - elemptr +=3D prop->arrayfieldsize; + memcpy(elemptr, elem->value, elem_size); + elemptr +=3D elem_size; next =3D elem->next; g_free(elem->value); g_free(elem); } } =20 -static void get_prop_array(Object *obj, Visitor *v, const char *name, - void *opaque, Error **errp) +void get_prop_array(Object *obj, Visitor *v, const char *name, + void *opaque, Error **errp) { ERRP_GUARD(); const Property *prop =3D opaque; @@ -812,6 +816,8 @@ static void get_prop_array(Object *obj, Visitor *v, con= st char *name, ArrayElementList *list =3D NULL, *elem; ArrayElementList **tail =3D &list; const size_t size =3D sizeof(*list); + const PropertyInfo *elem_info =3D prop->info->element_info; + size_t elem_size =3D prop->info->element_size; int i; bool ok; =20 @@ -819,7 +825,7 @@ static void get_prop_array(Object *obj, Visitor *v, con= st char *name, for (i =3D 0; i < *alenptr; i++) { elem =3D g_new0(ArrayElementList, 1); elem->value =3D elemptr; - elemptr +=3D prop->arrayfieldsize; + elemptr +=3D elem_size; =20 *tail =3D elem; tail =3D &elem->next; @@ -832,7 +838,7 @@ static void get_prop_array(Object *obj, Visitor *v, con= st char *name, elem =3D list; while (elem) { Property elem_prop =3D array_elem_prop(obj, prop, name, elem->valu= e); - prop->arrayinfo->get(obj, v, NULL, &elem_prop, errp); + elem_info->get(obj, v, NULL, &elem_prop, errp); if (*errp) { goto out_obj; } @@ -854,18 +860,24 @@ out_obj: } } =20 -static void default_prop_array(ObjectProperty *op, const Property *prop) +void default_prop_array(ObjectProperty *op, const Property *prop) { object_property_set_default_list(op); } =20 -const PropertyInfo qdev_prop_array =3D { - .type =3D "list", - .get =3D get_prop_array, - .set =3D set_prop_array, - .release =3D release_prop_array, - .set_default_value =3D default_prop_array, -}; +const PropertyInfo qdev_prop_uint8_array =3D + DEFINE_PROP_ARRAY_INFO(qdev_prop_uint8, uint8_t, &uint8List_type_info); +const PropertyInfo qdev_prop_uint16_array =3D + DEFINE_PROP_ARRAY_INFO(qdev_prop_uint16, uint16_t, &uint16List_type_in= fo); +const PropertyInfo qdev_prop_uint32_array =3D + DEFINE_PROP_ARRAY_INFO(qdev_prop_uint32, uint32_t, &uint32List_type_in= fo); +const PropertyInfo qdev_prop_uint64_array =3D + DEFINE_PROP_ARRAY_INFO(qdev_prop_uint64, uint64_t, &uint64List_type_in= fo); +const PropertyInfo qdev_prop_string_array =3D + DEFINE_PROP_ARRAY_INFO(qdev_prop_string, char *, &strList_type_info); + +const PropertyInfo qdev_prop_link_array =3D + DEFINE_PROP_ARRAY_INFO(qdev_prop_link, void *, &strList_type_info); =20 /* --- public helpers --- */ =20 diff --git a/hw/display/apple-gfx.m b/hw/display/apple-gfx.m index 4db80f0b10..0e91a5adce 100644 --- a/hw/display/apple-gfx.m +++ b/hw/display/apple-gfx.m @@ -16,6 +16,7 @@ #include "qemu/cutils.h" #include "qemu/log.h" #include "qapi/qapi-builtin-type-infos.h" +#include "hw/core/qdev-prop-internal.h" #include "qapi/visitor.h" #include "qapi/error.h" #include "qemu/aio-wait.h" @@ -880,3 +881,8 @@ static void apple_gfx_set_display_mode(Object *obj, Vis= itor *v, .get =3D apple_gfx_get_display_mode, .set =3D apple_gfx_set_display_mode, }; + +const PropertyInfo qdev_prop_apple_gfx_display_mode_array =3D + DEFINE_PROP_ARRAY_INFO(qdev_prop_apple_gfx_display_mode, + AppleGFXDisplayMode, + &strList_type_info); --=20 2.55.0 From nobody Mon Nov 23 04:26:31 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1793874389; cv=none; d=zohomail.com; s=zohoarc; b=Lc2Uo5sfmSuVJJ7FM7PH6awt7mV3PdOSQhlvBTDT++slMOvQxNevTfOi6G0gqA9R6w2n0rSt3bD8yG2LVj4y5HgOfbtQ6+wvltlcEN3OEf7SlIGsBD1y6ktQU4G7ER6/xaaxAHDSSbU4ixj9BmiLrI/q77Y9qSYWIf/e32x45KM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793874389; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=xAfEuatci1dHiVvN5A9X9C5vcwub+GNy2q0HTBA89kY=; b=gdreJLjDujyYor12F8dsivPwugvBk5sW/YDo5ZS9ZBxflVycgyMc0rTl0KQu2w2kQM+XeDi34ffmN8IivY6GHwGM1txquroP7t8NBvp7bAEmAXYnhJp7NlmCnp0HQIsSucUBovnBtUpzoWOWpdPlTV0HCeKQzaFVMUZerRvUsh4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1793874389432596.5877418048791; Thu, 5 Nov 2026 02:26:29 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xOufa-0003DT-ND; Thu, 05 Nov 2026 05:26:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xOuf5-0002so-JJ for qemu-devel@nongnu.org; Thu, 05 Nov 2026 05:25:45 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xOuf3-0004A7-05 for qemu-devel@nongnu.org; Thu, 05 Nov 2026 05:25:39 -0500 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-606-o3L5yvUDP4mSOEyshuiYkA-1; Thu, 05 Nov 2026 05:25:34 -0500 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id EB3921956078 for ; Thu, 5 Nov 2026 10:25:33 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.44.22.2]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 7317E1956049 for ; Thu, 5 Nov 2026 10:25:33 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 0670921E6880; Thu, 05 Nov 2026 11:25:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1793874335; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xAfEuatci1dHiVvN5A9X9C5vcwub+GNy2q0HTBA89kY=; b=M3jEAkCS3NnVzItg4fso/YirkntxMZv3hCRurOX7vWUSYUI2yUWwVuZoBDuokWclVO3rq5 B1XISbe8NiLQT/o2HBJaaDmp7nyMEvaSebVLGUmFr65h1tGrZoq2NLdeVNSe9lhYHsaA+t R57LcqWLGMbjaFgzu8IbDQzoDsUtxvs= X-MC-Unique: o3L5yvUDP4mSOEyshuiYkA-1 X-Mimecast-MFC-AGG-ID: o3L5yvUDP4mSOEyshuiYkA_1793874334 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: marcandre.lureau@redhat.com, pbonzini@redhat.com, berrange@redhat.com Subject: [PATCH v2 2/3] qdev: Remove unused DEFINE_PROP_ARRAY parameter _arraytype Date: Thu, 5 Nov 2026 11:25:29 +0100 Message-ID: <20261105102530.1848823-3-armbru@redhat.com> In-Reply-To: <20261105102530.1848823-1-armbru@redhat.com> References: <20261105102530.1848823-1-armbru@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 5 X-Spam_score: 0.5 X-Spam_bar: / X-Spam_report: (0.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1793874391664158500 From: Marc-Andr=C3=A9 Lureau Signed-off-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Markus Armbruster --- include/hw/block/block.h | 2 +- include/hw/core/qdev-properties.h | 14 +++++--------- hw/input/stellaris_gamepad.c | 2 +- hw/intc/arm_gicv3_common.c | 2 +- hw/intc/arm_gicv5_common.c | 4 ++-- hw/intc/rx_icu.c | 4 ++-- hw/misc/arm_sysctl.c | 4 ++-- hw/misc/mps2-scc.c | 2 +- hw/net/rocker/rocker.c | 2 +- hw/net/virtio-net.c | 2 +- hw/nvram/xlnx-efuse.c | 2 +- hw/nvram/xlnx-versal-efuse-ctrl.c | 2 +- hw/riscv/riscv_hart.c | 6 ++---- hw/virtio/virtio-iommu-pci.c | 2 +- tests/unit/test-qdev.c | 2 +- hw/display/apple-gfx-mmio.m | 2 +- hw/display/apple-gfx-pci.m | 2 +- 17 files changed, 25 insertions(+), 31 deletions(-) diff --git a/include/hw/block/block.h b/include/hw/block/block.h index c0a8b84df1..4a4c5f9292 100644 --- a/include/hw/block/block.h +++ b/include/hw/block/block.h @@ -83,7 +83,7 @@ static inline unsigned int get_physical_block_exp(BlockCo= nf *conf) _conf.account_failed, ON_OFF_AUTO_AUTO), \ DEFINE_PROP_ARRAY("stats-intervals", _state, \ _conf.num_stats_intervals, _conf.stats_intervals, \ - qdev_prop_uint32, uint32_t) + qdev_prop_uint32) =20 #define DEFINE_BLOCK_PROPERTIES(_state, _conf) \ DEFINE_PROP_DRIVE("drive", _state, _conf.blk), \ diff --git a/include/hw/core/qdev-properties.h b/include/hw/core/qdev-prope= rties.h index 36a448be20..7187df0216 100644 --- a/include/hw/core/qdev-properties.h +++ b/include/hw/core/qdev-properties.h @@ -144,17 +144,15 @@ extern const PropertyInfo qdev_prop_link_array; * @_name: name of the array * @_state: name of the device state structure type * @_field: uint32_t field in @_state to hold the array length - * @_arrayfield: field in @_state (of type '@_arraytype *') which - * will point to the array + * @_arrayfield: field in @_state which will point to the array * @_arrayprop: PropertyInfo for the array elements (e.g. qdev_prop_uint32= ); * a corresponding array PropertyInfo named @_arrayprop##_arr= ay * must exist - * @_arraytype: C type of the array elements * * Define device properties for a variable-length array _name. The array = is * represented as a list in the visitor interface. * - * @_arraytype is required to be movable with memcpy(). + * The element type must be movable with memcpy(). * * When the array property is set, the @_field member of the device * struct is set to the array length, and @_arrayfield is set to point @@ -164,7 +162,7 @@ extern const PropertyInfo qdev_prop_link_array; * @_arrayfield memory. */ #define DEFINE_PROP_ARRAY(_name, _state, _field, \ - _arrayfield, _arrayprop, _arraytype) \ + _arrayfield, _arrayprop) \ DEFINE_PROP(_name, _state, _field, _arrayprop##_array, uint32_t, \ .set_default =3D true, \ .defval.u =3D 0, \ @@ -179,10 +177,8 @@ extern const PropertyInfo qdev_prop_link_array; * @_name: name of the array * @_state: name of the device state structure type * @_field: uint32_t field in @_state to hold the array length - * @_arrayfield: field in @_state (of type '@_arraytype *') which - * will point to the array + * @_arrayfield: field in @_state which will point to the array * @_linktype: QOM type name of the link type - * @_arraytype: C type of the array elements * * Define device properties for a variable-length array _name of links * (i.e. this is the array version of DEFINE_PROP_LINK). @@ -191,7 +187,7 @@ extern const PropertyInfo qdev_prop_link_array; * where each string is the QOM path of the object to be linked. */ #define DEFINE_PROP_LINK_ARRAY(_name, _state, _field, _arrayfield, \ - _linktype, _arraytype) \ + _linktype) \ DEFINE_PROP(_name, _state, _field, qdev_prop_link_array, uint32_t, \ .set_default =3D true, \ .defval.u =3D 0, \ diff --git a/hw/input/stellaris_gamepad.c b/hw/input/stellaris_gamepad.c index 376d91abad..20613f6499 100644 --- a/hw/input/stellaris_gamepad.c +++ b/hw/input/stellaris_gamepad.c @@ -80,7 +80,7 @@ static void stellaris_gamepad_reset_enter(Object *obj, Re= setType type) =20 static const Property stellaris_gamepad_properties[] =3D { DEFINE_PROP_ARRAY("keycodes", StellarisGamepad, num_buttons, - keycodes, qdev_prop_uint32, uint32_t), + keycodes, qdev_prop_uint32), }; =20 static void stellaris_gamepad_class_init(ObjectClass *klass, const void *d= ata) diff --git a/hw/intc/arm_gicv3_common.c b/hw/intc/arm_gicv3_common.c index f7ba74e6d5..1298b6b735 100644 --- a/hw/intc/arm_gicv3_common.c +++ b/hw/intc/arm_gicv3_common.c @@ -615,7 +615,7 @@ static const Property arm_gicv3_common_properties[] =3D= { */ DEFINE_PROP_BOOL("force-8-bit-prio", GICv3State, force_8bit_prio, 0), DEFINE_PROP_ARRAY("redist-region-count", GICv3State, nb_redist_regions, - redist_region_count, qdev_prop_uint32, uint32_t), + redist_region_count, qdev_prop_uint32), DEFINE_PROP_LINK("sysmem", GICv3State, dma, TYPE_MEMORY_REGION, MemoryRegion *), DEFINE_PROP_UINT32("first-cpu-index", GICv3State, first_cpu_idx, 0), diff --git a/hw/intc/arm_gicv5_common.c b/hw/intc/arm_gicv5_common.c index 2920b11cc3..40c1956a47 100644 --- a/hw/intc/arm_gicv5_common.c +++ b/hw/intc/arm_gicv5_common.c @@ -191,9 +191,9 @@ static void gicv5_common_realize(DeviceState *dev, Erro= r **errp) =20 static const Property arm_gicv5_common_properties[] =3D { DEFINE_PROP_LINK_ARRAY("cpus", GICv5Common, num_cpus, - cpus, TYPE_ARM_CPU, ARMCPU *), + cpus, TYPE_ARM_CPU), DEFINE_PROP_ARRAY("cpu-iaffids", GICv5Common, num_cpu_iaffids, - cpu_iaffids, qdev_prop_uint32, uint32_t), + cpu_iaffids, qdev_prop_uint32), DEFINE_PROP_UINT32("irsid", GICv5Common, irsid, 0), DEFINE_PROP_UINT32("spi-range", GICv5Common, spi_range, 0), DEFINE_PROP_UINT32("spi-base", GICv5Common, spi_base, 0), diff --git a/hw/intc/rx_icu.c b/hw/intc/rx_icu.c index 992b069ae2..125a6dcb68 100644 --- a/hw/intc/rx_icu.c +++ b/hw/intc/rx_icu.c @@ -356,9 +356,9 @@ static const VMStateDescription vmstate_rxicu =3D { =20 static const Property rxicu_properties[] =3D { DEFINE_PROP_ARRAY("ipr-map", RXICUState, nr_irqs, map, - qdev_prop_uint8, uint8_t), + qdev_prop_uint8), DEFINE_PROP_ARRAY("trigger-level", RXICUState, nr_sense, init_sense, - qdev_prop_uint8, uint8_t), + qdev_prop_uint8), }; =20 static void rxicu_class_init(ObjectClass *klass, const void *data) diff --git a/hw/misc/arm_sysctl.c b/hw/misc/arm_sysctl.c index ebc95b9bb5..1df85593a5 100644 --- a/hw/misc/arm_sysctl.c +++ b/hw/misc/arm_sysctl.c @@ -626,10 +626,10 @@ static const Property arm_sysctl_properties[] =3D { DEFINE_PROP_UINT32("proc_id", arm_sysctl_state, proc_id, 0), /* Daughterboard power supply voltages (as reported via SYS_CFG) */ DEFINE_PROP_ARRAY("db-voltage", arm_sysctl_state, db_num_vsensors, - db_voltage, qdev_prop_uint32, uint32_t), + db_voltage, qdev_prop_uint32), /* Daughterboard clock reset values (as reported via SYS_CFG) */ DEFINE_PROP_ARRAY("db-clock", arm_sysctl_state, db_num_clocks, - db_clock_reset, qdev_prop_uint32, uint32_t), + db_clock_reset, qdev_prop_uint32), }; =20 static void arm_sysctl_class_init(ObjectClass *klass, const void *data) diff --git a/hw/misc/mps2-scc.c b/hw/misc/mps2-scc.c index 554b504c72..32f9e166fe 100644 --- a/hw/misc/mps2-scc.c +++ b/hw/misc/mps2-scc.c @@ -464,7 +464,7 @@ static const Property mps2_scc_properties[] =3D { * motherboard configuration controller to suit the FPGA image. */ DEFINE_PROP_ARRAY("oscclk", MPS2SCC, num_oscclk, oscclk_reset, - qdev_prop_uint32, uint32_t), + qdev_prop_uint32), }; =20 static void mps2_scc_class_init(ObjectClass *klass, const void *data) diff --git a/hw/net/rocker/rocker.c b/hw/net/rocker/rocker.c index 910dce901b..afbc32e99d 100644 --- a/hw/net/rocker/rocker.c +++ b/hw/net/rocker/rocker.c @@ -1466,7 +1466,7 @@ static const Property rocker_properties[] =3D { DEFINE_PROP_UINT64("switch_id", Rocker, switch_id, 0), DEFINE_PROP_ARRAY("ports", Rocker, fp_ports, - fp_ports_peers, qdev_prop_netdev, NICPeers), + fp_ports_peers, qdev_prop_netdev), }; =20 static const VMStateDescription rocker_vmsd =3D { diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 54e42cfec9..0bdd5a005d 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -4380,7 +4380,7 @@ static const Property virtio_net_properties[] =3D { DEFINE_PROP_BIT64("hash", VirtIONet, host_features, VIRTIO_NET_F_HASH_REPORT, false), DEFINE_PROP_ARRAY("ebpf-rss-fds", VirtIONet, nr_ebpf_rss_fds, - ebpf_rss_fds, qdev_prop_string, char*), + ebpf_rss_fds, qdev_prop_string), DEFINE_PROP_BIT64("guest_rsc_ext", VirtIONet, host_features, VIRTIO_NET_F_RSC_EXT, false), DEFINE_PROP_UINT32("rsc_interval", VirtIONet, rsc_timeout, diff --git a/hw/nvram/xlnx-efuse.c b/hw/nvram/xlnx-efuse.c index 7d2030f7aa..c75704662a 100644 --- a/hw/nvram/xlnx-efuse.c +++ b/hw/nvram/xlnx-efuse.c @@ -267,7 +267,7 @@ static const Property efuse_properties[] =3D { DEFINE_PROP_UINT32("efuse-size", XlnxEFuse, efuse_size, 64 * 32), DEFINE_PROP_BOOL("init-factory-tbits", XlnxEFuse, init_tbits, true), DEFINE_PROP_ARRAY("read-only", XlnxEFuse, ro_bits_cnt, ro_bits, - qdev_prop_uint32, uint32_t), + qdev_prop_uint32), }; =20 static void efuse_class_init(ObjectClass *klass, const void *data) diff --git a/hw/nvram/xlnx-versal-efuse-ctrl.c b/hw/nvram/xlnx-versal-efuse= -ctrl.c index f5d5587cb6..101320b82f 100644 --- a/hw/nvram/xlnx-versal-efuse-ctrl.c +++ b/hw/nvram/xlnx-versal-efuse-ctrl.c @@ -740,7 +740,7 @@ static const Property efuse_ctrl_props[] =3D { TYPE_XLNX_EFUSE, XlnxEFuse *), DEFINE_PROP_ARRAY("pg0-lock", XlnxVersalEFuseCtrl, extra_pg0_lock_n16, - extra_pg0_lock_spec, qdev_prop_uint16, uint16_t), + extra_pg0_lock_spec, qdev_prop_uint16), }; =20 static void efuse_ctrl_class_init(ObjectClass *klass, const void *data) diff --git a/hw/riscv/riscv_hart.c b/hw/riscv/riscv_hart.c index 32fd39737f..132cf87370 100644 --- a/hw/riscv/riscv_hart.c +++ b/hw/riscv/riscv_hart.c @@ -48,11 +48,9 @@ static const Property riscv_harts_props[] =3D { * defined by "rnmi-exception-vector". */ DEFINE_PROP_ARRAY("rnmi-interrupt-vector", RISCVHartArrayState, - num_rnmi_irqvec, rnmi_irqvec, qdev_prop_uint64, - uint64_t), + num_rnmi_irqvec, rnmi_irqvec, qdev_prop_uint64), DEFINE_PROP_ARRAY("rnmi-exception-vector", RISCVHartArrayState, - num_rnmi_excpvec, rnmi_excpvec, qdev_prop_uint64, - uint64_t), + num_rnmi_excpvec, rnmi_excpvec, qdev_prop_uint64), DEFINE_PROP_LINK("memory", RISCVHartArrayState, memory, TYPE_MEMORY_REGION, MemoryRegion *), }; diff --git a/hw/virtio/virtio-iommu-pci.c b/hw/virtio/virtio-iommu-pci.c index 7b5ffddc1e..1f3a07c5d1 100644 --- a/hw/virtio/virtio-iommu-pci.c +++ b/hw/virtio/virtio-iommu-pci.c @@ -38,7 +38,7 @@ static const Property virtio_iommu_pci_properties[] =3D { DEFINE_PROP_UINT32("class", VirtIOPCIProxy, class_code, 0), DEFINE_PROP_ARRAY("reserved-regions", VirtIOIOMMUPCI, vdev.nr_prop_resv_regions, vdev.prop_resv_regions, - qdev_prop_reserved_region, ReservedRegion), + qdev_prop_reserved_region), }; =20 static void virtio_iommu_pci_realize(VirtIOPCIProxy *vpci_dev, Error **err= p) diff --git a/tests/unit/test-qdev.c b/tests/unit/test-qdev.c index 77c3eee717..8cd004b1ef 100644 --- a/tests/unit/test-qdev.c +++ b/tests/unit/test-qdev.c @@ -23,7 +23,7 @@ static const Property my_dev_props[] =3D { DEFINE_PROP_UINT32("u32", MyDev, prop_u32, 100), DEFINE_PROP_STRING("string", MyDev, prop_string), DEFINE_PROP_ARRAY("array-u32", MyDev, prop_array_u32_nb, prop_array_u3= 2, - qdev_prop_uint32, uint32_t), + qdev_prop_uint32), }; =20 static void my_dev_class_init(ObjectClass *oc, const void *data) diff --git a/hw/display/apple-gfx-mmio.m b/hw/display/apple-gfx-mmio.m index 58beaadd1f..dcd04617eb 100644 --- a/hw/display/apple-gfx-mmio.m +++ b/hw/display/apple-gfx-mmio.m @@ -258,7 +258,7 @@ static void apple_gfx_mmio_reset(Object *obj, ResetType= type) static const Property apple_gfx_mmio_properties[] =3D { DEFINE_PROP_ARRAY("display-modes", AppleGFXMMIOState, common.num_display_modes, common.display_modes, - qdev_prop_apple_gfx_display_mode, AppleGFXDisplayMod= e), + qdev_prop_apple_gfx_display_mode), }; =20 static void apple_gfx_mmio_class_init(ObjectClass *klass, const void *data) diff --git a/hw/display/apple-gfx-pci.m b/hw/display/apple-gfx-pci.m index b0694f4cb8..74f79c8b15 100644 --- a/hw/display/apple-gfx-pci.m +++ b/hw/display/apple-gfx-pci.m @@ -118,7 +118,7 @@ static void apple_gfx_pci_reset(Object *obj, ResetType = type) static const Property apple_gfx_pci_properties[] =3D { DEFINE_PROP_ARRAY("display-modes", AppleGFXPCIState, common.num_display_modes, common.display_modes, - qdev_prop_apple_gfx_display_mode, AppleGFXDisplayMod= e), + qdev_prop_apple_gfx_display_mode), }; =20 static void apple_gfx_pci_class_init(ObjectClass *klass, const void *data) --=20 2.55.0 From nobody Mon Nov 23 04:26:31 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1793874365; cv=none; d=zohomail.com; s=zohoarc; b=H3r6abpx5GiChhS65qSq0j7h0exJ6VgEY50LrpIUDEyzeqnuOWgg4CeEwt8fQW8JJgiAIli3i8QBG8WclfyPbRVbYAiSv/zrd2YluBM4MWzVjG0aEBG5andUBchA2g0oJvkDGv1bw/rktuHtWQ9SjJruX8i5Ek+5rxzNH7fFnFM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793874365; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=2ZJgzPDXNp6KmmiAAbhFuvD3REHqo8RS9MhS9UIiUCA=; b=dRGvjXQj7hppJJYSkH9E3kCWwIKH8eTNE9Vvr7gTCETjwAOswQYyin1X+fCDp+TJ1skUwnvEYyFZlS2GcIGAfOCnXiXhJSj1x+RF/pQNzopsRYaaVo8ZTIKpoXAPjhkNEhf2dFW8iegYX9DnMoym6DdQzRFy3dSZI1J+xIDn0tA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 179387436525584.58809724834725; Thu, 5 Nov 2026 02:26:05 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xOufN-000325-DM; Thu, 05 Nov 2026 05:25:58 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xOuf4-0002qO-TU for qemu-devel@nongnu.org; Thu, 05 Nov 2026 05:25:40 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xOuf3-0004AC-DV for qemu-devel@nongnu.org; Thu, 05 Nov 2026 05:25:38 -0500 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-101-vJGfFc8SNQaPF-HSZTOcdA-1; Thu, 05 Nov 2026 05:25:34 -0500 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A76A41955DD7 for ; Thu, 5 Nov 2026 10:25:33 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.44.22.2]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 5C8611956047 for ; Thu, 5 Nov 2026 10:25:33 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 0A9D521E6882; Thu, 05 Nov 2026 11:25:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1793874336; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2ZJgzPDXNp6KmmiAAbhFuvD3REHqo8RS9MhS9UIiUCA=; b=E7l2hKVX7GFcQFN2ZZVTpJVp9By3Hpi6gkD1yVbQz2OnCREbOyusu9tEi9u4uOg4Do3LAN 80NFZkFwq/yZt68DjADQYDdVkP/kB+tnKQzGCqgMNRhCEC4CmLtIxQzJ3EChq5jQmcYX6e OYEmrShHGsiiI9pp3rgfrbAoEGQoIY0= X-MC-Unique: vJGfFc8SNQaPF-HSZTOcdA-1 X-Mimecast-MFC-AGG-ID: vJGfFc8SNQaPF-HSZTOcdA_1793874333 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: marcandre.lureau@redhat.com, pbonzini@redhat.com, berrange@redhat.com Subject: [PATCH v2 3/3] qapi/qom: Make @qapi-type mandatory in output of qom-list etc. Date: Thu, 5 Nov 2026 11:25:30 +0100 Message-ID: <20261105102530.1848823-4-armbru@redhat.com> In-Reply-To: <20261105102530.1848823-1-armbru@redhat.com> References: <20261105102530.1848823-1-armbru@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 5 X-Spam_score: 0.5 X-Spam_bar: / X-Spam_report: (0.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1793874367183158500 Content-Type: text/plain; charset="utf-8" Commit 0eee31cf108 (qapi/qom: add qapi-type to qom-list, qom-list-properties, qom-list-get) had to make @qapi-type optional to enable incremental conversion to QAPI-aware property registration. This conversion is now complete: @qapi-type is always present. Make it mandatory. Signed-off-by: Markus Armbruster Reviewed-by: Marc-Andr=C3=A9 Lureau --- qapi/qom.json | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/qapi/qom.json b/qapi/qom.json index 32a5926936..cc642c7ba9 100644 --- a/qapi/qom.json +++ b/qapi/qom.json @@ -36,8 +36,7 @@ # graph. # # @qapi-type: the name of the property's type as it appears in the -# output of ``query-qmp-schema``. Absent if the type does not -# occur there. (since 11.2) +# output of ``query-qmp-schema``. (since 11.2) # # @description: if specified, the description of the property. # @@ -52,7 +51,7 @@ { 'struct': 'ObjectPropertyInfo', 'data': { 'name': 'str', 'type': 'str', - '*qapi-type': { 'type': 'str', 'features': [ 'unstable' ] }, + 'qapi-type': { 'type': 'str', 'features': [ 'unstable' ] }, '*description': 'str', '*default-value': 'any' } } =20 @@ -65,8 +64,7 @@ # `ObjectPropertyInfo`. # # @qapi-type: the name of the property's type as it appears in the -# output of ``query-qmp-schema``. Absent if the type does not -# occur there. (since 11.2) +# output of ``query-qmp-schema``. (since 11.2) # # @value: the value of the property. Absent when the property cannot # be read. @@ -80,7 +78,7 @@ { 'struct': 'ObjectPropertyValue', 'data': { 'name': 'str', 'type': 'str', - '*qapi-type': { 'type': 'str', 'features': [ 'unstable' ] }, + 'qapi-type': { 'type': 'str', 'features': [ 'unstable' ] }, '*value': 'any' } } =20 ## --=20 2.55.0