From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 05/15] memory: introduce life_ops to MemoryRegion Date: Wed, 08 Aug 2012 12:18:12 +0300 Message-ID: <50222ED4.40707@redhat.com> References: <1344407156-25562-1-git-send-email-qemulist@gmail.com> <1344407156-25562-6-git-send-email-qemulist@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org, Anthony Liguori , Jan Kiszka , Marcelo Tosatti , Stefan Hajnoczi , Paolo Bonzini , Blue Swirl , =?ISO-8859-1?Q?Andreas_F=E4rber?= To: Liu Ping Fan Return-path: Received: from mx1.redhat.com ([209.132.183.28]:9420 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752664Ab2HHJSX (ORCPT ); Wed, 8 Aug 2012 05:18:23 -0400 In-Reply-To: <1344407156-25562-6-git-send-email-qemulist@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: 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