All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: "Marc-André Lureau" <marcandre.lureau@redhat.com>
Cc: qemu-devel@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	"Michael Roth" <michael.roth@amd.com>,
	"Pierrick Bouvier" <pierrick.bouvier@oss.qualcomm.com>,
	"Philippe Mathieu-Daudé" <philmd@mailo.com>
Subject: Re: [PATCH v2 50/53] qdev: simplify DEFINE_PROP_ARRAY and remove generic array PropertyInfo
Date: Tue, 28 Jul 2026 09:35:02 +0200	[thread overview]
Message-ID: <87wlufword.fsf@pond.sub.org> (raw)
In-Reply-To: <20260616-qom-qapi-v2-50-cc9396b9c18c@redhat.com> ("Marc-André Lureau"'s message of "Tue, 16 Jun 2026 00:38:16 +0400")

Marc-André Lureau <marcandre.lureau@redhat.com> writes:

> Change DEFINE_PROP_ARRAY, the macro now uses _arrayprop##_list to
> resolve the typed list PropertyInfo (introduced in the previous patch)
> instead of the generic qdev_prop_array.
>
> This means the element type and size information is carried by the
> PropertyInfo itself rather than duplicated at each callsite. Since
> the typed list PropertyInfos encode element_info and element_size,
> the .arrayinfo and .arrayfieldsize fields are no longer set by the
> macro (they will be removed from the Property struct in the next patch).
>
> Remove qdev_prop_array, which is now unused.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>

[...]

> diff --git a/hw/intc/arm_gicv5_common.c b/hw/intc/arm_gicv5_common.c
> index b155486af65..61c8ae49302 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, Error **errp)
>  
>  static const Property arm_gicv5_common_properties[] = {
>      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),

Doesn't compile for me.  I applied the series at merge commit
8333dba732.  If it compiles for you, could you push it to where I can
pull?

FAILED: [code=1] libsystem.a.p/hw_intc_arm_gicv5_common.c.o 
cc -m64 -Ilibsystem.a.p -I. -I.. -Isubprojects/libvduse -I../subprojects/libvduse -Iui -Iqapi -Itrace -Iui/shader -I/usr/include/p11-kit-1 -I/usr/include/pixman-1 -I/usr/include/libpng16 -I/usr/include/spice-server -I/usr/include/spice-1 -I/usr/include/opus -I/usr/include/cacard -I/usr/include/nss3 -I/usr/include/nspr4 -I/usr/include/PCSC -I/usr/include/gstreamer-1.0 -I/usr/include/libdrm -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-6 -I/usr/include/orc-0.4 -I/usr/include/libusb-1.0 -I/usr/include/SDL2 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/gio-unix-2.0 -I/usr/include/slirp -I/usr/local/include -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/cloudproviders -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/glycin-2 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/atk-1.0 -I/usr/lib64/pkgconfig/../../include/dbus-1.0 -I/usr/lib64/pkgconfig/../../lib64/dbus-1.0/include -I/usr/include/fribidi -I/usr/include/libxml2 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/vte-2.91 -I/usr/include/rav1e -I/usr/include/svt-av1 -I/usr/include/libvmaf -I/usr/include/webp -I/usr/include/virgl -I/usr/include/fuse3 -I/usr/include/uuid -I/usr/include/pipewire-0.3 -I/usr/include/spa-0.2 -fdiagnostics-color=auto -Wall -Winvalid-pch -Werror -std=gnu11 -O2 -g -mcx16 -msse2 -D_GNU_SOURCE -D_LARGEFILE_SOURCE -fno-strict-aliasing -fno-common -fwrapv -ftrivial-auto-var-init=zero -fzero-call-used-regs=used-gpr -fstack-protector-strong -Wempty-body -Wendif-labels -Wexpansion-to-defined -Wformat-overflow=2 -Wformat-security -Wformat-y2k -Wignored-qualifiers -Wimplicit-fallthrough=2 -Winit-self -Wmissing-format-attribute -Wmissing-prototypes -Wnested-externs -Wold-style-declaration -Wold-style-definition -Wredundant-decls -Wshadow=local -Wstrict-prototypes -Wtype-limits -Wundef -Wvla -Wwrite-strings -Wno-missing-include-dirs -Wno-psabi -Wno-shift-negative-value -isystem /work/armbru/qemu/linux-headers -isystem linux-headers -iquote . -iquote /work/armbru/qemu -iquote /work/armbru/qemu/include -iquote /work/armbru/qemu/host/include/x86_64 -iquote /work/armbru/qemu/host/include/generic -iquote /work/armbru/qemu/tcg/x86_64 -pthread -DSTAP_SDT_V2 -fPIE -D_FILE_OFFSET_BITS=64 -D__USE_FILE_OFFSET64 -D__USE_LARGEFILE64 -DUSE_POSIX_ACLS=1 -DHWY_SHARED_DEFINE -DAVIF_DLL -DEB_DLL -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DNCURSES_WIDECHAR=1 -D_GNU_SOURCE=1 -D_REENTRANT -DSTRUCT_IOVEC_DEFINED -DWITH_GZFILEOP -DCONFIG_SOFTMMU -DCOMPILING_SYSTEM_VS_USER -MD -MQ libsystem.a.p/hw_intc_arm_gicv5_common.c.o -MF libsystem.a.p/hw_intc_arm_gicv5_common.c.o.d -o libsystem.a.p/hw_intc_arm_gicv5_common.c.o -c ../hw/intc/arm_gicv5_common.c
In file included from ../hw/intc/arm_gicv5_common.c:12:
/work/armbru/qemu/include/hw/core/qdev-properties.h:195:40: error: ‘qdev_prop_array’ undeclared here (not in a function); did you mean ‘qdev_prop_set_array’?
  195 |     DEFINE_PROP(_name, _state, _field, qdev_prop_array, uint32_t,       \
      |                                        ^~~~~~~~~~~~~~~
/work/armbru/qemu/include/hw/core/qdev-properties.h:88:24: note: in definition of macro ‘DEFINE_PROP’
   88 |         .info      = &(_prop),                                   \
      |                        ^~~~~
../hw/intc/arm_gicv5_common.c:193:5: note: in expansion of macro ‘DEFINE_PROP_LINK_ARRAY’
  193 |     DEFINE_PROP_LINK_ARRAY("cpus", GICv5Common, num_cpus,
      |     ^~~~~~~~~~~~~~~~~~~~~~
../hw/intc/arm_gicv5_common.c:196:62: error: macro ‘DEFINE_PROP_ARRAY’ passed 6 arguments, but takes just 5
  196 |                       cpu_iaffids, qdev_prop_uint32, uint32_t),
      |                                                              ^
/work/armbru/qemu/include/hw/core/qdev-properties.h:166:9: note: macro ‘DEFINE_PROP_ARRAY’ defined here
  166 | #define DEFINE_PROP_ARRAY(_name, _state, _field,                        \
      |         ^~~~~~~~~~~~~~~~~
../hw/intc/arm_gicv5_common.c:195:5: error: ‘DEFINE_PROP_ARRAY’ undeclared here (not in a function)
  195 |     DEFINE_PROP_ARRAY("cpu-iaffids", GICv5Common, num_cpu_iaffids,
      |     ^~~~~~~~~~~~~~~~~

[...]



  reply	other threads:[~2026-07-28  7:36 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-15 20:37 [PATCH v2 00/53] qom/qdev: associate properties with QAPI schema types Marc-André Lureau
2026-06-15 20:37 ` [PATCH v2 01/53] qapi: add QAPITypeInfo struct definition Marc-André Lureau
2026-07-31 11:43   ` Markus Armbruster
2026-06-15 20:37 ` [PATCH v2 02/53] qapi/introspect: expose the type name map Marc-André Lureau
2026-06-15 20:37 ` [PATCH v2 03/53] qapi: add type-infos generator Marc-André Lureau
2026-06-15 20:37 ` [PATCH v2 04/53] qapi/backend: wire up type-infos generation Marc-André Lureau
2026-06-15 20:37 ` [PATCH v2 05/53] qapi/gen: fix _module_basename for multi-dash 'what' parameters Marc-André Lureau
2026-06-15 20:37 ` [PATCH v2 06/53] meson: add qapi-type-infos-*.c/h to build Marc-André Lureau
2026-06-15 20:37 ` [PATCH v2 07/53] qom: add qapi_type field to ObjectProperty Marc-André Lureau
2026-06-15 20:37 ` [PATCH v2 08/53] qapi/qom: add qapi-type field to ObjectPropertyInfo Marc-André Lureau
2026-06-15 20:37 ` [PATCH v2 09/53] qom/qmp: populate qapi-type in QMP handlers Marc-André Lureau
2026-06-15 20:37 ` [PATCH v2 10/53] qom: add QAPI-aware property registration Marc-André Lureau
2026-06-15 20:37 ` [PATCH v2 11/53] tests: update check-qom-proplist for " Marc-André Lureau
2026-06-15 20:37 ` [PATCH v2 12/53] qom: convert enum properties to QAPI-aware registration Marc-André Lureau
2026-06-15 20:37 ` [PATCH v2 13/53] qom: remove old enum property registration API Marc-André Lureau
2026-06-15 20:37 ` [PATCH v2 14/53] qom: convert struct properties to QAPI-aware registration Marc-André Lureau
2026-06-15 20:37 ` [PATCH v2 15/53] " Marc-André Lureau
2026-06-15 20:37 ` [PATCH v2 16/53] x86: convert OnOffAuto " Marc-André Lureau
2026-06-15 20:37 ` [PATCH v2 17/53] microvm: " Marc-André Lureau
2026-06-15 20:37 ` [PATCH v2 18/53] pc: convert OnOffAuto vmport property " Marc-André Lureau
2026-06-15 20:37 ` [PATCH v2 19/53] arm/virt: convert OnOffAuto acpi " Marc-André Lureau
2026-06-15 20:37 ` [PATCH v2 20/53] riscv/virt: convert OnOffAuto properties " Marc-André Lureau
2026-06-16  0:53   ` Alistair Francis
2026-06-15 20:37 ` [PATCH v2 21/53] loongarch/virt: " Marc-André Lureau
2026-06-15 20:37 ` [PATCH v2 22/53] hostmem-file: convert OnOffAuto rom property " Marc-André Lureau
2026-06-15 20:37 ` [PATCH v2 23/53] sev: convert OnOffAuto legacy-vm-type " Marc-André Lureau
2026-06-15 20:37 ` [PATCH v2 24/53] whpx: convert OnOffAuto hyperv " Marc-André Lureau
2026-06-15 20:37 ` [PATCH v2 25/53] whpx: convert OnOffAuto arch properties " Marc-André Lureau
2026-06-15 20:37 ` [PATCH v2 26/53] accel/kvm: convert OnOffSplit property " Marc-André Lureau
2026-06-15 20:37 ` [PATCH v2 27/53] whpx: " Marc-André Lureau
2026-06-15 20:37 ` [PATCH v2 28/53] ppc/spapr-caps: convert to QAPI-aware property registration Marc-André Lureau
2026-06-15 20:37 ` [PATCH v2 29/53] system/memory: fix "priority" property typename Marc-André Lureau
2026-06-15 20:37 ` [PATCH v2 30/53] hw/mem/nvdimm: fix "size" " Marc-André Lureau
2026-06-15 20:37 ` [PATCH v2 31/53] qom: convert scalar properties to QAPI-aware registration Marc-André Lureau
2026-06-15 20:37 ` [PATCH v2 32/53] i386/cpu: convert strList property " Marc-André Lureau
2026-06-15 20:37 ` [PATCH v2 33/53] accel/hvf: convert OnOffSplit " Marc-André Lureau
2026-06-15 20:38 ` [PATCH v2 34/53] i386/x86: convert SgxEPCList " Marc-André Lureau
2026-06-15 20:38 ` [PATCH v2 35/53] virtio-balloon: convert guest-stats property to QAPI type Marc-André Lureau
2026-06-15 20:38 ` [PATCH v2 36/53] qom: replace object_property_add_tm with StructTm " Marc-André Lureau
2026-06-15 20:38 ` [PATCH v2 37/53] hw/nvdimm: convert UUID property to QAPI-aware registration Marc-André Lureau
2026-06-15 20:38 ` [PATCH v2 38/53] hw/s390-virtio-ccw: convert loadparm " Marc-André Lureau
2026-06-15 20:38 ` [PATCH v2 39/53] hw/ppc/spapr_drc: convert fdt " Marc-André Lureau
2026-06-15 20:38 ` [PATCH v2 40/53] spdm-socket: convert SpdmTransportType to QAPI enum Marc-André Lureau
2026-06-15 20:38 ` [PATCH v2 41/53] hw/pci: change the busnr type to uint8 Marc-André Lureau
2026-06-15 20:38 ` [PATCH v2 42/53] qdev: add qapi_type field to PropertyInfo with fallback registration Marc-André Lureau
2026-06-15 20:38 ` [PATCH v2 43/53] qdev: convert core PropertyInfo definitions to use qapi_type Marc-André Lureau
2026-06-15 20:38 ` [PATCH v2 44/53] qdev: convert system " Marc-André Lureau
2026-06-15 20:38 ` [PATCH v2 45/53] hw: convert device-local " Marc-André Lureau
2026-06-15 20:38 ` [PATCH v2 46/53] target/riscv: fix incorrect QAPI types and u8 casting Marc-André Lureau
2026-06-16  0:54   ` Alistair Francis
2026-06-15 20:38 ` [PATCH v2 47/53] target/riscv: convert PropertyInfo definitions to use qapi_type Marc-André Lureau
2026-06-15 20:38 ` [PATCH v2 48/53] qdev: " Marc-André Lureau
2026-06-15 20:38 ` [PATCH v2 49/53] qdev: introduce typed array PropertyInfos Marc-André Lureau
2026-06-15 20:38 ` [PATCH v2 50/53] qdev: simplify DEFINE_PROP_ARRAY and remove generic array PropertyInfo Marc-André Lureau
2026-07-28  7:35   ` Markus Armbruster [this message]
2026-07-28  8:24     ` Markus Armbruster
2026-07-28  8:32       ` Marc-André Lureau
2026-06-15 20:38 ` [PATCH v2 51/53] qdev: remove deprecated PropertyInfo.type and .enum_table fields Marc-André Lureau
2026-06-15 20:38 ` [PATCH v2 52/53] memory: use object_property_add_link for container property Marc-André Lureau
2026-06-15 20:38 ` [PATCH v2 53/53] qom: use QAPITypeInfo in object_property_get_enum Marc-André Lureau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wlufword.fsf@pond.sub.org \
    --to=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=michael.roth@amd.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@mailo.com \
    --cc=pierrick.bouvier@oss.qualcomm.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.