From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46981) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vkxua-0004Wr-EO for qemu-devel@nongnu.org; Mon, 25 Nov 2013 10:17:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VkxuU-0005Mp-9A for qemu-devel@nongnu.org; Mon, 25 Nov 2013 10:17:20 -0500 Received: from mx1.redhat.com ([209.132.183.28]:2232) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VkxuU-0005Ml-1X for qemu-devel@nongnu.org; Mon, 25 Nov 2013 10:17:14 -0500 Message-ID: <529369E7.3010905@redhat.com> Date: Mon, 25 Nov 2013 16:16:55 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1385001528-12003-1-git-send-email-imammedo@redhat.com> <1385001528-12003-9-git-send-email-imammedo@redhat.com> <5293492D.3050607@redhat.com> <20131125161052.0966dce5@nial.usersys.redhat.com> In-Reply-To: <20131125161052.0966dce5@nial.usersys.redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 08/27] dimm: implement dimm device abstraction List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: peter.maydell@linaro.org, mdroth@linux.vnet.ibm.com, mst@redhat.com, mjt@tls.msk.ru, stefanb@linux.vnet.ibm.com, stefanha@redhat.com, armbru@redhat.com, qemu-devel@nongnu.org, vasilis.liaskovitis@profitbricks.com, quintela@redhat.com, chegu_vinod@hp.com, kraxel@redhat.com, aliguori@amazon.com, hutao@cn.fujitsu.com, marcel.a@redhat.com, lcapitulino@redhat.com, afaerber@suse.de Il 25/11/2013 16:10, Igor Mammedov ha scritto: > In initial implementation I had 'backend' property which was exactly > just link<> to backend. > > but when adding dimm (CLI/Moinitor), I had to specify full QOM path > to backend which looked like -device dimm,id=foo1,backend=/backend/memdev[foo2] > which was ugly. So I moved to a currently used model by netdev > and replaced it with 'memdev' property. > > But since then backend path has changed to /backend/memdev/foo > so I guess it should be possible to use backend=foo for partial > path resolving should yield object without full path. Yes. > The only downside would be backend instance name in global name space. Two possibilities here: (1) accept that -object has a global namespace (2) in the aforementioned interface that helps command-line processing, add a method that returns the place where the object should be added in the QOM object tree. For memdevs this can return /backend/memdev. Paolo