From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48577) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1z0O-0003SK-Rr for qemu-devel@nongnu.org; Mon, 08 Jun 2015 11:30:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z1z0J-0002nW-23 for qemu-devel@nongnu.org; Mon, 08 Jun 2015 11:30:28 -0400 Received: from mail-wi0-x229.google.com ([2a00:1450:400c:c05::229]:34329) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1z0I-0002mb-R8 for qemu-devel@nongnu.org; Mon, 08 Jun 2015 11:30:22 -0400 Received: by wibut5 with SMTP id ut5so90334485wib.1 for ; Mon, 08 Jun 2015 08:30:22 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <5575B50C.30105@redhat.com> Date: Mon, 08 Jun 2015 17:30:20 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1433776757-61958-1-git-send-email-imammedo@redhat.com> <1433776757-61958-5-git-send-email-imammedo@redhat.com> In-Reply-To: <1433776757-61958-5-git-send-email-imammedo@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC v2 4/6] hostmem: return recreated MemoryRegion if current can't be reused List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov , qemu-devel@nongnu.org Cc: mst@redhat.com On 08/06/2015 17:19, Igor Mammedov wrote: > MemoryRegion * > host_memory_backend_get_memory(HostMemoryBackend *backend, Error **errp) > { > + UserCreatableClass *ucc = USER_CREATABLE_GET_CLASS(backend); > + > + if (memory_region_is_hva_mapped(&backend->mr)) { > + object_unparent(OBJECT(&backend->mr)); > + ucc->complete(USER_CREATABLE(backend), errp); > + } I'm not sure I understand this, and the commit message... doesn't help. Is it for the case where you unplug memory and then reuse the old backend? Can we just outlaw this, forcing each memory backend to be used only once? Paolo