Received: from eggs.gnu.org ([2001:4830:134:3::10]:54277) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yo9bq-0006T3-C0 for qemu-devel@nongnu.org; Fri, 01 May 2015 07:59:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yo9bn-0002zt-6P for qemu-devel@nongnu.org; Fri, 01 May 2015 07:59:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48420) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yo9bn-0002zh-1B for qemu-devel@nongnu.org; Fri, 01 May 2015 07:59:55 -0400 Date: Fri, 1 May 2015 08:59:51 -0300 From: Eduardo Habkost Message-ID: <20150501115951.GG17796@thinpad.lan.raisama.net> References: <5542A2DD.3040407@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <5542A2DD.3040407@redhat.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] cpu: Register QOM links at /machine/cpus/ List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: peter.maydell@linaro.org, mimu@linux.vnet.ibm.com, qemu-devel@nongnu.org, agraf@suse.de, borntraeger@de.ibm.com, bharata@linux.vnet.ibm.com, cornelia.huck@de.ibm.com, Igor Mammedov , Andreas =?iso-8859-1?Q?F=E4rber?= , david@gibson.dropbear.id.au On Thu, Apr 30, 2015 at 11:47:09PM +0200, Paolo Bonzini wrote: >=20 >=20 > On 30/04/2015 22:21, Andreas F=E4rber wrote: > >>+ cpu->self =3D cobj; > >>+ object_property_add_link(cpu_container, path, TYPE_CPU, &cpu->se= lf, NULL, > >>+ OBJ_PROP_LINK_UNREF_ON_RELEASE, &error_= abort); >=20 > Doesn't this leak the CPU object? I am not sure I follow. CPUs can't be destroyed today because there's no code to remove them from the global cpus list. The day we implement cpu_exec_uninit(), it should undo everything done by cpu_exec_init() including removing the link above and removing the CPU from the global cpus list. >=20 > I have a patch to add "." and ".." properties. You can use them to add > an alias to an object. What's the difference between a link and an alias to an object? --=20 Eduardo