From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46847) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2Gi1-00066q-35 for qemu-devel@nongnu.org; Wed, 02 Jul 2014 05:20:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X2Ght-0002zz-KX for qemu-devel@nongnu.org; Wed, 02 Jul 2014 05:20:09 -0400 Message-ID: <53B3CEB4.70408@suse.de> Date: Wed, 02 Jul 2014 11:19:48 +0200 From: Alexander Graf 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> In-Reply-To: <53B3CE0C.2010700@redhat.com> 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: Paolo Bonzini , Peter Crosthwaite Cc: Peter Maydell , Eric Auger , "qemu-devel@nongnu.org Developers" , qemu-ppc Mailing List , "Stalley, Sean" , =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= 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