From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:49322) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sz2PG-0003AL-BQ for qemu-devel@nongnu.org; Wed, 08 Aug 2012 05:18:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sz2PE-0003Zf-55 for qemu-devel@nongnu.org; Wed, 08 Aug 2012 05:18:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:28630) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sz2PD-0003Yn-Tj for qemu-devel@nongnu.org; Wed, 08 Aug 2012 05:18:20 -0400 Message-ID: <50222ED4.40707@redhat.com> Date: Wed, 08 Aug 2012 12:18:12 +0300 From: Avi Kivity MIME-Version: 1.0 References: <1344407156-25562-1-git-send-email-qemulist@gmail.com> <1344407156-25562-6-git-send-email-qemulist@gmail.com> In-Reply-To: <1344407156-25562-6-git-send-email-qemulist@gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 05/15] memory: introduce life_ops to MemoryRegion List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Liu Ping Fan Cc: kvm@vger.kernel.org, Jan Kiszka , Marcelo Tosatti , qemu-devel@nongnu.org, Blue Swirl , Anthony Liguori , Stefan Hajnoczi , Paolo Bonzini , =?ISO-8859-1?Q?Andreas_F=E4rber?= On 08/08/2012 09:25 AM, Liu Ping Fan wrote: > From: Liu Ping Fan > > The types of referred object by MemoryRegion are variable, ex, > another mr, DeviceState, or other struct defined by drivers. > So the refer/unrefer may be different by drivers. > > Using this ops, we can mange the backend object. > Seems to be a needless abstration - we already have lifetime manangement for objects. I suggested previously to replace the opaque parameter with an Object, and use Object's refcounting. That's a lot of work, but IMO is worth it as the opaques are dangerous to live lying around. -- error compiling committee.c: too many arguments to function