qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 3/6] sysbus: Add user map hints


From: Alexander Graf
Subject: Re: [Qemu-devel] [PATCH 3/6] sysbus: Add user map hints
Date: Wed, 02 Jul 2014 11:19:48 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.6.0


On 02.07.14 11:17, Paolo Bonzini wrote:
Il 02/07/2014 11:07, Alexander Graf ha scritto:
So the way this is handled for links is its an open coded check
function added by the property adder. Check
qdev_prop_allow_set_link_before_realize() for a precedent.

However, unlike Alex's case the link setter is complicated and a simple tail call won't do. It first computes the "val" argument that is passed to the check function, then calls the check function, then does the actual set.

Memory hotplug is using "val", so we cannot simply change the check function's signature in such a way that we would use a tail call.

         I'll export all the simple integer get/set helpers to the world
and use object_property_add directly. That way I can also hook in my
release function that I need with this approach.

Good idea.  But please make a new header file.

New header file, but same .c file? Why?


Alex




reply via email to

[Prev in Thread] Current Thread [Next in Thread]