Re: [PATCH 00/54] qom/qdev: associate properties with QAPI schema types

Marc-André Lureau <[email protected]>
Newsgroups gmane.comp.emulators.qemu
Message-ID <CAJ+F1CL1rWLeZZVXXUi6p8=-L7q-6HCuZdx39rtk-RRQ=76R5A@mail.gmail.com>
Hi

On Wed, Jul 29, 2026 at 2:04 PM Marc-André Lureau
<[email protected]> wrote:
>
> Hi
>
> On Wed, Jul 29, 2026 at 11:29 AM Markus Armbruster via qemu
> development <[email protected]> wrote:
> > > Along the way, a few pre-existing type mismatches in property
> > > definitions are fixed, the "struct tm" RTC property is replaced with a
> > > proper QAPI StructTm type etc. Introducing more specific types or a
> > > "typedef" to QAPI could help provide better associated type informations
> > > than plain "str" in many cases, for example.
> >
> > Examples?
> >
>
> Properties using str_type_info that carry structured values with their
> own validation: macaddr ("52:54:00:12:34:56"), PCI addresses
> ("04:00.0"), netdev names, chardev names, drive names, UUID strings. A
> QAPI "typedef" (or newtype) for e.g. MacAddr, PciDevAddr, UUID could
> let tools know these aren't arbitrary strings (see "hw/nvdimm: convert
> UUID property to QAPI-aware registration" patch).

On a related note, qapi-type for integers are all collapsed to "int"
(and list of). Even though json wire accepts "int", it would be nice
to retain the original type information.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.