From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47888) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1zuK-0007xh-Nq for qemu-devel@nongnu.org; Mon, 08 Jun 2015 12:28:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z1zuG-0002Qf-HZ for qemu-devel@nongnu.org; Mon, 08 Jun 2015 12:28:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49391) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1zuG-0002Pj-Bk for qemu-devel@nongnu.org; Mon, 08 Jun 2015 12:28:12 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 0864B2B64A9 for ; Mon, 8 Jun 2015 16:28:12 +0000 (UTC) Message-ID: <5575C298.4050109@redhat.com> Date: Mon, 08 Jun 2015 18:28:08 +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> <5575B50C.30105@redhat.com> <20150608182500.32c17898@nial.brq.redhat.com> In-Reply-To: <20150608182500.32c17898@nial.brq.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 Cc: qemu-devel@nongnu.org, mst@redhat.com On 08/06/2015 18:25, Igor Mammedov wrote: > >> > Can we just outlaw this, forcing each memory backend to be >> > used only once? > to outlaw it gracefully without asserting QEMU during hotplug > user should be able to detect that it's outlawed i.e. use > memory_region_is_hva_mapped(), but yes we can. We can also add a ->detach method to HostMemoryBackend, and forbid get_memory after it has been invoked. Paolo