[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 4/4] Revert "qom: Add automatic arrayification t
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH 4/4] Revert "qom: Add automatic arrayification to object_property_add()" |
Date: |
Thu, 13 Nov 2014 10:50:14 +0000 |
On 13 November 2014 10:05, Paolo Bonzini <address@hidden> wrote:
>
>
> On 12/11/2014 23:47, Peter Maydell wrote:
>> On 12 November 2014 22:25, Paolo Bonzini <address@hidden> wrote:
>> > The plan was to move [*] down into the devices. Devices that do not
>> > need to arrayify properties (e.g. most qdev-ified devices) can then skip
>> > the [*] and have nicer names.
>>
>> Qdev devices have array properties already via a different
>> mechanism, right? (Did we have a plan to unify them somehow?)
>
> I've never looked into qdev array properties that much, actually.
qdev array properties work by:
* user of the device sets the "len-myarray" property to n
* this automatically causes the creation of properties
"myarray[0]" through to "myarray[n-1]" and allocation of
some memory to contain their values
* user of the device can then set those properties on the device
So you can use them to define properties which are
variable-length arrays, rather than having to decide at
build time how long the array could possibly be.
-- PMM
[Qemu-devel] [PATCH 3/4] qdev: Use object_gen_new_property_name() instead of "arrayification", Markus Armbruster, 2014/11/12
Re: [Qemu-devel] [PATCH 0/4] qom: Replace "automatic arrayification", Paolo Bonzini, 2014/11/12
- Re: [Qemu-devel] [PATCH 0/4] qom: Replace "automatic arrayification", Markus Armbruster, 2014/11/13
- Re: [Qemu-devel] [PATCH 0/4] qom: Replace "automatic arrayification", Paolo Bonzini, 2014/11/13
- Re: [Qemu-devel] [PATCH 0/4] qom: Replace "automatic arrayification", Markus Armbruster, 2014/11/13
- Re: [Qemu-devel] [PATCH 0/4] qom: Replace "automatic arrayification", Paolo Bonzini, 2014/11/13
- Re: [Qemu-devel] [PATCH 0/4] qom: Replace "automatic arrayification", Markus Armbruster, 2014/11/14
- Re: [Qemu-devel] [PATCH 0/4] qom: Replace "automatic arrayification", Paolo Bonzini, 2014/11/14
- Re: [Qemu-devel] [PATCH 0/4] qom: Replace "automatic arrayification", Markus Armbruster, 2014/11/14