From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36240) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbV6J-0004Uc-Nu for qemu-devel@nongnu.org; Fri, 27 Mar 2015 10:19:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YbV6G-0000p1-9E for qemu-devel@nongnu.org; Fri, 27 Mar 2015 10:19:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33841) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YbV6G-0000oW-3t for qemu-devel@nongnu.org; Fri, 27 Mar 2015 10:19:04 -0400 Date: Fri, 27 Mar 2015 15:18:59 +0100 From: Igor Mammedov Message-ID: <20150327151859.06843dc0@nial.brq.redhat.com> In-Reply-To: <55146D0F.6040309@redhat.com> References: <1427388174-30915-1-git-send-email-imammedo@redhat.com> <55146D0F.6040309@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] fix assertion in "info memory-devices" if memdev isn't accessible List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: lma@suse.com, qemu-devel@nongnu.org, afaerber@suse.de, lcapitulino@redhat.com On Thu, 26 Mar 2015 21:33:19 +0100 Paolo Bonzini wrote: > > > On 26/03/2015 17:42, Igor Mammedov wrote: > > + mdevid = object_property_get_str(OBJECT(dimm->hostmem), "id", > > + &error_abort); > > + mdevpath = g_strdup_printf("/objects/%s", mdevid); > > + g_free(mdevid); > > + mdev = object_resolve_path_type(mdevpath, TYPE_MEMORY_BACKEND, > > + NULL); > > You can add a backend with id xyz, remove it, and add another with the > same id, right? > > I think the can_be_deleted solution is better and not more invasive, > even for 2.3. yep, it's better. > > Paolo