From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48631) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2Go5-0002Pb-DI for qemu-devel@nongnu.org; Wed, 02 Jul 2014 05:26:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X2Gnx-0005Gt-CZ for qemu-devel@nongnu.org; Wed, 02 Jul 2014 05:26:25 -0400 Message-ID: <53B3D031.60906@redhat.com> Date: Wed, 02 Jul 2014 11:26:09 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1404251378-5242-1-git-send-email-agraf@suse.de> <1404251378-5242-4-git-send-email-agraf@suse.de> <53B3C1A8.7020408@suse.de> <53B3CBEC.1030701@suse.de> <53B3CE0C.2010700@redhat.com> <53B3CEB4.70408@suse.de> In-Reply-To: <53B3CEB4.70408@suse.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 3/6] sysbus: Add user map hints List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf , Peter Crosthwaite Cc: Peter Maydell , Eric Auger , "qemu-devel@nongnu.org Developers" , qemu-ppc Mailing List , "Stalley, Sean" , =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= Il 02/07/2014 11:19, Alexander Graf ha scritto: > > 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? I would all but complain about different .c file. :) Paolo