[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 0/4] qom: Replace "automatic arrayification"
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 0/4] qom: Replace "automatic arrayification" |
Date: |
Thu, 13 Nov 2014 11:08:51 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 |
On 13/11/2014 09:08, Markus Armbruster wrote:
>> >
>> > I like the idea, but the API is just too ugly. :( Unfortunately I have
>> > nothing better to propose.
> For what it's worth, three out of four uses already need to free,
> because they append "[*]" to an argument string.
Yes, your API works well for the cases it's replacing now.
> Can you explain what you mean by "avoid making all memory region names
> array-ified", and why my API won't be usable for that?
Basically removing the "[*]" from memory_region_init, and instead adding
it to all callers. It can then be removed from those callers that do
not need array-ification, which is most of them.
But you would still need it in most non-qdevified devices. In that
case, the parent of the MemoryRegions is just /machine; hence, just
having two serial ports gives you two same-named memory regions. So
non-qdevified devices would require surgery to add
object_gen_new_property_name, and they exactly those that one doesn't
want to touch. :)
If everything were qdevified, I agree that object_gen_new_property_name
would be a fine API.
Paolo
- [Qemu-devel] [PATCH 2/4] memory: Use object_gen_new_property_name() instead of "arrayification", (continued)
[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 <=
- 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